Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 335342 - eclass/pax-utils.eclass should test if running kernel has RANDMMAP
Summary: eclass/pax-utils.eclass should test if running kernel has RANDMMAP
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 00:39 UTC by Anthony Basile
Modified: 2010-10-28 19:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ...