If I build a kernel (hardened-dev-sources) on a Opteron-System with grsecurity the build fails with following error-messages: In file included from arch/x86_64/ia32/ia32_binfmt.c:320: fs/binfmt_elf.c: In function `load_elf_interp': fs/binfmt_elf.c:356: error: `SEGMEXEC_TASK_SIZE' undeclared (first use in this function) If I grep for a define for SEGMEXEC_TASK_SIZE, I find it only in asm-i386 but not in asm-x64. Bye Oli Reproducible: Always Steps to Reproduce: 1. System Dual-Opteron 2. Build Kernel from Hardened-dev-Sources with enabled Grsecurity
On Amd64 systems, SEGMEXEC should not be enabled in the kernel config. This error shows that SEGMEXEC_TASK_SIZE is not defined in asm-x64 because it is not supposed to be used on those systems. Menuconfig should not allow this but you may have edited your .config manually or through some other method and enabled SEGMEXEC without knowing. Instead please use PAGEEXEC which can use take advantage of the hardware NX bit.
user appears to have copy + pasted a .config from the internet (maybe our example pages which should note they are for x86)