mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joey Gouly <joey.gouly@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Jisheng Zhang <jszhang@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <nd@arm.com>
Subject: Re: [PATCH] arm64: vdso: remove two .altinstructions related symbols
Date: Thu, 27 Jul 2023 11:55:30 +0100	[thread overview]
Message-ID: <20230727105530.GA1854855@e124191.cambridge.arm.com> (raw)
In-Reply-To: <20230727101926.GB18721@willie-the-truck>

Hi,

On Thu, Jul 27, 2023 at 11:19:27AM +0100, Will Deacon wrote:
> On Thu, Jul 27, 2023 at 01:36:19AM +0800, Jisheng Zhang wrote:
> > The two symbols __alt_instructions and __alt_instructions_end are not
> > used, remove them.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> >  arch/arm64/kernel/vdso/vdso.lds.S | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
> > index 6028f1fe2d1c..45354f2ddf70 100644
> > --- a/arch/arm64/kernel/vdso/vdso.lds.S
> > +++ b/arch/arm64/kernel/vdso/vdso.lds.S
> > @@ -50,9 +50,7 @@ SECTIONS
> >  
> >  	. = ALIGN(4);
> >  	.altinstructions : {
> > -		__alt_instructions = .;
> >  		*(.altinstructions)
> > -		__alt_instructions_end = .;
> >  	}
> 
> If we don't need the symbols, then why do we need this section at all?

Looks like it was a copy/paste from my commit 4e3bca8f7cdd ("arm64: alternative: patch alternatives in the vDSO").
The VDSO patching code searches for a section named '.altinstructions' by
reading the VDSO as an ELF file, and doesn't use the __alt_instructions /
__alt_instructions_end symbols.  The kernel patching code uses the
__alt_instructions symbol (from the vmlinux.ld.S linker script).

So it's safe to remove these, but the section itself needs to stay.

Thanks,
Joey

  reply	other threads:[~2023-07-27 10:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 17:36 Jisheng Zhang
2023-07-27 10:19 ` Will Deacon
2023-07-27 10:55   ` Joey Gouly [this message]
2023-07-27 12:22 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230727105530.GA1854855@e124191.cambridge.arm.com \
    --to=joey.gouly@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=jszhang@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nd@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®