Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 335342

Summary: eclass/pax-utils.eclass should test if running kernel has RANDMMAP
Product: Gentoo Linux Reporter: Anthony Basile <blueness>
Component: EclassesAssignee: Anthony Basile <blueness>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: hardened
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Anthony Basile gentoo-dev 2010-08-31 00:39:15 UTC
It is useful to have a function in pax-utils which checks if the kernel has RANDMMAP enabled.  See bug #301299 as an example --- there using gcc to compile PCH headers breaks when using a hardened kernel with RANDMMAP enabled.

See also http://forums.grsecurity.net/viewtopic.php?f=3&t=1565

Currently I'm not sure of the best way of implementing such a function.  Here are some possibilities

1. zgrep RANDMMAP /proc/config.gz.  This is the best way if config.gz exists.

2. grep -s ^PaX: /proc/self/status | grep -q R  This would be nice but doesn't work because it only reflects the PaX markings on the binary, not the kernel support for RANDMMAP.

Open to suggestions ...