From: Ard Biesheuvel <ard.biesheu...@linaro.org> To avoid issues with the /proc/kcore code getting confused about the kernels block mappings in the VMALLOC region, enable the existing facility that describes the [_text, _end) interval as a separate KCORE_TEXT region, which supersedes the KCORE_VMALLOC region that it intersects with on arm64.
Reported-by: Tan Xiaojun <tanxiao...@huawei.com> Tested-by: Tan Xiaojun <tanxiao...@huawei.com> Tested-by: Mark Rutland <mark.rutl...@arm.com> Acked-by: Mark Rutland <mark.rutl...@arm.com> Reviewed-by: Laura Abbott <labb...@redhat.com> Reviewed-by: Jiri Olsa <jo...@kernel.org> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Will Deacon <will.dea...@arm.com> [ To fix following Call Trace when accessing /proc/kcore [ 3637.649161] Call trace: [ 3637.649561] Exception stack(0xffffffc01d5dfaf0 to 0xffffffc01d5dfc20) [ 3637.650306] fae0: ffffff80085ff800 0000008000000000 [ 3637.651183] fb00: ffffffc01d5dfcc0 ffffff80081d0228 ffffffc01d5f4b80 ffffffc01ffe0050 [ 3637.652091] fb20: ffffffc01ffe0050 ffffffc01d5f4b80 0000034ef3b32e60 ffffff80089789a0 [ 3637.652970] fb40: ffffff800871b124 ffffffc01d5f1e60 ffffffc01d5dfb90 ffffff80080d6b1c [ 3637.653848] fb60: ffffffc01ffe0000 ffffffc01d5f4b00 ffffffc01ffe0050 ffffffc01d5f4b80 [ 3637.654733] fb80: ffffff800895d000 ffffffc01d5f4b80 00c0000040400791 ffffffc01fffe210 [ 3637.655600] fba0: 0000000040000000 ffffff80089c8ac8 0000000000000004 0000000000001f0b [ 3637.656481] fbc0: 0000000000000800 ffffff80089c8ac8 0000000000000000 0000000000000800 [ 3637.657353] fbe0: 0000007fd127f1e0 0000000000000012 1a13110001000415 00000016170f120a [ 3637.658231] fc00: 0000000000000012 0000000000000011 ffffff80081f9120 0000007fa8d49f28 [ 3637.659130] [<ffffff80081d0228>] vmalloc_to_page+0xb8/0xd0 [ 3637.659811] [<ffffff80081d37d4>] vread+0x1a4/0x2c0 [ 3637.660420] [<ffffff8008274124>] read_kcore+0x2ac/0x3d8 [ 3637.661052] [<ffffff8008265554>] proc_reg_read+0x8c/0xd0 [ 3637.661694] [<ffffff80081f66a0>] __vfs_read+0x48/0x80 [ 3637.662313] [<ffffff80081f7b7c>] vfs_read+0x8c/0x128 [ 3637.662914] [<ffffff80081f9174>] SyS_read+0x54/0xb0 [ 3637.663512] [<ffffff8008083730>] el0_svc_naked+0x24/0x28 ] Signed-off-by: He Zhe <zhe...@windriver.com> --- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b2024db..233611a 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -244,6 +244,9 @@ config PGTABLE_LEVELS config ARCH_SUPPORTS_UPROBES def_bool y +config ARCH_PROC_KCORE_TEXT + def_bool y + source "init/Kconfig" source "kernel/Kconfig.freezer" -- 2.8.1 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto