summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2023-08-25 14:29:50 +0200
committerHeiko Carstens <hca@linux.ibm.com>2023-08-30 11:03:27 +0200
commita6e49f10f4411ec87f16ccb1b0ce5ea7e4a04a95 (patch)
tree4c3517ef04721f2b9d76afed2d0b0f7543c8363c /arch/s390
parent3eeb07788ff05b30e2ddad39561d53495563e63a (diff)
downloadlinux-stable-a6e49f10f4411ec87f16ccb1b0ce5ea7e4a04a95.tar.gz
linux-stable-a6e49f10f4411ec87f16ccb1b0ce5ea7e4a04a95.tar.bz2
linux-stable-a6e49f10f4411ec87f16ccb1b0ce5ea7e4a04a95.zip
s390/mm: improve description of mapping permissions of prefix pages
Slightly improve the description which explains why the first prefix page must be mapped executable when the BEAR-enhancement facility is not installed. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/mm/vmem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index 9b31dc565bc5..a1e01542790b 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -659,8 +659,11 @@ void __init vmem_map_init(void)
(unsigned long)(_einittext - _sinittext) >> PAGE_SHIFT);
set_memory_rox((unsigned long)__stext_amode31,
(unsigned long)(__etext_amode31 - __stext_amode31) >> PAGE_SHIFT);
-
- /* lowcore must be executable for LPSWE */
+ /*
+ * If the BEAR-enhancement facility is not installed the first
+ * prefix page is used to return to the previous context with
+ * an LPSWE instruction and therefore must be executable.
+ */
if (!static_key_enabled(&cpu_has_bear))
set_memory_x(0, 1);
if (debug_pagealloc_enabled()) {