sst-linux/arch/powerpc
Christophe Leroy a39de4afc5 powerpc/8xx: Fix kernel vs user address comparison
[ Upstream commit 65a82e117ffeeab0baf6f871a1cab11a28ace183 ]

Since commit 9132a2e82a ("powerpc/8xx: Define a MODULE area below
kernel text"), module exec space is below PAGE_OFFSET so not only
space above PAGE_OFFSET, but space above TASK_SIZE need to be seen
as kernel space.

Until now the problem went undetected because by default TASK_SIZE
is 0x8000000 which means address space is determined by just
checking upper address bit. But when TASK_SIZE is over 0x80000000,
PAGE_OFFSET is used for comparison, leading to thinking module
addresses are part of user space.

Fix it by using TASK_SIZE instead of PAGE_OFFSET for address
comparison.

Fixes: 9132a2e82a ("powerpc/8xx: Define a MODULE area below kernel text")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/3f574c9845ff0a023b46cb4f38d2c45aecd769bd.1724173828.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:20:53 +02:00
..
boot powerpc/boot: Only free if realloc() succeeds 2024-08-29 17:30:37 +02:00
configs powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC 2024-08-03 08:48:52 +02:00
crypto
include powerpc/64e: remove unused IBM HTW code 2024-09-12 11:10:28 +02:00
kernel powerpc/8xx: Fix kernel vs user address comparison 2024-10-17 15:20:53 +02:00
kexec powerpc/kexec_file: fix cpus node update to FDT 2024-08-03 08:49:19 +02:00
kvm powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() 2024-08-03 08:49:50 +02:00
lib powerpc: xor_vmx: Add '-mhard-float' to CFLAGS 2024-04-03 15:19:31 +02:00
math-emu
mm powerpc/8xx: Fix initial memory mapping 2024-10-17 15:20:53 +02:00
net powerpc/bpf: enforce full ordering for ATOMIC operations with BPF_FETCH 2024-06-16 13:41:42 +02:00
perf powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks 2024-03-26 18:20:52 -04:00
platforms powerpc/pseries: Avoid hcall in plpks_is_available() on non-pseries 2024-08-03 08:49:53 +02:00
purgatory
sysdev powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu 2024-08-29 17:30:33 +02:00
tools
xmon powerpc/xmon: Fix disassembly CPU feature checks 2024-08-03 08:49:22 +02:00
Kbuild
Kconfig Revert "powerpc/64s: Increase default stack size to 32KB" 2024-01-31 16:17:10 -08:00
Kconfig.debug
Makefile powerpc: remove checks for binutils older than 2.25 2024-01-25 15:27:18 -08:00
Makefile.postlink