mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: vdso: remove two .altinstructions related symbols
@ 2023-07-26 17:36 Jisheng Zhang
  2023-07-27 10:19 ` Will Deacon
  2023-07-27 12:22 ` Will Deacon
  0 siblings, 2 replies; 4+ messages in thread
From: Jisheng Zhang @ 2023-07-26 17:36 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel, linux-kernel

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 = .;
 	}
 
 	.dynamic	: { *(.dynamic) }		:text	:dynamic
-- 
2.40.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: vdso: remove two .altinstructions related symbols
  2023-07-26 17:36 [PATCH] arm64: vdso: remove two .altinstructions related symbols Jisheng Zhang
@ 2023-07-27 10:19 ` Will Deacon
  2023-07-27 10:55   ` Joey Gouly
  2023-07-27 12:22 ` Will Deacon
  1 sibling, 1 reply; 4+ messages in thread
From: Will Deacon @ 2023-07-27 10:19 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: Catalin Marinas, linux-arm-kernel, linux-kernel

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?

Will

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: vdso: remove two .altinstructions related symbols
  2023-07-27 10:19 ` Will Deacon
@ 2023-07-27 10:55   ` Joey Gouly
  0 siblings, 0 replies; 4+ messages in thread
From: Joey Gouly @ 2023-07-27 10:55 UTC (permalink / raw)
  To: Will Deacon
  Cc: Jisheng Zhang, Catalin Marinas, linux-arm-kernel, linux-kernel, nd

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: vdso: remove two .altinstructions related symbols
  2023-07-26 17:36 [PATCH] arm64: vdso: remove two .altinstructions related symbols Jisheng Zhang
  2023-07-27 10:19 ` Will Deacon
@ 2023-07-27 12:22 ` Will Deacon
  1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2023-07-27 12:22 UTC (permalink / raw)
  To: Jisheng Zhang, Catalin Marinas
  Cc: kernel-team, Will Deacon, linux-kernel, linux-arm-kernel

On Thu, 27 Jul 2023 01:36:19 +0800, Jisheng Zhang wrote:
> The two symbols __alt_instructions and __alt_instructions_end are not
> used, remove them.
> 
> 

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: vdso: remove two .altinstructions related symbols
      https://git.kernel.org/arm64/c/a96a7a7ddf95

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-27 12:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 17:36 [PATCH] arm64: vdso: remove two .altinstructions related symbols Jisheng Zhang
2023-07-27 10:19 ` Will Deacon
2023-07-27 10:55   ` Joey Gouly
2023-07-27 12:22 ` Will Deacon

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®