The patch titled Subject: fs/proc/kcore.c: use __pa_symbol() for KCORE_TEXT list entries has been added to the -mm tree. Its filename is proc-kcore-use-__pa_symbol-for-kcore_text-list-entries.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/proc-kcore-use-__pa_symbol-for-kcore_text-list-entries.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/proc-kcore-use-__pa_symbol-for-kcore_text-list-entries.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: James Morse <james.morse@xxxxxxx> Subject: 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@xxxxxxx Signed-off-by: James Morse <james.morse@xxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: Omar Sandoval <osandov@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/kcore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/proc/kcore.c~proc-kcore-use-__pa_symbol-for-kcore_text-list-entries fs/proc/kcore.c --- a/fs/proc/kcore.c~proc-kcore-use-__pa_symbol-for-kcore_text-list-entries +++ a/fs/proc/kcore.c @@ -384,8 +384,10 @@ static void elf_kcore_store_hdr(char *bu phdr->p_flags = PF_R|PF_W|PF_X; phdr->p_offset = kc_vaddr_to_offset(m->addr) + dataoff; phdr->p_vaddr = (size_t)m->addr; - if (m->type == KCORE_RAM || m->type == KCORE_TEXT) + if (m->type == KCORE_RAM) phdr->p_paddr = __pa(m->addr); + else if (m->type == KCORE_TEXT) + phdr->p_paddr = __pa_symbol(m->addr); else phdr->p_paddr = (elf_addr_t)-1; phdr->p_filesz = phdr->p_memsz = m->size; _ Patches currently in -mm which might be from james.morse@xxxxxxx are proc-kcore-use-__pa_symbol-for-kcore_text-list-entries.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html