aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorWill Deacon <[email protected]>2019-09-11 13:26:46 +0100
committerJessica Yu <[email protected]>2019-09-11 18:53:30 +0200
commit069e1c07c18ac2ccecdfb5ac287a37d6fb2d7a00 (patch)
tree96f7b9ee7080adeb85d4804102502d0f24c41320 /tools/perf/scripts/python/exported-sql-viewer.py
parent32bca2df7da27be34371a37f9bb5e2b85fdd92bd (diff)
module: Fix link failure due to invalid relocation on namespace offset
Commit 8651ec01daed ("module: add support for symbol namespaces.") broke linking for arm64 defconfig: | lib/crypto/arc4.o: In function `__ksymtab_arc4_setkey': | arc4.c:(___ksymtab+arc4_setkey+0x8): undefined reference to `no symbol' | lib/crypto/arc4.o: In function `__ksymtab_arc4_crypt': | arc4.c:(___ksymtab+arc4_crypt+0x8): undefined reference to `no symbol' This is because the dummy initialisation of the 'namespace_offset' field in 'struct kernel_symbol' when using EXPORT_SYMBOL on architectures with support for PREL32 locations uses an offset from an absolute address (0) in an effort to trick 'offset_to_pointer' into behaving as a NOP, allowing non-namespaced symbols to be treated in the same way as those belonging to a namespace. Unfortunately, place-relative relocations require a symbol reference rather than an absolute value and, although x86 appears to get away with this due to placing the kernel text at the top of the address space, it almost certainly results in a runtime failure if the kernel is relocated dynamically as a result of KASLR. Rework 'namespace_offset' so that a value of 0, which cannot occur for a valid namespaced symbol, indicates that the corresponding symbol does not belong to a namespace. Cc: Matthias Maennich <[email protected]> Cc: Jessica Yu <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Catalin Marinas <[email protected]> Fixes: 8651ec01daed ("module: add support for symbol namespaces.") Reported-by: kbuild test robot <[email protected]> Tested-by: Matthias Maennich <[email protected]> Tested-by: Ard Biesheuvel <[email protected]> Reviewed-by: Matthias Maennich <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Jessica Yu <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions