From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423051AbcBZUV4 (ORCPT ); Fri, 26 Feb 2016 15:21:56 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:55017 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422697AbcBZUVy (ORCPT ); Fri, 26 Feb 2016 15:21:54 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Ard Biesheuvel , mmarek@suse.cz, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kallsyms: ignore ARM mode switching veneers Date: Fri, 26 Feb 2016 21:21:22 +0100 Message-ID: <2625557.ANpx9Yzf9D@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1456516254-15615-1-git-send-email-ard.biesheuvel@linaro.org> References: <1456516254-15615-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:v4FKr60TwmN3wwJ+Nne5W75um72pxxuFxLPrr+7cdv9xx9vE9Gj /Cii6+nftqE90zsOTCYzN3LBCeqq7oaWCyPute5yPva8+dw0gCM1COU4ou5i/FzwrF4+K3b +GSmgodkWlQpz36cpgvpYzs71v0vOs2N5pT/CUwjg9rt7VRUFBFwNl17aT4Fltmbkk8Um5V VBRWUBbqO0PQmjILbE9Fg== X-UI-Out-Filterresults: notjunk:1;V01:K0:ewg9aYkJmsY=:1aoxtla9XJG19eV479+eHv mLY3Ta3pR933b0Smt8t2240Htc/TfrVnexJ2G8erk3SEC+3BOV/E+UZlYVOptp01LRYD43IgL oKixfqZdFNCe62NXBJhByHlNOQm8oILfgo9u6TbA9v2n+L4gXztv7SK9x5zpZb/TBhRYecqP3 QgIqjvf1rshy1L9I4N4e/W6UsOAg+LI2kRxVBO+3ayyXjFB8TlFwW8LZemPUXufpOagJwaYT/ sb7B5QQZDG9QvavxucIGQV4fVvxwzPY2jviX7/Xg4B/KCUheNalOCJUAl2rR6bZYr6RINg9EL r7ZIIVhbmsTYt9JnSNaVY//Xu+1ie0yK57HCj7vxRJ7A1V+fV0rS9BfGhFsJwOm9ksgEaOJCy z2Vj1EvSE6SMPmZoOM8/D311XEwm66S/zFzAFhDIcXYyq8rPOQcMDhsT3KIt2FuDf4nNLgPWt zAEEOi92+Lr6ju9WsnLBORGWAAdthvtEW8AGEym3jVxTdpz5tzdvmVMmMElAhPKc30JrGWu9e uYvA+Z9pCdn/qM9ScR7SexgjmpFQ6IkTIWemkQOCVehVNjfnX1GK2vlFNVGA3eJfhQztMRO2j EGVoTLARLQJ/w3JjXwcbZa7RkubF/T7F9bhwGMHgMRp9In9xKJXBxUxMQmANzdvjr6Gy9WwVF Oz69Ml9EA+0p87iBBeJec2tEk8+OAJYp/ELtT2E/uNPxMIVmrm0dnGIdnoaQgdV6EtFnnls7d iO6UmM8N99C0FLw3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 26 February 2016 20:50:54 Ard Biesheuvel wrote: > On ARM, the linker may emit veneers to deal with relative branch > instructions that appear too far away from their targets. Since the second > kallsyms pass results in an increase of the kernel size, it may result in > additional veneers to be emitted, potentially affecting the output of > kallsyms itself if these symbols are visible to it, and for that reason, > symbols whose names end in '_veneer' are ignored explicitly. > > However, when building Thumb2 kernels, such veneers are named differently > if they also incur a mode switch, and since they are not filtered by > kallsyms, they may cause the build to fail. So filter symbols whose names > end in '_from_arm' or '_from_thumb' as well. > > Cc: Arnd Bergmann > Signed-off-by: Ard Biesheuvel Thanks again for debugging this! I have two (randconfig) configurations that ran into this problem, and they are both with your patch Tested-by: Arnd Bergmann > scripts/kallsyms.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c > index 8fa81e84e295..e2379de76563 100644 > --- a/scripts/kallsyms.c > +++ b/scripts/kallsyms.c > @@ -215,6 +215,8 @@ static int symbol_valid(struct sym_entry *s) > > static char *special_suffixes[] = { > "_veneer", /* arm */ > + "_from_arm", /* arm */ > + "_from_thumb", /* arm */ > NULL }; > > int i; >