]> git.baikalelectronics.ru Git - kernel.git/commitdiff
LoongArch: Disable executable stack by default
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 26 Jul 2022 12:43:11 +0000 (20:43 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 29 Jul 2022 10:22:32 +0000 (18:22 +0800)
Disable executable stack for LoongArch by default, as all modern
architectures do.

Reported-by: Andreas Schwab <schwab@suse.de>
Suggested-by: WANG Xuerui <git@xen0n.name>
Link: https://sourceware.org/pipermail/binutils/2022-July/121992.html
Tested-by: WANG Xuerui <git@xen0n.name>
Tested-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/elf.h

index f3960b18a90e9baf41f45a5570050885a0b7b240..5f3ff4781fda83fd9e861a862f1a4ea8611d8619 100644 (file)
@@ -288,8 +288,6 @@ struct arch_elf_state {
        .interp_fp_abi = LOONGARCH_ABI_FP_ANY,  \
 }
 
-#define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT)
-
 extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf,
                            bool is_interp, struct arch_elf_state *state);