projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36f0620
)
fs/proc/kcore.c: use __pa_symbol() for KCORE_TEXT list entries
author
James Morse
<
[email protected]
>
Wed, 22 Aug 2018 04:54:48 +0000
(21:54 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 22 Aug 2018 17:52:46 +0000
(10:52 -0700)
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/
[email protected]
Signed-off-by: James Morse <
[email protected]
>
Cc: Alexey Dobriyan <
[email protected]
>
Cc: Omar Sandoval <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/kcore.c
patch
|
blob
|
history
diff --git
a/fs/proc/kcore.c
b/fs/proc/kcore.c
index e64ecb9f272090bf6b23772a0d36e56b63b8106a..66c373230e60ef5afcead2bba922b49f707073c8 100644
(file)
--- a/
fs/proc/kcore.c
+++ b/
fs/proc/kcore.c
@@
-384,8
+384,10
@@
static void elf_kcore_store_hdr(char *bufp, int nphdr, int dataoff)
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;