summaryrefslogtreecommitdiff
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-01 17:02:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-01 17:02:18 +0200
commit5bab5dc780c9ed0c69fc2f828015532acf4a7848 (patch)
treefe1eb13eeab8ccddd5b8281c1162e7307c12bc1c /kernel/sys.c
parentef83531c8e4a5f2fc9c602be7e2a300de1575ee4 (diff)
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
downloadlinux-next-5bab5dc780c9ed0c69fc2f828015532acf4a7848.tar.gz
linux-next-5bab5dc780c9ed0c69fc2f828015532acf4a7848.zip
Merge 6.9-rc2 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index f8e543f1e38a..8bb106a56b3a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2408,8 +2408,11 @@ static inline int prctl_set_mdwe(unsigned long bits, unsigned long arg3,
if (bits & PR_MDWE_NO_INHERIT && !(bits & PR_MDWE_REFUSE_EXEC_GAIN))
return -EINVAL;
- /* PARISC cannot allow mdwe as it needs writable stacks */
- if (IS_ENABLED(CONFIG_PARISC))
+ /*
+ * EOPNOTSUPP might be more appropriate here in principle, but
+ * existing userspace depends on EINVAL specifically.
+ */
+ if (!arch_memory_deny_write_exec_supported())
return -EINVAL;
current_bits = get_current_mdwe();