linux-next/arch/s390/kernel
Heiko Carstens f8107a8be0 s390/mm: Simplify noexec page protection handling
By default page protection definitions like PAGE_RX have the _PAGE_NOEXEC
bit set. For older machines without the instruction execution protection
facility this bit is not allowed to be used in page table entries, and
therefore must be removed.

This is done at a couple of page table walkers, but also at some but not
all page table modification functions like ptep_modify_prot_commit(). Avoid
all of this and change the page, segment and region3 protection definitions
so that the noexec bit is masked out automatically if the instruction
execution-protection facility is not available. This is similar to what
also various other architectures do which had to solve the same problem.

Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-12-17 12:46:13 +01:00
..
syscalls s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
vdso32 s390/vdso: Drop LBASE_VDSO 2024-11-02 12:37:32 +01:00
vdso64 s390/Kconfig: Select VMAP_STACK unconditionally 2024-12-10 15:41:58 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
abs_lowcore.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
alternative.c s390: Add infrastructure to patch lowcore accesses 2024-07-23 16:02:32 +02:00
asm-offsets.c ftrace updates for v6.13: 2024-11-20 11:34:10 -08:00
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
audit.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.c s390/cache: prevent rebuild of shared_cpu_list 2024-03-07 14:41:15 +01:00
cert_store.c fix missing vmalloc.h includes 2024-04-25 20:55:49 -07:00
compat_audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
compat_linux.c s390: use generic UID16 implementation 2019-01-18 09:33:18 +01:00
compat_linux.h s390/compat: cleanup compat_linux.h header file 2022-05-06 20:45:16 +02:00
compat_ptrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_signal.c s390/vdso: Move vdso symbol handling to separate header file 2024-09-13 17:28:36 +02:00
cpacf.c s390/crypto: Display Query and Query Authentication Information in sysfs 2024-09-12 14:13:27 +02:00
cpcmd.c s390/cpcmd: Convert to use flag output macros 2024-11-13 14:31:32 +01:00
cpufeature.c s390/uvdevice: autoload module based on CPU facility 2022-07-19 16:18:49 +02:00
crash_dump.c s390/kdump: Provide is_kdump_kernel() implementation 2024-10-25 16:03:23 +02:00
ctlreg.c s390/ctlreg: add system_ctl_load() 2023-09-19 13:26:57 +02:00
debug.c s390/debug: Pass in and enforce output buffer size for format handlers 2024-11-21 12:44:06 +01:00
diag.c s390/diag: Convert to use flag output macros 2024-11-13 14:31:33 +01:00
dis.c s390/disassembler: Remove duplicate instruction format RSY_RDRU 2024-09-12 14:13:27 +02:00
dumpstack.c s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
early_printk.c s390/early: Dump register contents and call trace for early crashes 2024-08-22 19:28:11 +02:00
early.c s390/setup: Recognize sequential instruction fetching facility 2024-08-29 22:56:34 +02:00
ebcdic.c s390/ebcdic: fix typo in comment 2023-07-27 13:11:35 +02:00
entry.h s390/switch_to: use generic header file 2024-02-12 15:03:33 +01:00
entry.S s390/Kconfig: Select VMAP_STACK unconditionally 2024-12-10 15:41:58 +01:00
facility.c KVM: s390: vsie: Fix length of facility list shadowed 2023-12-23 10:41:09 +01:00
fpu.c s390/fpu: Re-add exception handling in load_fpu_state() 2024-07-31 16:30:20 +02:00
ftrace.c ftrace: Make ftrace_regs abstract from direct use 2024-10-10 20:18:01 -04:00
ftrace.h s390/ftrace: Remove unused ftrace_plt_template* 2024-08-27 20:16:48 +02:00
guarded_storage.c s390: use control register bit defines 2023-09-19 13:26:57 +02:00
head64.S s390/head64: Make startup code ready for lowcore relocation 2024-07-23 16:02:32 +02:00
hiperdispatch.c s390/hiperdispatch: Add hiperdispatch debug counters 2024-08-29 22:56:35 +02:00
idle.c s390/idle: Remove duplicate get_lowcore() calls 2024-06-18 17:01:33 +02:00
ima_arch.c s390/kexec_file: Disable kexec_load when IPLed secure 2019-04-29 10:44:03 +02:00
ipl_vmparm.c s390/cio: remove unused include linux/spinlock.h from cio.h 2021-07-27 09:39:13 +02:00
ipl.c s390/dump: Add firmware sysfs attribute for dump area size 2024-11-12 14:01:27 +01:00
irq.c A set of updates for the interrupt subsystem: 2024-11-19 15:54:19 -08:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kdebugfs.c s390: no need to check return value of debugfs_create functions 2019-01-28 15:58:55 +01:00
kexec_elf.c s390, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kexec_image.c s390, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
kprobes.c s390/entry: Mark IRQ entries to fix stack depot warnings 2024-11-21 12:44:07 +01:00
lgr.c s390/lgr: use simple assignment instead of memcpy 2022-02-06 23:31:29 +01:00
machine_kexec_file.c s390, crash: wrap crash dumping code into crash related ifdefs 2024-02-23 17:48:23 -08:00
machine_kexec_reloc.c s390/kaslr: add support for R_390_JMP_SLOT relocation type 2020-05-20 10:13:27 +02:00
machine_kexec.c s390/kdump: Make kdump ready for lowcore relocation 2024-07-23 16:02:32 +02:00
Makefile s390/crypto: Display Query and Query Authentication Information in sysfs 2024-09-12 14:13:27 +02:00
mcount.S s390: Use MARCH_HAS_*_FEATURES defines 2024-09-07 17:12:42 +02:00
module.c arch: make execmem setup available regardless of CONFIG_MODULES 2024-05-14 00:31:44 -07:00
nmi.c s390/nmi: Remove duplicate get_lowcore() calls 2024-06-18 17:01:33 +02:00
nospec-branch.c s390/nospec: Push down alternative handling 2024-07-23 16:02:31 +02:00
nospec-sysfs.c s390/nospec: Switch over to sysfs_emit() 2024-10-25 16:03:24 +02:00
numa.c arch, mm: move definition of node_data to generic code 2024-09-03 21:15:28 -07:00
os_info.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
perf_cpum_cf_events.c s390/cpum_cf: make crypto counters upward compatible across machine types 2024-04-09 17:29:56 +02:00
perf_cpum_cf.c s390/perf_cpum_cf: Convert to use local64_try_cmpxchg() 2024-11-12 14:01:29 +01:00
perf_cpum_sf.c s390/cpum_sf: Simplify release of SDBs and SDBTs 2024-11-21 12:44:07 +01:00
perf_event.c Performance events changes for v6.13: 2024-11-19 13:34:06 -08:00
perf_pai_crypto.c s390/pai_crypto: Add support for MSA 10 and 11 pai counters 2024-09-05 15:17:23 +02:00
perf_pai_ext.c s390/pai_ext: Update PAI extension 1 counters 2024-09-05 15:17:23 +02:00
perf_regs.c s390/fpu: remove anonymous union from struct fpu 2024-02-16 14:30:16 +01:00
process.c s390: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
processor.c s390/alternatives: Move text sync functions 2024-07-23 16:02:31 +02:00
ptrace.c s390/fpu: remove anonymous union from struct fpu 2024-02-16 14:30:16 +01:00
reipl.S s390/kdump: Make kdump ready for lowcore relocation 2024-07-23 16:02:32 +02:00
relocate_kernel.S s390/relocate_kernel: adjust indentation 2023-04-19 17:24:18 +02:00
rethook.c s390/rethook: add local rethook header file 2023-02-06 11:13:53 +01:00
rethook.h s390/rethook: add local rethook header file 2023-02-06 11:13:53 +01:00
runtime_instr.c s390/runtime_instrumentation: fix storage key handling 2020-08-17 13:17:10 +02:00
setup.c s390/mm: Simplify noexec page protection handling 2024-12-17 12:46:13 +01:00
signal.c s390/vdso: Move vdso symbol handling to separate header file 2024-09-13 17:28:36 +02:00
smp.c s390/smp: Switch over to sysfs_emit() 2024-10-25 16:03:24 +02:00
stacktrace.c s390/stacktrace: Use break instead of return statement 2024-11-21 12:44:07 +01:00
sthyi.c s390/sthyi: Convert to use flag output macros 2024-11-13 14:31:31 +01:00
syscall.c s390 updates for 6.11 merge window 2024-07-18 15:41:45 -07:00
sysinfo.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
text_amode31.S s390/hypfs_diag0c: fix virtual vs physical address confusion 2024-02-09 13:58:13 +01:00
time.c Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
topology.c s390/topology: Convert to use flag output macros 2024-11-13 14:31:31 +01:00
trace.c s390/ftrace: fix potential crashes when switching tracers 2020-04-22 16:20:55 +02:00
traps.c s390/mm/fault: Handle guest-related program interrupts in KVM 2024-10-29 11:49:18 +01:00
unwind_bc.c s390/unwind: disable KMSAN checks 2024-07-03 19:30:25 -07:00
uprobes.c s390/switch_to: use generic header file 2024-02-12 15:03:33 +01:00
uv.c s390/uv: Retrieve UV secrets sysfs support 2024-10-29 11:17:17 +01:00
vdso.c s390/vdso: Wire up getrandom() vdso implementation 2024-09-13 20:57:31 +02:00
vmcore_info.c s390: Remove __bootdata annotations from declarations 2024-12-15 16:19:04 +01:00
vmlinux.lds.S asm-generic updates for 6.12 2024-09-26 11:54:40 -07:00
vtime.c s390/vtime: Remove duplicate get_lowcore() calls 2024-06-18 17:01:33 +02:00
wti.c s390/wti: Add debugfs file to display missed grace periods per cpu 2024-08-29 22:56:35 +02:00