]> git.baikalelectronics.ru Git - kernel.git/commit
fs/proc/kcore.c: use __pa_symbol() for KCORE_TEXT list entries
authorJames Morse <james.morse@arm.com>
Wed, 22 Aug 2018 04:54:48 +0000 (21:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 17:52:46 +0000 (10:52 -0700)
commitec61964a705d1a972ddd6abce8ccbbd0e7cbbbab
tree44508e59a03482004bf85d3dfdad753e0f10372d
parent5cc2d9168570d5184b648d9d5ca2195db7e71262
fs/proc/kcore.c: use __pa_symbol() for KCORE_TEXT list entries

elf_kcore_store_hdr() uses __pa() to find the physical address of
KCORE_RAM or KCORE_TEXT entries exported as program headers.

This trips CONFIG_DEBUG_VIRTUAL's checks, as the KCORE_TEXT entries are
not in the linear map.

Handle these two cases separately, using __pa_symbol() for the KCORE_TEXT
entries.

Link: http://lkml.kernel.org/r/20180711131944.15252-1-james.morse@arm.com
Signed-off-by: James Morse <james.morse@arm.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Omar Sandoval <osandov@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/kcore.c