--- a/fs/binfmt_elf.c~elf-make-bad_addr-unlikely +++ a/fs/binfmt_elf.c @@ -97,7 +97,7 @@ static struct linux_binfmt elf_format = .min_coredump = ELF_EXEC_PAGESIZE, }; -#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE) +#define BAD_ADDR(x) (unlikely((unsigned long)(x) >= TASK_SIZE)) static int set_brk(unsigned long start, unsigned long end, int prot) {