Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
output of lsmod (column "Used by") is always -2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Royal_ts
n00b
n00b


Joined: 23 May 2011
Posts: 44
Location: Leipzig

PostPosted: Sat Feb 02, 2013 10:12 pm    Post subject: output of lsmod (column "Used by") is always -2 Reply with quote

Hey!

my gentoo is all in all running well but the output of lsmod (column "Used by") is always -2
I tried to add a module and just wanted to know if it was successful

So it looks like this:
Code:

ronny-reiner-rambo royalts # lsmod
Module                  Size  Used by
bnep                   10158  -2
fuse                   64957  -2
iwldvm                128219  -2
mac80211              406033  -2
rts_pstor             403035  -2
iwlwifi                70969  -2
atl1c                  32017  -2
cfg80211              176158  -2
aesni_intel            40006  -2
aes_x86_64              7244  -2
ablk_helper             1701  -2
cryptd                  7227  -2


by the way: after command
Code:
modprobe bluetooth.ko

there was no error but the module wasn't listed in lsmod

I use Kernel 3.6.11-gentoo
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun Feb 03, 2013 6:20 am    Post subject: Reply with quote

Royal_ts,

I've never seen a -2 with lsmod :?

Out of curiosity, what's the output of cat /proc/modules :?:

You might want to try emerging sys-apps/kmod and/or revdep-rebuild to see if there's any difference if the cat of modules looks OK.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Royal_ts
n00b
n00b


Joined: 23 May 2011
Posts: 44
Location: Leipzig

PostPosted: Sun Feb 03, 2013 8:12 am    Post subject: Reply with quote

the ouput of cat /proc/modules was
Code:

bnep 10158 - - Live 0xffffffffa000b000
fuse 64957 - - Live 0xffffffffa0052000
iwldvm 128219 - - Live 0xffffffffa0196000
mac80211 406033 - - Live 0xffffffffa0116000
iwlwifi 70969 - - Live 0xffffffffa002b000
rts_pstor 403035 - - Live 0xffffffffa00b2000 (C)
cfg80211 176158 - - Live 0xffffffffa0085000
atl1c 32017 - - Live 0xffffffffa0069000
aesni_intel 40006 - - Live 0xffffffffa0047000
aes_x86_64 7244 - - Live 0xffffffffa0028000
ablk_helper 1701 - - Live 0xffffffffa0018000
cryptd 7227 - - Live 0xffffffffa0000000


and a emerge of kmod and revdep-rebuild didn't solve the problem
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sun Feb 03, 2013 4:44 pm    Post subject: Reply with quote

For me, cat /proc/modules shows a usage count in the first column after size, but for you, it shows a -. What is the output of emerge --info? Have you set any kernel hardening options?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Sun Feb 03, 2013 6:21 pm    Post subject: Reply with quote

Royal_ts,

I suspect you have module unloading off in your kernel, so the kernel has no need to track if modules are in use or not.

What does
Code:
grep MODULE_UNLOAD /usr/src/linux
show ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Royal_ts
n00b
n00b


Joined: 23 May 2011
Posts: 44
Location: Leipzig

PostPosted: Mon Feb 04, 2013 4:56 pm    Post subject: Reply with quote

the output of emerge --info is

Code:
Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)
=================================================================
System uname: Linux-3.6.11-gentoo-x86_64-Intel-R-_Core-TM-_i5-2430M_CPU_@_2.40GHz-with-gentoo-2.1
Timestamp of tree: Sat, 02 Feb 2013 08:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo webapp-experimental rebutia sabayon x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/webapps-experimental /var/lib/layman/rebutia /var/lib/layman/sabayon /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="APACHE2_MODULES X a52 aac acl acpi alsa amd64 apache apm avahi berkdb bluetooth bzip2 cdr cli consolekit cracklib crypt cxx dbus dhclient dri dvd encode fortran gdbm gnutls gpm gtk hpijs iconv ipv6 java jpeg live lm_sensors mad midi mmx modules mp2 mp3 mudflap multilib mysql ncurses nls nptl nsplugin nss odk openmp pam pcre php readline resolvconf session sse sse2 ssl startup-notification tcpd threads thunar tiff udev unicode usb vaapi x264 xorg xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


I can't see something unusual there


@NeddySeagoon

the output of grep MODULE_UNLOAD /usr/src/linux tells me
grep: /usr/src/linux: Is a directory

I expect u are intereted in something other. unfortunately i don't know the command for printing out all modules.
but in my Kernel Configuration i searched for unload and i found this:

Code:
 Symbol: MODULE_UNLOAD [=n]

and
Code:
Symbol: MODULE_FORCE_UNLOAD [=n]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Mon Feb 04, 2013 6:49 pm    Post subject: Reply with quote

Royal_ts,

Well caught - you showed the right thing anyway.
Code:
Symbol: MODULE_UNLOAD [=n]
tells that
Code:
modprobe -r <module_name>
will not work on your system.

The kernel therefore has no need to keep track of how many users a modules has to prevent you from unloading a module that is in use.
If you want to see number of users and so on in lsmod, rebuild your kernel with Module Unloading enabled.
What you have now is not wrong - its a user option.

Code:
MODULE_FORCE_UNLOAD [=n]
is a good thing. It prevents you from forcefully unloading modules that are in use.
This can be a very bad thing for the devices using the modules.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Royal_ts
n00b
n00b


Joined: 23 May 2011
Posts: 44
Location: Leipzig

PostPosted: Thu Feb 14, 2013 4:09 pm    Post subject: Reply with quote

It's exactly like you said. :) Everything is working fine now... THANKS!!!!!!!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum