summaryrefslogtreecommitdiff
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2024-04-01 10:08:18 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2024-04-01 10:08:18 +0200
commitb82779648dfd3814df4e381f086326ec70fd791f (patch)
tree59868a9860d907e232275d7a5a667e91213e6aa9 /kernel/sys.c
parentfe19aab844ad76a4e001082f633b1ac34f2a943d (diff)
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
Merge tag 'v6.9-rc2' into media_stage
Linux 6.9-rc2 This is needed to pull in commit 11763a8598f88 ("fs/9p: fix uaf in in v9fs_stat2inode_dotl"), which fixes the broken virtme. With this fix the media regression tests can be run again without crashing.
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();