Summary: | x11-drivers/nvidia-drivers goes into infinite loop with pthread_mutex_lock | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Amadeusz Sławiński <amade> |
Component: | Hardened | Assignee: | The Gentoo Linux Hardened Team <hardened> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | zerochaos |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=487700 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
strace of nitrogen --restore
strace of LD_PRELOAD="/usr/lib64/opengl/nvidia/lib/libGL.so.1" nitrogen --restore |
Description
Amadeusz Sławiński
2013-05-27 21:52:09 UTC
Created attachment 349404 [details]
strace of nitrogen --restore
Created attachment 349406 [details]
strace of LD_PRELOAD="/usr/lib64/opengl/nvidia/lib/libGL.so.1" nitrogen --restore
This seems to be caused by selinux awareness in nvidia drivers, after disabling selinux in kernel everything works fine. warning: Cannot call inferior functions, Linux kernel PaX protection forbids return to non-executable pages! warning: Could not load shared library symbols for linux-vdso.so.1. This is why we masked these on the hardened profiles. We cannot fix this. All you can do is relax the hardening, in which case, just use a vanilla kernel. I'm cc-ing Zero_Chaos who may know more. In my experience, I've never gotten the nvidia drivers working right with hardened. My recommendation is that you use nouveau. Seems like I'm not the only one to have problems with selinux and nvidia, recently this surfaced on selinux mailing list: http://thread.gmane.org/gmane.comp.security.selinux/19519 https://bugzilla.gnome.org/show_bug.cgi?id=706836 From backtraces on gnome bugzilla seems like same problem, so there are chances that it gets fixed. The nvidia drivers work for cuda/opencl on hardened, my intent was never to use them as video drivers. I have tested with using xorg-x11 set for opengl and things seem to work okay, I've never gone beyond that. Just noting that it's supposedly fixed upstream. However I can't test it because 331.17 doesn't seem to build. (Yes, yes, I know, unsupported on hardened :D ) One reason is incompatiblity with 3.11 kernels (num_physpages -> get_num_physpages), other that pax patch needs to be updated (, even with those resolved it seems to fail telling me it tries to modify read only struct /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c: In function ‘nvUvmInterfaceRegisterUvmOps’: /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:387:5: error: assignment of member ‘sessionCreate’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:388:5: error: assignment of member ‘sessionDestroy’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:389:5: error: assignment of member ‘addressSpaceCreate’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:390:5: error: assignment of member ‘addressSpaceCreateMirrored’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:391:5: error: assignment of member ‘addressSpaceDestroy’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:392:5: error: assignment of member ‘allocGpuMemoryFB’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:393:5: error: assignment of member ‘allocGpuMemorySys’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:394:5: error: assignment of member ‘freeGpuMemory’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:395:5: error: assignment of member ‘cpuMap’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:396:5: error: assignment of member ‘cpuUnmap’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:397:5: error: assignment of member ‘channelAllocate’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:398:5: error: assignment of member ‘channelDestroy’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:399:5: error: assignment of member ‘channelTranslateError’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:400:5: error: assignment of member ‘copyEngineAllocate’ in read-only object /var/tmp/portage/x11-drivers/nvidia-drivers-331.17/work/kernel/nv_uvm_interface.c:401:5: error: assignment of member ‘getAttachedUuids’ in read-only object probably caused by something being defined as const (constified?) in either nvidia or kernel itself. So after editing kernel/nvidia-modules-common.mk to disable UVM, I was able to build driver, after manually applying pax patch (it basically looks the same, haven't looked too much why it fails to apply). Xfce starts without problem, so I confirm that it is fixed by upstream. |