sst-linux/arch/s390/kernel
Heiko Carstens 0ee8425d0c s390/vmlinux.lds.S: Move ro_after_init section behind rodata section
[ Upstream commit 75c10d5377d8821efafed32e4d72068d9c1f8ec0 ]

The .data.rel.ro and .got section were added between the rodata and
ro_after_init data section, which adds an RW mapping in between all RO
mapping of the kernel image:

---[ Kernel Image Start ]---
0x000003ffe0000000-0x000003ffe0e00000        14M PMD RO X
0x000003ffe0e00000-0x000003ffe0ec7000       796K PTE RO X
0x000003ffe0ec7000-0x000003ffe0f00000       228K PTE RO NX
0x000003ffe0f00000-0x000003ffe1300000         4M PMD RO NX
0x000003ffe1300000-0x000003ffe1331000       196K PTE RO NX
0x000003ffe1331000-0x000003ffe13b3000       520K PTE RW NX <---
0x000003ffe13b3000-0x000003ffe13d5000       136K PTE RO NX
0x000003ffe13d5000-0x000003ffe1400000       172K PTE RW NX
0x000003ffe1400000-0x000003ffe1500000         1M PMD RW NX
0x000003ffe1500000-0x000003ffe1700000         2M PTE RW NX
0x000003ffe1700000-0x000003ffe1800000         1M PMD RW NX
0x000003ffe1800000-0x000003ffe187e000       504K PTE RW NX
---[ Kernel Image End ]---

Move the ro_after_init data section again right behind the rodata
section to prevent interleaving RO and RW mappings:

---[ Kernel Image Start ]---
0x000003ffe0000000-0x000003ffe0e00000        14M PMD RO X
0x000003ffe0e00000-0x000003ffe0ec7000       796K PTE RO X
0x000003ffe0ec7000-0x000003ffe0f00000       228K PTE RO NX
0x000003ffe0f00000-0x000003ffe1300000         4M PMD RO NX
0x000003ffe1300000-0x000003ffe1353000       332K PTE RO NX
0x000003ffe1353000-0x000003ffe1400000       692K PTE RW NX
0x000003ffe1400000-0x000003ffe1500000         1M PMD RW NX
0x000003ffe1500000-0x000003ffe1700000         2M PTE RW NX
0x000003ffe1700000-0x000003ffe1800000         1M PMD RW NX
0x000003ffe1800000-0x000003ffe187e000       504K PTE RW NX
---[ Kernel Image End ]---

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:10:24 +02:00
..
syscalls syscalls: fix compat_sys_io_pgetevents_time64 usage 2024-07-05 09:31:59 +02:00
vdso32 s390/vdso: Use standard stack frame layout 2024-06-12 11:03:43 +02:00
vdso64 s390/vdso: Use standard stack frame layout 2024-06-12 11:03:43 +02:00
.gitignore
abs_lowcore.c
alternative.c
asm-offsets.c
audit.c
audit.h
cache.c s390/cache: prevent rebuild of shared_cpu_list 2024-03-26 18:20:40 -04:00
compat_audit.c
compat_linux.c
compat_linux.h
compat_ptrace.h
compat_signal.c
cpcmd.c
cpufeature.c
crash_dump.c
debug.c
diag.c
dis.c
dumpstack.c
early_printk.c
early.c s390/smp,mcck: fix early IPI handling 2024-08-29 17:30:29 +02:00
earlypgm.S
ebcdic.c
entry.h
entry.S s390/entry: align system call table on 8 bytes 2024-04-10 16:28:33 +02:00
fpu.c
ftrace.c
ftrace.h
guarded_storage.c
head64.S s390/early: fix sclp_early_sccb variable lifetime 2023-03-10 09:32:53 +01:00
idle.c s390/idle: mark arch_cpu_idle() noinstr 2023-03-10 09:33:52 +01:00
ima_arch.c
ipl_vmparm.c
ipl.c s390/ipl: Fix incorrect initialization of nvme dump block 2024-06-12 11:03:43 +02:00
irq.c
jump_label.c
kdebugfs.c
kexec_elf.c
kexec_image.c
kprobes_insn_page.S
kprobes.c s390/kprobes: fix current_kprobe never cleared after kprobes reenter 2023-03-10 09:34:04 +01:00
lgr.c
machine_kexec_file.c
machine_kexec_reloc.c
machine_kexec.c
Makefile rethook, fprobe: do not trace rethook related functions 2023-05-24 17:32:53 +01:00
mcount.S
module.c
nmi.c
nospec-branch.c
nospec-sysfs.c
numa.c
os_info.c
perf_cpum_cf_common.c
perf_cpum_cf_events.c
perf_cpum_cf.c s390/cpumf: support user space events for counting 2024-01-10 17:10:30 +01:00
perf_cpum_sf.c
perf_event.c
perf_pai_crypto.c s390/pai: fix attr_event_free upper limit for pai device drivers 2024-03-26 18:20:34 -04:00
perf_pai_ext.c s390/pai: fix attr_event_free upper limit for pai device drivers 2024-03-26 18:20:34 -04:00
perf_regs.c
process.c
processor.c
ptrace.c s390/ptrace: handle setting of fpc register correctly 2024-02-05 20:12:49 +00:00
reipl.S
relocate_kernel.S
runtime_instr.c
setup.c s390/boot: Remove alt_stfle_fac_list from decompressor 2024-06-12 11:03:44 +02:00
signal.c
smp.c s390/smp,mcck: fix early IPI handling 2024-08-29 17:30:29 +02:00
stacktrace.c
sthyi.c KVM: s390: fix sthyi error handling 2023-08-11 12:08:11 +02:00
syscall.c
sysinfo.c
text_amode31.S
time.c
topology.c s390/topology: honour nr_cpu_ids when adding CPUs 2023-06-09 10:34:13 +02:00
trace.c
traps.c
unwind_bc.c
uprobes.c
uv.c s390/uv: Don't call folio_wait_writeback() without a folio reference 2024-08-03 08:49:12 +02:00
vdso.c
vmlinux.lds.S s390/vmlinux.lds.S: Move ro_after_init section behind rodata section 2024-09-12 11:10:24 +02:00
vtime.c s390/vtime: fix average steal time calculation 2024-03-26 18:20:59 -04:00