linux/arch/powerpc
Christophe Leroy 18f0b0b162 powerpc/8xx: Fix kernel vs user address comparison
[ Upstream commit 65a82e117f ]

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>
History 2024-10-17 15:10:53 +02:00
..
boot powerpc/boot: Only free if realloc() succeeds 2024-09-04 13:23:26 +02:00
configs powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC 2024-08-19 05:45:27 +02:00
crypto powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
include powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt. 2024-08-19 05:45:51 +02:00
kernel powerpc/8xx: Fix kernel vs user address comparison 2024-10-17 15:10:53 +02:00
kexec powerpc: Set crashkernel offset to mid of RMA region 2022-04-13 20:59:03 +02:00
kvm powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() 2024-08-19 05:45:25 +02:00
lib powerpc: xor_vmx: Add '-mhard-float' to CFLAGS 2024-04-10 16:19:30 +02:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 12:35:21 +02:00
mm powerpc/8xx: Fix initial memory mapping 2024-10-17 15:10:53 +02:00
net powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06 2022-02-01 17:27:09 +01:00
perf powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks 2024-03-26 18:21:30 -04:00
platforms powerpc/32: Remove the 'nobats' kernel parameter 2024-10-17 15:10:53 +02:00
purgatory powerpc/purgatory: remove PGO flags 2023-06-21 15:59:14 +02:00
sysdev powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu 2024-09-04 13:23:23 +02:00
tools powerpc/64: Add UADDR64 relocation support 2022-05-09 09:14:44 +02:00
xmon powerpc/xmon: Fix disassembly CPU feature checks 2024-08-19 05:45:06 +02:00
Kbuild powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00
Kconfig powerpc/memhotplug: Add add_pages override for PPC 2022-07-07 17:53:28 +02:00
Kconfig.debug powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y 2023-07-23 13:47:29 +02:00
Makefile powerpc: remove checks for binutils older than 2.25 2024-01-25 14:52:32 -08:00
Makefile.postlink powerpc: unrel_branch_check.sh: use nm to find symbol value 2020-09-02 11:00:22 +10:00