On 2022/7/26 21:02, Huacai Chen wrote:
Disable executable stack for LoongArch by default, as all modern
architectures do.
I don't know why this slipped in under everyone's eyes... Struggling to
recall some of my mental activities during the initial review, I may be
not too familiar with the code at that time (maybe still the case now),
and didn't check what exactly "read_implies_exec" means in this
particular context. That could be just the reason for my part.
But better mention the discussion leading to the discovery of this bug:
"The problematic behavior was initially discovered by Andreas Schwab in
a binutils discussion [1], fix suggested by WANG Xuerui" or something
along the line.
[1]: https://sourceware.org/pipermail/binutils/2022-July/121992.html
Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
---
arch/loongarch/include/asm/elf.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/loongarch/include/asm/elf.h b/arch/loongarch/include/asm/elf.h
index f3960b18a90e..5f3ff4781fda 100644
--- a/arch/loongarch/include/asm/elf.h
+++ b/arch/loongarch/include/asm/elf.h
@@ -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);
I've tested the same change on my local test branch and can confirm
nothing is broken. Actually, no visible changes whatsoever, everything
is just the same.
Tested-by: WANG Xuerui <git@xxxxxxxxxx>
--
WANG "xen0n" Xuerui
Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/