• Zev Weiss's avatar
    ARM: prctl: reject PR_SET_MDWE on pre-ARMv6 · 166ce846
    Zev Weiss authored
    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).
    
    Link: https://lkml.kernel.org/r/20240227013546.15769-6-zev@bewilderbeest.netSigned-off-by: default avatarZev Weiss <zev@bewilderbeest.net>
    Cc: <stable@vger.kernel.org>	[6.3+]
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Florent Revest <revest@chromium.org>
    Cc: Helge Deller <deller@gmx.de>
    Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
    Cc: Josh Triplett <josh@joshtriplett.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Miguel Ojeda <ojeda@kernel.org>
    Cc: Mike Rapoport (IBM) <rppt@kernel.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Ondrej Mosnacek <omosnace@redhat.com>
    Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
    Cc: Russell King (Oracle) <linux@armlinux.org.uk>
    Cc: Sam James <sam@gentoo.org>
    Cc: Stefan Roesch <shr@devkernel.io>
    Cc: Yang Shi <yang@os.amperecomputing.com>
    Cc: Yin Fengwei <fengwei.yin@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    166ce846
mman.h 369 Bytes