From 8b752d7b95f96402d4d8d3018fb938c3d24c53a8 Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Wed, 27 May 2015 10:43:54 -0400 Subject: [PATCH] Fix for the handling of ARM64 kernel module per-cpu symbols. Without the patch, if the debuginfo data of an ARM64 kernel module that contains a per-cpu section is loaded by "mod -s " or "mod -S", commands such as "bt" or "sym" may incorrectly translate the module's virtual addresses to symbol names. (Jan.Karlsson@sonymobile.com) --- symbols.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/symbols.c b/symbols.c index f8c66a3..6acfcae 100644 --- a/symbols.c +++ b/symbols.c @@ -4443,7 +4443,12 @@ retry: */ splast = NULL; for ( ; sp <= sp_end; sp++) { - if (value == sp->value) { + if (machine_type("ARM64") && + IN_MODULE_PERCPU(sp->value, lm) && + !IN_MODULE_PERCPU(value, lm)) + continue; + + if (value == sp->value) { if (MODULE_END(sp) || MODULE_INIT_END(sp)) break;