I've tried building two recent hardened kernels for my ppc box, and the same error has thwarted me in both cases: CC mm/memory.o mm/memory.c: In function `free_pmd_range': mm/memory.c:250: error: implicit declaration of function `_AC' mm/memory.c:250: error: `UL' undeclared (first use in this function) mm/memory.c:250: error: (Each undeclared identifier is reported only once mm/memory.c:250: error: for each function it appears in.) mm/memory.c: In function `free_pgd_range': mm/memory.c:344: error: `UL' undeclared (first use in this function) mm/memory.c: In function `free_pgtables': mm/memory.c:390: error: `UL' undeclared (first use in this function) make[1]: *** [mm/memory.o] Error 1 make: *** [mm] Error 2 The kernels I've tried are: * sys-kernel/hardened-sources-2.6.36-r9 * sys-kernel/hardened-sources-2.6.37-r2 Both fail with exactly the above output. The GCC I'm using is powerpc-gentoo-linux-uclibc-3.4.6, and I suspect that has something to do with it. Would it be worth merging a powerpc-targeted gcc-4.4? If so, how would I go about it? I'll include emerge --info on request, but it doesn't seem relevant here and besides, I've tried compiling this natively on the ppc box and cross-compiling on my x86_64 and I get the same problem. Reproducible: Always Steps to Reproduce: Attempt to build one of the aforementioned kernels.
Created attachment 263227 [details] Config file for 2.6.36 version
Created attachment 263229 [details] Full build log for 2.6.37 version
Is this a ppc or ppc64 system? Please attach your emerge --info.
Created attachment 263565 [details] emerge --info for target machine It's 32-bit PPC, an Efika (MPC5200B) to be exact.
I haven't been giving ppc32 much love, focusing more on ppc64. Passing it upstream.
Upstream to where? I'd like to stay in contact with my bug.
(In reply to comment #6) > Upstream to where? I'd like to stay in contact with my bug. > pageexec@freemail.hu spender@grsecurity.net You can email syntax errors directly to them.
(In reply to comment #6) > Upstream to where? I'd like to stay in contact with my bug. > They are CC'd to this bug. :)
BTW, looks like you just need an: #include <linux/const.h> somewhere inherited by memory.c. probably put it in arch/powerpc/include/asm/pgtable.h to keep it the same as is done for ia64.
Tom, can you check that only mm/memory.c needs that extra #include?
I can confirm that adding #include <linux/const.h> to arch/powerpc/include/asm/pgtable.h eliminates the build error.
(In reply to comment #11) > I can confirm that adding #include <linux/const.h> to > arch/powerpc/include/asm/pgtable.h eliminates the build error. thanks, i released patches yesterday that have the fix, grsec will follow soon i guess ;).
This has been fixed in the latest hardened-sources, so I'm closing this bug.