Created attachment 445556 [details, diff] Example pax patch for nvidia-drivers-370.28 The last version of nvidia-drivers (with pax_kernel use flag) tries to apply an outdated pax patch, resulting in compilation errors due to driver internal changes. I've attached an example patch for 370.28 I made that makes it compiles again. While this patch is not perfect (and I may still have missed some subtleties), it works fine for me on Kernel 4.6.4 with grsec. In nvidia/nv-modeset-interface.c I had to fix nvidia_get_rm_ops by setting its structure as non-const (and then cast it as const), due to the introduction .allow_write_combining, written at runtime. Separating const data from non-const data probably requires a some additional work, that's why I fixed it the dirty way... Regards, Romain
Created attachment 445558 [details, diff] Example pax patch for nvidia-drivers-370.28 v2 Patch seems much more similar to the previous ones this way.
Hi, i can confirm this, i have the same problem, sadly seems the patch don't works in hardened 4.7.7 (or the problem is other) [32;01m * [39;49;00mPackage: x11-drivers/nvidia-drivers-370.28 [32;01m * [39;49;00mRepository: Local-X [32;01m * [39;49;00mMaintainer: jer@gentoo.org hardened@gentoo.org [32;01m * [39;49;00mUSE: X abi_x86_64 acpi amd64 compat driver elibc_glibc gtk3 kernel_linux kms multilib pax_kernel tools userland_GNU uvm wayland [32;01m * [39;49;00mFEATURES: preserve-libs sandbox userpriv usersandbox [32;01m*[0m Determining the location of the kernel source code [32;01m*[0m Found kernel source directory: [32;01m*[0m /usr/src/linux [32;01m*[0m Found kernel object directory: [32;01m*[0m /lib/modules/4.7.7-hardened/build [32;01m*[0m Found sources for kernel version: [32;01m*[0m 4.7.7-hardened x86_64-pc-linux-gnu-ld -r -o /var/tmp/portage/x11-drivers/nvidia-drivers-370.28/work/kernel/nvidia-modeset/nv-modeset-interface.o /var/tmp/portage/x11-drivers/nvidia-drivers-370.28/work/kernel/nvidia-modeset/nvidia-modeset-linux.o make -f /usr/src/linux-4.7.7-hardened/scripts/Makefile.modpost find /var/tmp/portage/x11-drivers/nvidia-drivers-370.28/work/kernel/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -m -i ./Module.symvers -I /var/tmp/portage/x11-drivers/nvidia-drivers-370.28/work/kernel/Module.symvers -o /var/tmp/portage/x11-drivers/nvidia-drivers-370.28/work/kernel/Module.symvers -S -w -s -T - FATAL: modpost: GPL-incompatible module nvidia-drm.ko uses GPL-only symbol 'mutex_destroy' /usr/src/linux-4.7.7-hardened/scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[3]: *** [__modpost] Error 1 /usr/src/linux-4.7.7-hardened/Makefile:1468: recipe for target 'modules' failed make[2]: *** [modules] Error 2 make[2]: Leaving directory '/usr/src/linux-4.7.7-hardened' Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-4.7.7-hardened' Makefile:81: recipe for target 'modules' failed make: *** [modules] Error 2 [31;01m*[0m ERROR: x11-drivers/nvidia-drivers-370.28::Local-X failed (compile phase): [31;01m*[0m emake failed [31;01m*[0m Thx. Cya.
..., in hardened 4.7.2 the same.... check this https://forums.gentoo.org/viewtopic-p-7964326.html?sid=13be43822269b3763ffda13b1892bc4d
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=421d7dc6fb791f8edde480dc6d989ade59c54710 commit 421d7dc6fb791f8edde480dc6d989ade59c54710 Author: Jeroen Roovers <jer@gentoo.org> AuthorDate: 2019-01-16 10:24:43 +0000 Commit: Jeroen Roovers <jer@gentoo.org> CommitDate: 2019-01-16 10:32:11 +0000 x11-drivers/nvidia-drivers: Drop USE=pax_kernel Closes: https://bugs.gentoo.org/551366 Closes: https://bugs.gentoo.org/593624 Closes: https://bugs.gentoo.org/600156 Closes: https://bugs.gentoo.org/629062 Closes: https://bugs.gentoo.org/633738 Closes: https://bugs.gentoo.org/650482 Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Jeroen Roovers <jer@gentoo.org> .../files/nvidia-drivers-331.13-pax-usercopy.patch | 52 --- .../files/nvidia-drivers-337.12-pax-constify.patch | 25 -- .../files/nvidia-drivers-375.20-pax.patch | 406 --------------------- x11-drivers/nvidia-drivers/metadata.xml | 4 - .../nvidia-drivers/nvidia-drivers-340.107.ebuild | 12 +- .../nvidia-drivers/nvidia-drivers-390.87.ebuild | 11 +- .../nvidia-drivers/nvidia-drivers-410.93.ebuild | 9 +- .../nvidia-drivers/nvidia-drivers-415.25.ebuild | 9 +- .../nvidia-drivers/nvidia-drivers-415.27.ebuild | 9 +- 9 files changed, 7 insertions(+), 530 deletions(-)