lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1604487198-19365-1-git-send-email-tangyouling@loongson.cn>
Date:   Wed,  4 Nov 2020 18:53:18 +0800
From:   Youling Tang <tangyouling@...ngson.cn>
To:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc:     linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] mips: Modify the FLAGS attribute value of text segment in PHDRS

The attribute of the text segment should be read-only and executable,
FLAGS(7) should be changed to FLAGS(5), like x86, s390 architecture.

Signed-off-by: Youling Tang <tangyouling@...ngson.cn>
---
 arch/mips/boot/compressed/ld.script | 2 +-
 arch/mips/kernel/vmlinux.lds.S      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/boot/compressed/ld.script b/arch/mips/boot/compressed/ld.script
index 2ed08fb..35b0315 100644
--- a/arch/mips/boot/compressed/ld.script
+++ b/arch/mips/boot/compressed/ld.script
@@ -9,7 +9,7 @@
 OUTPUT_ARCH(mips)
 ENTRY(start)
 PHDRS {
-	text PT_LOAD FLAGS(7); /* RWX */
+	text PT_LOAD FLAGS(5); /* R_X */
 }
 SECTIONS
 {
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 5e97e9d..545c4a9 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -22,7 +22,7 @@
 OUTPUT_ARCH(mips)
 ENTRY(kernel_entry)
 PHDRS {
-	text PT_LOAD FLAGS(7);	/* RWX */
+	text PT_LOAD FLAGS(5);	/* R_X */
 #ifndef CONFIG_CAVIUM_OCTEON_SOC
 	note PT_NOTE FLAGS(4);	/* R__ */
 #endif /* CAVIUM_OCTEON_SOC */
-- 
2.1.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ