1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-23 00:20:52 -05:00
linux/fs/proc
Alexander Gordeev 3d5854d75e fs/proc/kcore.c: allow translation of physical memory addresses
When /proc/kcore is read an attempt to read the first two pages results in
HW-specific page swap on s390 and another (so called prefix) pages are
accessed instead.  That leads to a wrong read.

Allow architecture-specific translation of memory addresses using
kc_xlate_dev_mem_ptr() and kc_unxlate_dev_mem_ptr() callbacks similarily
to /dev/mem xlate_dev_mem_ptr() and unxlate_dev_mem_ptr() callbacks.  That
way an architecture can deal with specific physical memory ranges.

Re-use the existing /dev/mem callback implementation on s390, which
handles the described prefix pages swapping correctly.

For other architectures the default callback is basically NOP.  It is
expected the condition (vaddr == __va(__pa(vaddr))) always holds true for
KCORE_RAM memory type.

Link: https://lkml.kernel.org/r/20240930122119.1651546-1-agordeev@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-10-09 12:47:19 -07:00
..
array.c
base.c In the v6.12 scheduler development cycle we had 63 commits from 18 contributors: 2024-09-19 15:55:58 +02:00
bootconfig.c
cmdline.c
consoles.c proc: Add nbcon support for /proc/consoles 2024-09-04 15:56:33 +02:00
cpuinfo.c
devices.c
fd.c vfs-6.12.procfs 2024-09-16 09:36:59 +02:00
fd.h
generic.c proc: fold kmalloc() + strcpy() into kmemdup() 2024-09-09 10:51:20 +02:00
inode.c proc: use __auto_type more 2024-09-17 01:11:20 -07:00
internal.h ALong with the usual shower of singleton patches, notable patch series in 2024-09-21 07:29:05 -07:00
interrupts.c
Kconfig
kcore.c fs/proc/kcore.c: allow translation of physical memory addresses 2024-10-09 12:47:19 -07:00
kmsg.c
loadavg.c
Makefile
meminfo.c
namespaces.c
nommu.c
page.c x86: remove PG_uncached 2024-09-03 21:15:46 -07:00
proc_net.c
proc_sysctl.c sysctl: avoid spurious permanent empty tables 2024-09-02 10:37:37 +02:00
proc_tty.c
root.c
self.c
softirqs.c
stat.c
task_mmu.c Many singleton patches - please see the various changelogs for details. 2024-09-21 08:20:50 -07:00
task_nommu.c
thread_self.c
uptime.c
util.c
version.c
vmcore.c