[SOLVED]Driver Nvidia-331.20 & grsec/pax?
Posted: Sun Dec 01, 2013 7:10 pm
Hi
Driver Nvidia-331.20 is the first driver compatible with kernels
3.11.x and 3.12.x.
When I install this driver on a kernel with grsec patch, the following error occurs:
Earlier driver Nvidia 325.15 built properly on kernel 3.11, but is incompatible with the kernel 3.12.x.
Versions:
Grsec/pax konfig:
Is it possible to somehow bypass or correct this error, you may turn off some added convenience grsec / pax to install this driver?
Cheers
Driver Nvidia-331.20 is the first driver compatible with kernels
3.11.x and 3.12.x.
When I install this driver on a kernel with grsec patch, the following error occurs:
- Code: Select all
In file included from /home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess.h:614:0,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/poll.h:11,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-linux.h:97,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv_uvm_interface.c:21:
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h:82:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h: In function 'copy_to_user':
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h:94:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv_uvm_interface.c: In function 'nvUvmInterfaceRegisterUvmOps':
/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/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.20/work/kernel/nv_uvm_interface.c:401:5: error: assignment of member 'getAttachedUuids' in read-only object
/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv_uvm_interface.c: In function 'nvUvmInterfaceDeRegisterUvmOps':
/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv_uvm_interface.c:412:50: warning: passing argument 1 of 'memset' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/string.h:4:0,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/string.h:17,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/dynamic_debug.h:111,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/kernel.h:14,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/sched.h:15,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/utsname.h:5,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-linux.h:44,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv_uvm_interface.c:21:
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/string_64.h:55:7: note: expected 'void *' but argument is of type 'const struct UvmGpuProvider *'
In file included from /home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess.h:614:0,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/poll.h:11,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-linux.h:97,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/os-usermap.c:15:
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h:82:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h: In function 'copy_to_user':
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h:94:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv_uvm_interface.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess.h:614:0,
from /home/fabryka/kernel/src64/linux-3.12.2-gr1/include/linux/poll.h:11,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-linux.h:97,
from /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-frontend.c:13:
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h:82:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h: In function 'copy_to_user':
/home/fabryka/kernel/src64/linux-3.12.2-gr1/arch/x86/include/asm/uaccess_64.h:94:6: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if [ "-pg" = "-pg" ]; then if [ /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/os-interface.o != "scripts/mod/empty.o" ]; then /home/fabryka/kernel/src64/linux-3.12.2-gr1/scripts/recordmcount "/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/os-interface.o"; fi; fi;
if [ "-pg" = "-pg" ]; then if [ /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/os-usermap.o != "scripts/mod/empty.o" ]; then /home/fabryka/kernel/src64/linux-3.12.2-gr1/scripts/recordmcount "/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/os-usermap.o"; fi; fi;
if [ "-pg" = "-pg" ]; then if [ /var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-frontend.o != "scripts/mod/empty.o" ]; then /home/fabryka/kernel/src64/linux-3.12.2-gr1/scripts/recordmcount "/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel/nv-frontend.o"; fi; fi;
make[2]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-331.20/work/kernel] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/fabryka/kernel/src64/linux-3.12.2-gr1'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [nvidia.ko] Error 1
Earlier driver Nvidia 325.15 built properly on kernel 3.11, but is incompatible with the kernel 3.12.x.
Versions:
- Code: Select all
gcc version 4.7.3 (Gentoo Hardened 4.7.3-r1 p1.3, pie-0.5.5)
Linux-3.12.2
grsecurity-3.0-3.12.2-201312011111.patch
4200_fbcondecor-0.9.6.patch
Grsec/pax konfig:
- Code: Select all
egrep -i 'grkern|pax' .config
CONFIG_PAX_KERNEXEC_PLUGIN=y
CONFIG_PAX_PER_CPU_PGD=y
CONFIG_PAX_USERCOPY_SLABS=y
CONFIG_GRKERNSEC=y
CONFIG_GRKERNSEC_CONFIG_AUTO=y
# CONFIG_GRKERNSEC_CONFIG_CUSTOM is not set
# CONFIG_GRKERNSEC_CONFIG_SERVER is not set
CONFIG_GRKERNSEC_CONFIG_DESKTOP=y
# CONFIG_GRKERNSEC_CONFIG_VIRT_NONE is not set
# CONFIG_GRKERNSEC_CONFIG_VIRT_GUEST is not set
CONFIG_GRKERNSEC_CONFIG_VIRT_HOST=y
# CONFIG_GRKERNSEC_CONFIG_VIRT_EPT is not set
CONFIG_GRKERNSEC_CONFIG_VIRT_SOFT=y
# CONFIG_GRKERNSEC_CONFIG_VIRT_XEN is not set
# CONFIG_GRKERNSEC_CONFIG_VIRT_VMWARE is not set
# CONFIG_GRKERNSEC_CONFIG_VIRT_KVM is not set
CONFIG_GRKERNSEC_CONFIG_VIRT_VIRTUALBOX=y
# CONFIG_GRKERNSEC_CONFIG_PRIORITY_PERF is not set
CONFIG_GRKERNSEC_CONFIG_PRIORITY_SECURITY=y
CONFIG_GRKERNSEC_PROC_GID=397
CONFIG_GRKERNSEC_TPE_TRUSTED_GID=900
CONFIG_GRKERNSEC_SYMLINKOWN_GID=397
# PaX
CONFIG_PAX=y
# PaX Control
CONFIG_PAX_SOFTMODE=y
CONFIG_PAX_EI_PAX=y
# CONFIG_PAX_PT_PAX_FLAGS is not set
CONFIG_PAX_XATTR_PAX_FLAGS=y
# CONFIG_PAX_NO_ACL_FLAGS is not set
CONFIG_PAX_HAVE_ACL_FLAGS=y
# CONFIG_PAX_HOOK_ACL_FLAGS is not set
CONFIG_PAX_NOEXEC=y
CONFIG_PAX_PAGEEXEC=y
CONFIG_PAX_EMUTRAMP=y
CONFIG_PAX_MPROTECT=y
CONFIG_PAX_MPROTECT_COMPAT=y
CONFIG_PAX_ELFRELOCS=y
CONFIG_PAX_KERNEXEC=y
CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS=y
# CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR is not set
CONFIG_PAX_KERNEXEC_PLUGIN_METHOD="bts"
CONFIG_PAX_ASLR=y
CONFIG_PAX_RANDKSTACK=y
CONFIG_PAX_RANDUSTACK=y
CONFIG_PAX_RANDMMAP=y
CONFIG_PAX_MEMORY_STACKLEAK=y
CONFIG_PAX_MEMORY_STRUCTLEAK=y
# CONFIG_PAX_MEMORY_UDEREF is not set
CONFIG_PAX_REFCOUNT=y
CONFIG_PAX_CONSTIFY_PLUGIN=y
CONFIG_PAX_USERCOPY=y
# CONFIG_PAX_USERCOPY_DEBUG is not set
CONFIG_PAX_SIZE_OVERFLOW=y
CONFIG_PAX_LATENT_ENTROPY=y
CONFIG_GRKERNSEC_KMEM=y
# CONFIG_GRKERNSEC_IO is not set
CONFIG_GRKERNSEC_PERF_HARDEN=y
CONFIG_GRKERNSEC_RAND_THREADSTACK=y
CONFIG_GRKERNSEC_PROC_MEMMAP=y
CONFIG_GRKERNSEC_BRUTE=y
CONFIG_GRKERNSEC_MODHARDEN=y
CONFIG_GRKERNSEC_HIDESYM=y
# CONFIG_GRKERNSEC_KERN_LOCKOUT is not set
# CONFIG_GRKERNSEC_NO_RBAC is not set
CONFIG_GRKERNSEC_ACL_HIDEKERN=y
CONFIG_GRKERNSEC_ACL_MAXTRIES=3
CONFIG_GRKERNSEC_ACL_TIMEOUT=90
CONFIG_GRKERNSEC_PROC=y
# CONFIG_GRKERNSEC_PROC_USER is not set
CONFIG_GRKERNSEC_PROC_USERGROUP=y
CONFIG_GRKERNSEC_PROC_ADD=y
CONFIG_GRKERNSEC_LINK=y
CONFIG_GRKERNSEC_SYMLINKOWN=y
CONFIG_GRKERNSEC_FIFO=y
# CONFIG_GRKERNSEC_SYSFS_RESTRICT is not set
CONFIG_GRKERNSEC_ROFS=y
CONFIG_GRKERNSEC_DEVICE_SIDECHANNEL=y
CONFIG_GRKERNSEC_CHROOT=y
CONFIG_GRKERNSEC_CHROOT_MOUNT=y
CONFIG_GRKERNSEC_CHROOT_DOUBLE=y
CONFIG_GRKERNSEC_CHROOT_PIVOT=y
CONFIG_GRKERNSEC_CHROOT_CHDIR=y
CONFIG_GRKERNSEC_CHROOT_CHMOD=y
CONFIG_GRKERNSEC_CHROOT_FCHDIR=y
CONFIG_GRKERNSEC_CHROOT_MKNOD=y
CONFIG_GRKERNSEC_CHROOT_SHMAT=y
CONFIG_GRKERNSEC_CHROOT_UNIX=y
CONFIG_GRKERNSEC_CHROOT_FINDTASK=y
CONFIG_GRKERNSEC_CHROOT_NICE=y
CONFIG_GRKERNSEC_CHROOT_SYSCTL=y
CONFIG_GRKERNSEC_CHROOT_CAPS=y
# CONFIG_GRKERNSEC_CHROOT_INITRD is not set
CONFIG_GRKERNSEC_AUDIT_GROUP=y
CONFIG_GRKERNSEC_AUDIT_GID=397
CONFIG_GRKERNSEC_EXECLOG=y
CONFIG_GRKERNSEC_RESLOG=y
CONFIG_GRKERNSEC_CHROOT_EXECLOG=y
CONFIG_GRKERNSEC_AUDIT_PTRACE=y
CONFIG_GRKERNSEC_AUDIT_CHDIR=y
CONFIG_GRKERNSEC_AUDIT_MOUNT=y
CONFIG_GRKERNSEC_SIGNAL=y
CONFIG_GRKERNSEC_FORKFAIL=y
CONFIG_GRKERNSEC_TIME=y
CONFIG_GRKERNSEC_PROC_IPADDR=y
CONFIG_GRKERNSEC_RWXMAP_LOG=y
CONFIG_GRKERNSEC_DMESG=y
CONFIG_GRKERNSEC_HARDEN_PTRACE=y
CONFIG_GRKERNSEC_PTRACE_READEXEC=y
CONFIG_GRKERNSEC_SETXID=y
CONFIG_GRKERNSEC_HARDEN_IPC=y
CONFIG_GRKERNSEC_TPE=y
CONFIG_GRKERNSEC_TPE_ALL=y
CONFIG_GRKERNSEC_TPE_INVERT=y
CONFIG_GRKERNSEC_TPE_GID=900
CONFIG_GRKERNSEC_RANDNET=y
CONFIG_GRKERNSEC_BLACKHOLE=y
CONFIG_GRKERNSEC_NO_SIMULT_CONNECT=y
CONFIG_GRKERNSEC_SOCKET=y
CONFIG_GRKERNSEC_SOCKET_ALL=y
CONFIG_GRKERNSEC_SOCKET_ALL_GID=901
CONFIG_GRKERNSEC_SOCKET_CLIENT=y
CONFIG_GRKERNSEC_SOCKET_CLIENT_GID=903
CONFIG_GRKERNSEC_SOCKET_SERVER=y
CONFIG_GRKERNSEC_SOCKET_SERVER_GID=905
CONFIG_GRKERNSEC_DENYUSB=y
# CONFIG_GRKERNSEC_DENYUSB_FORCE is not set
CONFIG_GRKERNSEC_SYSCTL=y
CONFIG_GRKERNSEC_SYSCTL_ON=y
CONFIG_GRKERNSEC_FLOODTIME=10
CONFIG_GRKERNSEC_FLOODBURST=6
Is it possible to somehow bypass or correct this error, you may turn off some added convenience grsec / pax to install this driver?
Cheers