diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-19 08:57:14 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-19 09:02:22 -0400 |
| commit | a96cb3bf390eebfead5fc7a2092f8452a7997d1b (patch) | |
| tree | d0e16dc3e903ce705f85c4c334d750b4b304a0f0 /kernel/sys.c | |
| parent | 1ab157ce573f5abd932b72679a7c67b1ed0bff13 (diff) | |
| parent | b377c66ae3509ccea596512d6afb4777711c4870 (diff) | |
Merge x86 bugfixes from Linux 6.9-rc3
Pull fix for SEV-SNP late disable bugs.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kernel/sys.c')
| -rw-r--r-- | kernel/sys.c | 7 |
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(); |
