Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nvidia hardened bug
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
farmer.ro
Apprentice
Apprentice


Joined: 20 Aug 2016
Posts: 179

PostPosted: Wed Nov 30, 2016 10:54 am    Post subject: nvidia hardened bug Reply with quote

i am trying to rebuild nvidia-drivers-375.20-r1 on the hardened profile but fails to build:

build log: https://paste.pound-python.org/show/TE4xavHTWXTxpygCzB2n/

bug: https://bugs.gentoo.org/show_bug.cgi?id=600156

does anyone knows how to fix this?
Code:
# emerge --ask nvidia-drivers::koekjeskoe

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-drivers/nvidia-drivers-375.20-r1 [375.20-r1] USE="pax_kernel* (-X*) -acpi* (-tools*)"

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests
>>> Running pre-merge checks for x11-drivers/nvidia-drivers-375.20-r1
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.8.11-gentoo/build
 * Found sources for kernel version:
 *     4.8.11-gentoo
 * Checking for suitable kernel configuration options...                                                                                                                                                                               [ ok ]

>>> Emerging (1 of 1) x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe
 * NVIDIA-Linux-x86_64-375.20.run SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                                                 [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/4.8.11-gentoo/build
 * Found sources for kernel version:
 *     4.8.11-gentoo
>>> Unpacking source...
>>> Unpacking NVIDIA-Linux-x86_64-375.20.run to /var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work
>>> Source unpacked in /var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work
>>> Preparing source in /var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work ...
 * Applying nvidia-drivers-375.20-profiles-rc.patch ...                                                                                                                                                                                [ ok ]
 * Using PAX patches is not supported. You will be asked to
 * use a standard kernel should you have issues. Should you
 * need support with these patches, contact the PaX team.
 * Applying nvidia-drivers-364.12-pax.patch ...
1 out of 2 hunks FAILED -- saving rejects to file kernel/nvidia/nv-modeset-interface.c.rej
1 out of 2 hunks FAILED -- saving rejects to file kernel/nvidia-uvm/uvm_common.c.rej                                                                                                                                                   [ !! ]
 * ERROR: x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe failed (prepare phase):
 *   patch -p1  failed with /usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch
 *
 * Call stack:
 *               ebuild.sh, line  115:  Called src_prepare
 *             environment, line 4563:  Called eapply '/usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch'
 *             environment, line 1246:  Called _eapply_patch '/usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch'
 *             environment, line 1184:  Called __helpers_die 'patch -p1  failed with /usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work/'

>>> Failed to emerge x11-drivers/nvidia-drivers-375.20-r1, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-375.20-r1:

 * Using PAX patches is not supported. You will be asked to
 * use a standard kernel should you have issues. Should you
 * need support with these patches, contact the PaX team.
 * ERROR: x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe failed (prepare phase):
 *   patch -p1  failed with /usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch
 *
 * Call stack:
 *               ebuild.sh, line  115:  Called src_prepare
 *             environment, line 4563:  Called eapply '/usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch'
 *             environment, line 1246:  Called _eapply_patch '/usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch'
 *             environment, line 1184:  Called __helpers_die 'patch -p1  failed with /usr/local/portage/x11-drivers/nvidia-drivers/files/nvidia-drivers-364.12-pax.patch'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-375.20-r1::koekjeskoe'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-375.20-r1/work/'
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Wed Nov 30, 2016 1:09 pm    Post subject: Reply with quote

farmer.ro,

Code:
 * Applying nvidia-drivers-364.12-pax.patch ...
1 out of 2 hunks FAILED -- saving rejects to file kernel/nvidia/nv-modeset-interface.c.rej
1 out of 2 hunks FAILED -- saving rejects to file kernel/nvidia-uvm/uvm_common.c.rej 

The patches did not apply.

Fix the failed hunks by hand and make new patches, or find patches for your particular version of nvidia drivers
You have nvidia-drivers-375.20-r1 and patches for nvidia-drivers-364.12.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30885
Location: here

PostPosted: Wed Nov 30, 2016 4:24 pm    Post subject: Reply with quote

Try with this patch but without warranty.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
mirekm
Apprentice
Apprentice


Joined: 12 Feb 2004
Posts: 210
Location: Gliwice

PostPosted: Wed Nov 30, 2016 9:01 pm    Post subject: Reply with quote

Better use this patch. It is official from grsecurity:


https://grsecurity.net/~paxguy1/nvidia-drivers-375.20-pax.patch
Back to top
View user's profile Send private message
farmer.ro
Apprentice
Apprentice


Joined: 20 Aug 2016
Posts: 179

PostPosted: Thu Dec 01, 2016 12:39 pm    Post subject: Reply with quote

if it is necessary to patch the nvidia driver on hardened gentoo, i rather use the default desktop setup, however; would not using hardened makes the system really that more vulnerable ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54209
Location: 56N 3W

PostPosted: Thu Dec 01, 2016 5:45 pm    Post subject: Reply with quote

farmer.ro,

You need to define the threats you want to defend against before you can define the security measures you need to take
So, vunerable to what?

Security is like the layers of an onion. It does not make getting in and doing bad things impossible, it only makes it more difficult.
What layers of the onion do you need?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum