Skip to contentSkip to conversation

arm-prctl-reject-pr_set_mdwe-on-pre-armv6.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Mar 26, 2024 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: ARM: prctl: reject PR_SET_MDWE on pre-ARMv6
has been removed from the -mm tree. Its filename was
arm-prctl-reject-pr_set_mdwe-on-pre-armv6.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Zev Weiss <[email protected]>
Subject: ARM: prctl: reject PR_SET_MDWE on pre-ARMv6
Date: Mon, 26 Feb 2024 17:35:42 -0800

On v5 and lower CPUs we can't provide MDWE protection, so ensure we fail any attempt to enable it via prctl(PR_SET_MDWE).

Previously such an attempt would misleadingly succeed, leading to any subsequent mmap(PROT_READ|PROT_WRITE) or execve() failing unconditionally (the latter somewhat violently via force_fatal_sig(SIGSEGV) due to READ_IMPLIES_EXEC).

Cc <[email protected]> [6.3+]
Cc Borislav Petkov <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Florent Revest <[email protected]>
Cc Helge Deller <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc Josh Triplett <[email protected]>
Cc Kees Cook <[email protected]>
Cc Miguel Ojeda <[email protected]>
Cc Mike Rapoport (IBM) <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Ondrej Mosnacek <[email protected]>
Cc Rick Edgecombe <[email protected]>
Cc Russell King (Oracle) <[email protected]>
Cc Sam James <[email protected]>
Cc Stefan Roesch <[email protected]>
Cc Yang Shi <[email protected]>
Cc Yin Fengwei <[email protected]>

---

 arch/arm/include/asm/mman.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/include/asm/mman.h new file +14 -0
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_MMAN_H__
+#define __ASM_MMAN_H__
+
+#include <asm/system_info.h>
+#include <uapi/asm/mman.h>
+
+static inline bool arch_memory_deny_write_exec_supported(void)
+{
+	return cpu_architecture() >= CPU_ARCH_ARMv6;
+}
+#define arch_memory_deny_write_exec_supported arch_memory_deny_write_exec_supported
+
+#endif /* __ASM_MMAN_H__ */

_

Patches currently in -mm which might be from [email protected] are