Message ID | 20240214181942.3562473-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-65795-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1431958dyb; Wed, 14 Feb 2024 11:01:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUlOKQz3t9sLJEOvLPq2hB5veTfQxwpWwRH7Fu7+WkcZwwcMLZYlvFyJeNCFlXjBHjrbOwHFa99Jy92VPMYKQ6dYGS+rA== X-Google-Smtp-Source: AGHT+IEvS3HMTVFG6fmGoOuZjxAZxufqPvZsLNfTZvoW1Y+bBCc58ak4p6ubnfVx0XkoDn1V1omQ X-Received: by 2002:a17:903:1104:b0:1d9:b6a1:1fe4 with SMTP id n4-20020a170903110400b001d9b6a11fe4mr4263438plh.18.1707937285113; Wed, 14 Feb 2024 11:01:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707937285; cv=pass; d=google.com; s=arc-20160816; b=cnOdCeCtbNBsQsfzCEGkXV3tCHS19By3F5sR7UTqzjs2GJKYJXvIZ0l06Ut5QjOs+m ua/RHQv9FtMHq9feddwVFo10RmQnN/pXJzYeiqaFhFo8+mpOLLJCYzyTp3KRpjGfdNEd ZcVupJ+VjsEf7FLYgWU4Bq5bacY69fNaXs8T4yqbHm0n+A5mVGCpTHqt9O1gxP4wlx4r FJOF3dM5VHtqx7BdisdFwaZl1vh63dsrZwYisTYEe/jFwSxt1UDYVij3tvdG8Z78JIMf vIqdnkHaRXuH/iu98wG9DyyAjGcCnnIjzS9+ukg178Z1HjsJkmOOiaHeHM2PixFeesbQ UFcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=jPtaCNPDPN0cldj7BMvUjHCO2jPqIQkS64GHUte/Bew=; fh=mJUAzxW6wHvKlD9HjBwlskbFFv1SvtOH00nHdsNFO7s=; b=jIkJZH+ePFVO8l6ydl2kiEVRMM3e0JKIkcI4hyYnbqFOXtOGCg0OEb+vWRUloH37Mf KQ92qfWdq/KrvAR25AkMX1JlwH2s1rrwgACKU3YlzFoPNA6QRmxpVa0AWlw8wr9I8ZnL +tLlU/2Ij0oaGlLAY7NXahbR82rJ+vBnCb7NWq4Ax5GzY67gxVYBVU7YvnOTjE4CG9fF PdjObC890PUbMT8IwvF5M88AN5du5Ovh4EgtR6CW7NaOnqrrFY0PfUKSwKp/VDME5LPo qfzGmLFN8w3vdJireJX+KfdLHXmXXJBTDli3Nn0uLls3axFdSGrGLp1QWLnWlTo+3qeN IITQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WWzMdHtv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65795-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65795-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUOUvZ+dwrYle6xmiCD7RoTKQVkKWA+GU30EK7mCGUlMnp1K4/ejGCz5NwXSFBLTMCc9aJ4dlbmIwO7fB1T/5XNPrkzwQ== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h3-20020a170902eec300b001db6ae778adsi616276plb.483.2024.02.14.11.01.24 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 11:01:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65795-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WWzMdHtv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-65795-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65795-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A17DEB24325 for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 18:20:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F476128804; Wed, 14 Feb 2024 18:19:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WWzMdHtv" 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 E5248604AB; Wed, 14 Feb 2024 18:19:47 +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=1707934788; cv=none; b=G9CKREgIrLv8JmP9RHoi3mP+8elr8BWMNEarE4dyP4Oddhk+d8yQSaykHPWdBqbg0bMjgE0FdY62Z5q3ZQ31VTab796xK2nOTA+hPBkN55473mmFQ9XHC9W8KqE6GNMbWNLm4gz9nQBtBgQ8MA5toFPCXg1Z/j1zez+MCJ0yRVo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707934788; c=relaxed/simple; bh=ireiJEzPK4O+z7JRHkRgdN7IMbrEYY6WQWzsHi+UMqE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=TUEC1KNBNOpDqjGoEUHl+jXLdB9/rWUsRPGamblTy/Dagqw9VTek3TurczLS/blFJeV2ORhHpMiKP3QnM7nWLpKBaGpW+UJtD1XQsfR//0mssONsFwS9Mtp4rUsNdi28bnsXb1rWBx9U/GMStBvaJAwjz0k5q/loIdW46jU/PaQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WWzMdHtv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBE92C433F1; Wed, 14 Feb 2024 18:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707934787; bh=ireiJEzPK4O+z7JRHkRgdN7IMbrEYY6WQWzsHi+UMqE=; h=From:To:Cc:Subject:Date:From; b=WWzMdHtvzjCGafRLG46fOvXOyI/md3LQwpvLSwT9ZTOMprFd7wbFK/1ws6j7vMk1j G/79vryqwTXIrfo8HTSQ0fYMUkeaMpQYMvQs9GhkHepL0+moIxZIMgiByClWOj6jl3 kgVyuBjwnNkK5GWGnkESsowW9fRALGyilz/6q5wtdwdmFXmTPc0EcGM5BA3EMKpKkp 46j9TFjUnsz7Fr+4WgDZfjYFvFaJ5fJy04g/MIH4JCtyIkk5tr1dsty4sW2BsOK0MK ZHIwnINIc1ZIogQqYi4nKHW3p3qMstSHooC6cPqwPL+vOB1TaHoMsfMVEgdhZw6CUM Yp5oYM96KVYCg== From: Arnd Bergmann <arnd@kernel.org> To: Masahiro Yamada <masahiroy@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de>, Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nicolas@fjasle.eu>, =?utf-8?q?Pierre-Cl=C3=A9ment_Tosi?= <ptosi@google.com>, Ard Biesheuvel <ardb@kernel.org>, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kallsyms: ignore ARMv4 thunks along with others Date: Wed, 14 Feb 2024 19:19:25 +0100 Message-Id: <20240214181942.3562473-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790902046234471759 X-GMAIL-MSGID: 1790902046234471759 |
Series |
kallsyms: ignore ARMv4 thunks along with others
|
|
Commit Message
Arnd Bergmann
Feb. 14, 2024, 6:19 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> lld is now able to build ARMv4 and ARMv4T kernels, which means it can generate 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=1" 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 <arnd@arndb.de> --- scripts/mksysmap | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Thu, Feb 15, 2024 at 3:19 AM Arnd Bergmann <arnd@kernel.org> wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > lld is now able to build ARMv4 and ARMv4T kernels, which means it can generate > 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=1" 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 <arnd@arndb.de> > --- > 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_",
On Wed, Feb 14, 2024, at 21:34, Masahiro Yamada wrote: > On Thu, Feb 15, 2024 at 3:19 AM Arnd Bergmann <arnd@kernel.org> wrote: > 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. Right, makes sense. There is always a risk of removing intential kernel symbols and this is slightly higher with the regex but still not that bad. I'll give this a spin and send a v2 tomorrow then. Arnd
On Thu, Feb 15, 2024 at 5:47 AM Arnd Bergmann <arnd@arndb.de> wrote: > > On Wed, Feb 14, 2024, at 21:34, Masahiro Yamada wrote: > > On Thu, Feb 15, 2024 at 3:19 AM Arnd Bergmann <arnd@kernel.org> wrote: > > 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. > > Right, makes sense. There is always a risk of removing > intential kernel symbols and this is slightly higher > with the regex but still not that bad. > > I'll give this a spin and send a v2 tomorrow then. > > Arnd Maybe this is a little more simpler: / __[[:alnum:]]*Thunk_/d
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