Bug#888952: nvidia-driver and opencl

Hiromasa YOSHIMOTO hiromasa.yoshimoto at gmail.com
Mon Feb 5 15:11:35 UTC 2018


Dear Andreas,

I checked modprobe behaviors by using its "-vv" option as you suggested.

I ran the following commands:
$ sudo /sbin/rmmod nvidia-uvm
$ /usr/bin/nvidia-modprobe -u  > without_sudo.log 2>&1
$ sudo /usr/bin/nvidia-modprobe -u  > with_sudo.log 2>&1

Please check the attached files for the details?

In both cases, modprobe runs with root privilege, and
executes "insmod nvidia-current.ko" internally.
However, when sudo is not used, insmod fails with "Operation not 
permitted."
After that, modprobe will skip "insmod nvidia-current-uvm.ko"

I use kmod-25-1, nvidia-modprobe-384.111-1 on sid/x86_64.

Could you try the following steps with kmod-25-1 ?

$ sudo /sbin/modprobe nvidia_current
$ sudo /sbin/modprobe -r nvidia_uvm
$ nvidia-modprobe -u
$ lsmod | grep nvidia_uvm

Best,
Hiromasa YOSHIMOTO


On 2018年02月05日 20:41, Andreas Beckmann wrote:
> 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
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: without_sudo.log
Type: text/x-log
Size: 1231 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nvidia-devel/attachments/20180206/bf169f07/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with_sudo.log
Type: text/x-log
Size: 1030 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nvidia-devel/attachments/20180206/bf169f07/attachment-0001.bin>


More information about the pkg-nvidia-devel mailing list