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 ...