GrapheneOS / linux-hardened

Minimal supplement to upstream Kernel Self Protection Project changes. Features already provided by SELinux + Yama and archs other than multiarch arm64 / x86_64 aren't in scope. Only tags have stable history. Shared IRC channel with KSPP: irc.freenode.net ##linux-hardened. Currently maintained at https://github.com/anthraxx/linux-hardened.
https://grapheneos.org/
Other
390 stars 102 forks source link

Build Failure w/ 4.12.a Patch #46

Closed githububub closed 7 years ago

githububub commented 7 years ago

4.12 kernel builds successfully with custom .config. Patched against 4.12a, the same build fails with...

In file included from ./include/linux/elf.h:4:0,          
                 from ./include/linux/module.h:15,        
                 from fs/binfmt_elf.c:12:                 
fs/binfmt_elf.c: In function 'randomize_stack_top':       
./arch/x86/include/asm/elf.h:326:56: error: 'mmap_rnd_compat_bits' undeclared (first use in this function); did you mean 'mmap_rnd_bits'?
 #define __STACK_RND_MASK(is32bit) ((is32bit) ? (1UL << mmap_rnd_compat_bits) - 1 : (1UL << mmap_rnd_bits) - 1)     
                                                        ^
./arch/x86/include/asm/elf.h:327:24: note: in expansion of macro '__STACK_RND_MASK'                                 
 #define STACK_RND_MASK __STACK_RND_MASK(mmap_is_ia32())  
                        ^~~~~~~~~~~~~~~~
fs/binfmt_elf.c:672:22: note: in expansion of macro 'STACK_RND_MASK'                                                
   random_variable &= STACK_RND_MASK;                     
                      ^~~~~~~~~~~~~~
./arch/x86/include/asm/elf.h:326:56: note: each undeclared identifier is reported only once for each function it appears in
 #define __STACK_RND_MASK(is32bit) ((is32bit) ? (1UL << mmap_rnd_compat_bits) - 1 : (1UL << mmap_rnd_bits) - 1)     
                                                        ^
./arch/x86/include/asm/elf.h:327:24: note: in expansion of macro '__STACK_RND_MASK'                                 
 #define STACK_RND_MASK __STACK_RND_MASK(mmap_is_ia32())  
                        ^~~~~~~~~~~~~~~~
fs/binfmt_elf.c:672:22: note: in expansion of macro 'STACK_RND_MASK'                                                
   random_variable &= STACK_RND_MASK;                     
                      ^~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:302: fs/binfmt_elf.o] Error 1                                                  
make[1]: *** Waiting for unfinished jobs....              
make: *** [Makefile:1019: fs] Error 2                     
==> ERROR: A failure occurred in build().   
thestinger commented 7 years ago

This is fixed in the development branch. It lost handling of the !CONFIG_COMPAT case.