NX/PAE on i386
John Moser
john.r.moser at gmail.com
Fri Feb 13 22:03:30 UTC 2009
the i386 version of Ubuntu has some fairly odd characteristics:
- It's i486 compiled, but called i386
- The generic kernel is i586 IIRC, but not PAE
- Because of the above, non-executable pages are executable
I've thought on this, and come up with a rather basic solution:
1. Ship -generic as an i686 kernel with PAE, so that NX works
2. Ship -legacy as an i486 kernel without PAE
3. LiveCD kernel is -legacy
4. Ubiquity checks /proc/cpuinfo for 'flags:.* pae( )?*' during
install, installs -generic if found
5. Possibly alter grub to detect PAE, and if it fails have certain
boot entries marked 'legacy' and default to those, highlighting the
rest in red. Keep a -legacy kernel installed for this purpose.
This would have to be done even if userspace moved to i586 or i686 and
abandoned i486 support, because some modern i686 systems (very few)
don't have PAE. Mind you some such systems may also not have CMV
(conditional move), a RISC-like operation that can give i686 compiled
code a substantial speed-up; i can't think of a single such example,
but compiling any i686 PAE kernel with CMV would be a good enough
assumption in this case.
More information about the Ubuntu-devel-discuss
mailing list