ray wrote:My system is Gentoo-2.6.5-hardened (~x86 - unstable).
There are known problems with X-server & PaX (doesn't work always). I'm using xorg-X11-6.7.0 (already compiled xorg-X11-6.7.0-r1).
Followed quickstart.pdf from the site but it breaks my X, so at last my questions:
1.What are the optimal or maximal PaX settings for an working X?
it depends on how your X server is configured/patched. the hardened gentoo effort is a work in progress, as far as the desktop is concerned, so getting a modular X server to run with full PaX on is not all automated yet (but it's possible, i've been running it for 1.5+ years myself). the biggest problem with X is its own home grown module loader that does some silly things on ELF platforms (equivalent of runtime code generation vs. normal file mappings). this is being fixed in the main X tree but it will take a while to sort out all the module dependencies:
http://bugs.gentoo.org/show_bug.cgi?id=49038 and
http://freedesktop.org/bugzilla/show_bug.cgi?id=400. there's also a problem with text relocations although gentoo already has the patches for 4.3, i'll update them for 4.4 once the dlloader works fine. ssp also brings some problems but i think that's a gentoo specific toolchain issue. so what does that leave you with today? the static server (USE=static) should be ok as it doesn't use the module loader nor will it have text relocations (i don't know about ssp but i think it will fine too).
2.Are there any problems with grsecurity and X?
beyond the PaX related issues there's the /dev/mem and I/O restrictions that can't be used with X right now (these features need a finer grained control, which is on our todo list).