[PATCH linux dev-6.6 0/2] ARM: prctl: Reject PR_SET_MDWE where not supported

Zev Weiss zev at bewilderbeest.net
Wed Mar 27 06:49:58 AEDT 2024


[Re-sending as I forgot to CC the list the first time, apologies for
the duplication.]

OpenBMC on AST2400 has been badly broken for some time now due to
systemd services segfaulting on execve() after calls to
prctl(PR_SET_MDWE) spuriously succeeded.  The MMU of the ARMv5 CPU in
the AST2400 cannot meaningfully support MDWE because it lacks distinct
read & execute page permissions (read implies execute), so these
patches ensure that the prctl to enable MDWE properly fails on
hardware where it isn't supported.

These patches have been posted and approved upstream [0], and while at
time of writing they haven't yet reached mainline or stable upstream,
they're on their way and should hopefully get merged soon [1, 2].

Thanks,
Zev

[0] https://lore.kernel.org/linux-arm-kernel/20240227013546.15769-4-zev@bewilderbeest.net/
[1] https://lore.kernel.org/mm-commits/20240326180820.88CF4C43390@smtp.kernel.org/
[2] https://lore.kernel.org/mm-commits/20240326180821.BF06BC433C7@smtp.kernel.org/

Zev Weiss (2):
  prctl: Generalize PR_SET_MDWE support check to be per-arch
  ARM: prctl: Reject PR_SET_MDWE on pre-ARMv6

 arch/arm/include/asm/mman.h    | 14 ++++++++++++++
 arch/parisc/include/asm/mman.h | 14 ++++++++++++++
 include/linux/mman.h           |  8 ++++++++
 kernel/sys.c                   |  7 +++++--
 4 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/include/asm/mman.h
 create mode 100644 arch/parisc/include/asm/mman.h

-- 
2.44.0



More information about the openbmc mailing list