On 2018-02-05 10:37, Hiromasa YOSHIMOTO wrote:
> Dear Andreas,
> 
> Thank you for your small program.
> I have no problem with setuid binaries on my system.
> 
> I’ve checked also the source code of nvidia-modprobe,
> and modified it to show the error messages. The diff is as follows.

Thanks for checking :-)

> With this modification, nvidia-modprobe -u will output the following message 
> when it fails.
> ———-
> modprobe_path: /sbin/modprobe
> module_name: nvidia-uvm
> eeuid() 0
> modprobe: ERROR: could not insert 'nvidia_current_uvm': Operation not 
> permitted

the failing command here is (from nvidia.conf)
    modprobe -i nvidia-current-uvm

you could make all the commands very verbose in nvidia.conf by using
always
    modprobe -vv

can you reproduce the failure with
$ lsmod | grep nvidia
$ sudo modprobe -vv -i nvidia-current-uvm

> modprobe: ERROR: ../libkmod/libkmod-module.c:979 command_do() Error running 
> install command for nvidia_uvm
> modprobe: ERROR: could not insert ‘nvidia_uvm': Operation not permitted

and these are the followup-errors from the initial modprobe command done
by nvidia-modprobe


> From this output, I think this issue occurs 
> when we have any wrong configuration in /etc/modprobe.d/.
But everything is as it is intended ...

> In my case, /etc/modprobe.d/nvidia.conf has the following lines.
> ———
> install nvidia modprobe -i nvidia-current $CMDLINE_OPTS
> install nvidia-modeset modprobe nvidia ; modprobe -i nvidia-current-modeset 
> $CMDLINE_OPTS
> install nvidia-drm modprobe nvidia-current-modeset ; modprobe -i 
> nvidia-current-drm $CMDLINE_OPTS
> install nvidia-uvm modprobe nvidia ; modprobe -i nvidia-current-uvm 
> $CMDLINE_OPTS
> remove nvidia modprobe -r -i nvidia-drm nvidia-modeset nvidia-uvm nvidia
> ——-
> 
> I’m bit confusing between nvidia_uvm and nvidia-uvm. However,

'-' and '_' are treated as equivalent by the kernel.
(probably because the module names need to be mapped to valid C
identifiers and '-' is not valid there, but in filenames)

> adding a line below, nvidia-modprobe -u now works fine as expected.
> ———
> alias nvidia-uvm  nvidia-current-uvm
> ——-

aliases add extreme madness to the renamed nvidia module madness :-)
the alias probably breaks
  modprobe -r nvidia-uvm
because there is no nvidia-current-uvm module loaded that could be unloaded


Andreas

Reply via email to