Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp57803rdb; Wed, 14 Feb 2024 12:35:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYE0i2iSwsvPMGI2u88SKvP3J0jv8qSdQJs0cMrUQf3JtDVBGFiFx4pJ60PisN1FfBcEk5smBP/1Oao4RpLHUR377np8syoYCI8UGj9w== X-Google-Smtp-Source: AGHT+IHHF3YXkypxgMTuGRfrwngQXmKF6vrhjTd/T9HjhfO8ouOg7yvP2YJBpaOTJe2uMyjWlx+G X-Received: by 2002:a05:6402:657:b0:561:f757:631c with SMTP id u23-20020a056402065700b00561f757631cmr2773191edx.6.1707942911981; Wed, 14 Feb 2024 12:35:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707942911; cv=pass; d=google.com; s=arc-20160816; b=iSGmoSmICl8aOONLyMAPGaqan75elBHKyVoMYVs/fJmVA4Piq0+/MHFCyxx8QxsPKx Mbs7NTSwIs9MFLaQj0EH+XdkC7i7/3+/96Ax6vWaO/vboJzCfgcyAQ/yPlChBWaGJcq/ V09+pf3xvHbOlR6Ztm/rYSnbQGZSgHqsVm4+bHizJSb5ln6ps17udgBkuOg5jUAmB1+w A7l7VDdTAkn0TQUoY21usxBMwsC0VP3BcZq355XNhJiQ2259ymKZt9yV0858xDJ5MB7k fpBy97pQnXqYEtCjvHmX3FocjgxL5OAB9/olg6eLnfYWI2Gcwen8r6Mv0bfp22lhOtDZ 5MPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=2gNxIWd2S2q0dArMKjM6O9c93TW4De7HG3oEaxA6Fes=; fh=+Qc9Ual+ikYufQIAAA7L8xN4sW5VwFzExyyiFtqml00=; b=rkLs4OvAd8YoB5kgIPeyjk5Y/lUpthFYXk/c0Hz/uYom6nqCKtynFAyPYQ0W4F1O4r 2QoZF+SNODYNwKqvveHXdWG70IPJRxyan1pS29ITfprarsT/0qDIL8BW7TLtzWrgljco SEJizzTQ2s1etv07WtokZPMpU45HvwBQ+5MP5YZrqO87C5uQTGqD8lhL6dWlJ3BX7Naz G6MsbgdlQRL+8rxl77tndt8/FkCOvDdol1gXxm0g2JnYPNxsW3hMP3KErfS2sYuaKLie zOi8s67Wxg03bj0j4YavtJJKMjEIuLy7xHf26bUco5543Lo2l/tNpvgIeQtZW/7DOfxj ZTKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HtxsjtZw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCVRAYsNHMIheWvhGBj/JLJNAHZuojyhz28PrcjbpB8X478qzGOAdrA6PZeVI4HfNopXFhWyRTz4ERgtK7sLQ8QlVyEfgAnAqL8xKxzwxw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t9-20020a05640203c900b005639f49536csi171866edw.257.2024.02.14.12.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 12:35:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HtxsjtZw; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B71521F23375 for ; Wed, 14 Feb 2024 20:35:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D2A113EFF8; Wed, 14 Feb 2024 20:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HtxsjtZw" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D1A013EFEF; Wed, 14 Feb 2024 20:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707942890; cv=none; b=SLEYpp27jwIwiSzPGAVU7HojnwnYXNC0SMdjnaSvXEYjuiBsQm5A/V8nTV+OzOtsCIpuIG6ye3mLLbM6+LF6kfAz5QnSzDtMOmkojut2iI33J/FKebX3kDtt5VlBTVrKXUgdH7qFzVXvg2eUHRNwm6tHbqOKax9CgqAKXYAUte0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707942890; c=relaxed/simple; bh=P2kJjSkr/XSrVwwzMl6mGCzNNt+BYcXwxik+kURqUJU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Ac5N3dC1QRe44j3XZv+61TPvPGMoyXPPYwsVq3hpzos4tnWYfp56VH/WHdNwXfoeO03bObqZx/0ghAWaPU+p5XinVMBvTOBgtc8HHVzsuixAF6zEMr81I+8yp7FcMxYt/3pCRyocyRbBw6i+Sr/TBXWXTshfVPnWnadtfbrJozE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HtxsjtZw; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2797BC43399; Wed, 14 Feb 2024 20:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707942890; bh=P2kJjSkr/XSrVwwzMl6mGCzNNt+BYcXwxik+kURqUJU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HtxsjtZwVDTUpryvb2ETyAmr8hTrT94vKnK8XGAqonwRGyEQzzOt+Z7YY28oOxeTs ndW4p3ncVAr07JnhSNi9FZYK6e+gJ8Vrpcg6qlGdRytfvQAFHiBJd+9got8uecWOS3 eLGZ1bDKog6Yj6UDo7KL8JxV9Sg1pCs7muJtFNma60XizjIbhyyaVr1qT9onkdPcWU K7SrL9/IoRhnDj3tuMY6esVR1//PNU4+LNafDTyqsjz4tw/Anv/GfKSiAbqWHjTX9r 91ExN/BcN3B3nrOlOqNGYSjWwIWZTDjj5NCVBL03AwMWvb0TZ7+GAYa9vBCXilTZ70 Iq2YmNBdOkOmg== Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2d0c9967fdcso13752821fa.0; Wed, 14 Feb 2024 12:34:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUu/JaWIe060gGvetzUMMowICoI84KkNHGg9MlzaMiHCfXorHAvFnH71Bljd2bMFoqn+19S74z+FfS0hzo2cGMXDiewbfxdEqrhQkJik6X+XshDlpQ7GSUP/DIXewKlTESpVjwO7SA+DMxe X-Gm-Message-State: AOJu0Yy/VewsLqfMQRVXRDytWblQDxNyaDEzCbHJ4Mi349GrKbxw0sze jYhd51pMEhm6M/d7MbLIf1G4gfChOI+ZkrWRY+SvlHDvHQ48+t3mmdTAb7uN63WAV7h5vMwM0oS qtcHY9+D5OBM6gUSNbYpknJ9rLZ4= X-Received: by 2002:a05:6512:14e:b0:511:8e03:e0ba with SMTP id m14-20020a056512014e00b005118e03e0bamr1007802lfo.7.1707942888576; Wed, 14 Feb 2024 12:34:48 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240214181942.3562473-1-arnd@kernel.org> In-Reply-To: <20240214181942.3562473-1-arnd@kernel.org> From: Masahiro Yamada Date: Thu, 15 Feb 2024 05:34:11 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kallsyms: ignore ARMv4 thunks along with others To: Arnd Bergmann Cc: Arnd Bergmann , Nathan Chancellor , Nicolas Schier , =?UTF-8?Q?Pierre=2DCl=C3=A9ment_Tosi?= , Ard Biesheuvel , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 15, 2024 at 3:19=E2=80=AFAM Arnd Bergmann wro= te: > > From: Arnd Bergmann > > lld is now able to build ARMv4 and ARMv4T kernels, which means it can gen= erate > thunks for those that can interfere with kallsyms table generation since > they do not get ignore like the corresponding ARMv5+ ones are: > > Inconsistent kallsyms data > Try "make KALLSYMS_EXTRA_PASS=3D1" as a workaround > > Add the missing symbols to the list of ignored symbol prefixes. > > Fixes: 5eb6e280432d ("ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.= 0.0 and newer") > Fixes: efe6e3068067 ("kallsyms: fix nonconverging kallsyms table with lld= ") > Signed-off-by: Arnd Bergmann > --- > scripts/mksysmap | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/mksysmap b/scripts/mksysmap > index 9ba1c9da0a40..c809bf592790 100755 > --- a/scripts/mksysmap > +++ b/scripts/mksysmap > @@ -52,6 +52,8 @@ ${NM} -n ${1} | sed >${2} -e " > / __AArch64ADRPThunk_/d > > # arm lld > +/ __ARMv4PILongThunk_/d > +/ __ARMv4PILongBXThunk_/d > / __ARMV5PILongThunk_/d > / __ARMV7PILongThunk_/d > / __ThumbV7PILongThunk_/d > -- > 2.39.2 > If this is a recurring problem, maybe is it better to use a regular expression? Remove these lines: # arm64 lld / __AArch64ADRPThunk_/d # arm lld / __ARMV5PILongThunk_/d / __ARMV7PILongThunk_/d / __ThumbV7PILongThunk_/d # mips lld / __LA25Thunk_/d / __microLA25Thunk_/d Add this: # lld / __[^[:space:]]*Thunk_/d This pattern is only used in tooling, but never in the kernel space. $ git grep '__[^[:space:]]*Thunk_' scripts/mksysmap:/ __AArch64ADRPThunk_/d scripts/mksysmap:/ __ARMV5PILongThunk_/d scripts/mksysmap:/ __ARMV7PILongThunk_/d scripts/mksysmap:/ __ThumbV7PILongThunk_/d scripts/mksysmap:/ __LA25Thunk_/d scripts/mksysmap:/ __microLA25Thunk_/d tools/perf/tests/vmlinux-kallsyms.c: "__AArch64ADRPThunk_", /* arm64 lld */ tools/perf/tests/vmlinux-kallsyms.c: "__ARMV5PILongThunk_", /* arm lld */ tools/perf/tests/vmlinux-kallsyms.c: "__ARMV7PILongThunk_", tools/perf/tests/vmlinux-kallsyms.c: "__ThumbV7PILongThunk_", tools/perf/tests/vmlinux-kallsyms.c: "__LA25Thunk_", /* mips lld */ tools/perf/tests/vmlinux-kallsyms.c: "__microLA25Thunk_", --=20 Best Regards Masahiro Yamada