more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patch)

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Sat Aug 20, 2011 5:52 pm

PaX Team wrote:
simonbcn wrote:The diff between init/.do_mounts.o.cmd files (do_mounts.o.cmd = grsec file / linux-2.6.39.4/init/.do_mounts.o.cmd = vanilla kernel): http://paste.ubuntu.com/671216/
so vanilla passes -fno-stack-protector whereas grsec doesn't. question is where it comes from in the vanilla kernel...

Can I force this with grsec?
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Sun Aug 21, 2011 6:46 am

simonbcn wrote:
PaX Team wrote:so vanilla passes -fno-stack-protector whereas grsec doesn't. question is where it comes from in the vanilla kernel...

Can I force this with grsec?
well, passing it in KCFLAGS should fix it but that's a hack as we still wouldn't know the root cause.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Sun Aug 21, 2011 7:25 am

PaX Team wrote:
simonbcn wrote:
PaX Team wrote:so vanilla passes -fno-stack-protector whereas grsec doesn't. question is where it comes from in the vanilla kernel...

Can I force this with grsec?
well, passing it in KCFLAGS should fix it but that's a hack as we still wouldn't know the root cause.

Yes, if I pass "KCFLAGS=-fno-stack-protector" it works.
But the problem is that this passes the flag to all compilation kernel.
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Mon Aug 22, 2011 8:46 am

With the last patch: "grsecurity-2.2.2-2.6.39.4-201108211939.patch", it fails too.
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby simonbcn » Fri Sep 16, 2011 7:26 am

This is already solved in last grsecurity patch: grsecurity-2.2.2-3.0.4-201109150655.patch.
Thanks.
simonbcn
 
Posts: 30
Joined: Mon Apr 18, 2011 7:23 am

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby Pryka » Sat Sep 17, 2011 3:46 am

I've got still something like this on: "grsecurity-2.2.2-3.0.4-201109150655.patch" :(

Code: Select all
-hardened-r2/tools/gcc/constify_plugin.so -DCONSTIFY_PLUGIN -fplugin=/usr/src/linux-3.0.4-hardened-r2/tools/gcc/stackleak_plugin.so -fplugin-arg-stackleak_plugin-track-lowest-sp=100   -I/var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel -Wall -MD -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"285.03\" -Wno-unused-function -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv_usermap)"  -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel/nv-usermap.o /var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel/nv-usermap.c
/var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel/nv-procfs.c: In function ‘nv_register_procfs’:
/var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel/nv-procfs.c:710:5: error: assignment of read-only variable ‘nv_procfs_registry_fops’
/var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel/nv-procfs.c:711:5: error: assignment of read-only variable ‘nv_procfs_registry_fops’
make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel/nv-procfs.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-285.03/work/kernel] Error 2
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
emake failed
 * ERROR: x11-drivers/nvidia-drivers-285.03 failed (compile phase):
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux       SYSOUT=/lib/modules/3.0.4-hardened-r2/build CC=x86_64-pc-linux-gnu-gcc clean module
Pryka
 
Posts: 8
Joined: Sun Jun 26, 2011 1:26 pm


Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby Pryka » Sun Sep 18, 2011 4:04 am

But I have 285 drivers this gonna work?

BTW. Is there any other way to fix this? Some option i grsecurity?
Pryka
 
Posts: 8
Joined: Sun Jun 26, 2011 1:26 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby spender » Sun Sep 18, 2011 4:27 am

You could ask the gentoo maintainer to fix it on their end (though they'd need to apply a conditional patch).

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby Pryka » Mon Sep 19, 2011 3:38 am

Hmm I'm not sure if this is Gentoo fault.

Yesterday I'm patch clean kernel sources(vanilla) with latest grsecurity patch and there is same problem with nvidia.

Unless u are talking about this Nvidia patch.
Pryka
 
Posts: 8
Joined: Sun Jun 26, 2011 1:26 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Mon Sep 19, 2011 8:54 am

Pryka wrote:But I have 285 drivers this gonna work?
i haven't checked 285.x yet but a similar patch is likely needed there as well, just try to apply it and see how far it gets.
BTW. Is there any other way to fix this? Some option i grsecurity?
constifying ops structures is not configurable but you can remove the CONSTIFY_PLUGIN := ... line from the main Makefile if you really don't want it.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby Quark » Thu Sep 29, 2011 2:14 am

Hi,
I created a nvidia-drivers-285.03.ebuild in my overlay.
Give it a try if you like: http://www.startux.de/gitweb/quarks.git

https://grsecurity.net/~paxguy1/nvidia- ... onst.patch works fine for 285.03.
No luck with https://grsecurity.net/~paxguy1/nvidia- ... copy.patch,
but PAX_USERCOPY had to be disabled for the stock nvidia binary drivers previously as well.

So far so good
Stefan
Quark
 
Posts: 3
Joined: Wed Sep 28, 2011 10:15 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby Quark » Sat Nov 12, 2011 10:47 pm

Quick update:

In order to get the nvidia module working having PAX_USERCOPY enabled, one has to actually use the SLAB allocator!
I used the SLUB allocator before .. ;-)

Also updated to nvidia-drivers-290.06.ebuild.

Cheers
Quark
 
Posts: 3
Joined: Wed Sep 28, 2011 10:15 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby PaX Team » Mon Nov 14, 2011 11:51 am

Quark wrote:In order to get the nvidia module working having PAX_USERCOPY enabled, one has to actually use the SLAB allocator!
I used the SLUB allocator before .. ;-)
the nvidia driver works with SLUB as well, it just needs the patch i mentioned above (i have since updated it to 285 that also applies to 290).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: more errors (grsecurity-2.2.2-2.6.39.4-201108132040.patc

Postby Quark » Fri Jan 27, 2012 3:24 am

Hi,
confirmed,

With the updated patches the SLUB allocator works too, using 290.10.
I updated my ebuild which includes these patches!
Quark
 
Posts: 3
Joined: Wed Sep 28, 2011 10:15 pm

Previous

Return to grsecurity support