modinfo fails with inaccessible file in current dir

Bug #227198 reported by Johan Walles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
module-init-tools
Confirmed
Unknown
module-init-tools (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

jockey-gtk:
  Installed: 0.3.3-0ubuntu7
  Candidate: 0.3.3-0ubuntu7
  Version table:
 *** 0.3.3-0ubuntu7 0
        500 http://se.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

I'm on a Swedish locale, below instructions have been roughly translated into English:
System -> Administration -> Hardware Drivers

After entering my password I get a window with an empty list of hardware drivers, even though I have a "VGA compatible controller: ATI Technologies Inc Radeon HD 2400 XT".

I expected the driver for that ATI card to show up so that I can enable it and start using Compiz.

Revision history for this message
Johan Walles (walles) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

WARNING: modinfo for module fglrx failed: modinfo: could not open fglrx: Permission denied

this looks strange. What happens if you do (as normal user) in a Terminal:

  modinfo fglrx
  modinfo usbcore

Does the latter fail as well?

Changed in jockey:
status: New → Incomplete
Revision history for this message
Johan Walles (walles) wrote : It's modinfo, and missing root permissions for accessing NFS

Found it. It seems that modinfo needs some love.

My home directory is NFS mounted. "sudo modinfo xyz" works when I'm in some non-NFS mounted directory:

johan@transwarp:~$ sudo modinfo usbcore
modinfo: could not open usbcore: Permission denied

johan@transwarp:~$ cd /tmp/

johan@transwarp:/tmp$ sudo modinfo usbcore
filename: /lib/modules/2.6.24-16-generic/kernel/drivers/usb/core/usbcore.ko
license: GPL
srcversion: E8DACA0029626C336D1A513
alias: usb:v*p*d*dc*dsc*dp*ic09isc*ip*
alias: usb:v*p*d*dc09dsc*dp*ic*isc*ip*
depends:
vermagic: 2.6.24-16-generic SMP mod_unload 586
parm: usbfs_snoop:true to log all usbfs traffic (bool)
parm: blinkenlights:true to cycle leds on hubs (bool)
parm: old_scheme_first:start with the old device initialization scheme (bool)
parm: use_both_schemes:try the other device initialization scheme if the first one fails (bool)
parm: autosuspend:default autosuspend delay (int)
johan@transwarp:/tmp$

When "modinfo fglrx" tries to open("fglrx", O_RDONLY), it fails with ENOENT.

When "sudo modinfo fglrx" tries to open("fglrx", O_RDONLY), it fails with EACCESS.

So modinfo needs to do something differently when it gets EACCESS trying to open the requested module in the current directory.

Revision history for this message
Martin Pitt (pitti) wrote : Re: modinfo fails with EPERM on NFS mounts

Do you actually have a file "fglrx" in the directory where you try to run "sudo modinfo fglrx"? So the reason why you get EACCESS is that it is NFS and root does not have any privileges for it? (root_squash)

Changed in jockey:
status: Incomplete → New
Revision history for this message
Martin Pitt (pitti) wrote :

Ah, I can reproduce this:

  cd /tmp
  touch usbcore
  chmod 0 usbcore
  modinfo usbcore

I wonder why it tries to open("usbcore") at all. If nothing else, it should open usbcore.ko, but even if "usbcore" makes sense, it should fall back to the one in the standard directory (/lib/modules..).

Changed in module-init-tools:
status: New → Confirmed
Changed in module-init-tools:
status: Unknown → Confirmed
Changed in module-init-tools:
importance: Undecided → Low
Changed in module-init-tools (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Johan Walles (walles) wrote :

This works in module-init-tools 3.10-3 which is in Karmic.

Don't know when this was really fixed, probably a while ago.

Changed in module-init-tools (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Johan Walles (walles) wrote :

The link to http://bugzilla.kerneltools.org/show_bug.cgi?id=6 doesn't work for me btw, I wanted to comment there but I couldn't.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.