Closed powerman closed 7 years ago
That's CONFIG_GRKERNSEC_HIDESYM
in action ;) It protects the build directory to ensure it's effective, i.e. prevent non-root users from getting kernel addresses by peeking at the objects files. But that feature has always been this way, so that's not new.
As I'm no gentoo user, you might ask in #gentoo-hardened
on FreeNode how to get the NVidia drivers working -- or build them as root?
Btw., that's what you're seeing: https://github.com/minipli/linux-unofficial_grsec/blob/linux-4.9.x-unofficial_grsec/grsecurity/Makefile#L44-L54
I suppose it was patched in Gentoo package "hardened-sources", this is why I never seen this effect before with enabled CONFIG_GRKERNSEC_HIDESYM
. I don't like to disable it because it does more than just this, so it looks like chmod 0755 /usr/src/linux
in /etc/kernel/postinst.d/50-module_rebuild is good enough workaround.
Thanks!
You might want to give one of the various overlays a try. I've listed a few here (might be outdated, though): https://lwn.net/Articles/731605/
I've own overlay, and I've already asked about this on gentoo-hardened@lists.gentoo.org in August, but the answer "git pull
is just enough" sounds reasonable to me. If I'll need some extra patches then adding ebuild to my overlay or using someone else's may make sense, but I rarely use custom patches for kernel.
Sorry if this has nothing with grsec, but I never have seen such behaviour on official kernels before:
Problem is 0700 permissions prevent building external kernel modules using non-root account (like it happens in Gentoo while
emerge nvidia-drivers
, for example).