mbox series

[v5,0/4] Enable orphan-handling=warn for VDSO

Message ID 20220510095834.32394-1-joey.gouly@arm.com (mailing list archive)
Headers show
Series Enable orphan-handling=warn for VDSO | expand

Message

Joey Gouly May 10, 2022, 9:58 a.m. UTC
Hi all,

This small series enables the orphan-handling linker flag for the VDSO.
This could catch subtle errors if features that use special sections are
introduced into the VDSO implementation.

Tested by running the VDSO self tests.
Tested building with LLVM LLD and Binutils LD linkers.

Changes from v4 [1]:
  - Add more sections that showed up when using binutils ld

Thanks,
Joey

[1]: https://lore.kernel.org/linux-arm-kernel/20220414104611.17748-1-joey.gouly@arm.com/

Joey Gouly (4):
  arm64: vdso: put ELF related sections in the linker script
  arm64: vdso: enable orphan handling for VDSO
  arm64: vdso32: put ELF related sections in the linker script
  arm64: vdso32: enable orphan handling for VDSO

 arch/arm64/kernel/vdso/Makefile     |  8 +++++++-
 arch/arm64/kernel/vdso/vdso.lds.S   | 16 ++++++++++++++++
 arch/arm64/kernel/vdso32/Makefile   |  1 +
 arch/arm64/kernel/vdso32/vdso.lds.S | 22 +++++++++++++++++++++-
 4 files changed, 45 insertions(+), 2 deletions(-)

Comments

Will Deacon June 23, 2022, 5:53 p.m. UTC | #1
Hi Joey,

On Tue, May 10, 2022 at 10:58:30AM +0100, Joey Gouly wrote:
> This small series enables the orphan-handling linker flag for the VDSO.
> This could catch subtle errors if features that use special sections are
> introduced into the VDSO implementation.
> 
> Tested by running the VDSO self tests.
> Tested building with LLVM LLD and Binutils LD linkers.

I've applied this locally, but I'm seeing a warning from LLD when linking
the 32-bit vDSO object:

  | LD32    arch/arm64/kernel/vdso32/vdso.so.raw
  | ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'

Please can you take a look and send an additional patch on top to fix this?

Thanks,

Will
Joey Gouly June 23, 2022, 6:05 p.m. UTC | #2
Hi Will,

On Thu, Jun 23, 2022 at 06:53:53PM +0100, Will Deacon wrote:
> Hi Joey,
> 
> On Tue, May 10, 2022 at 10:58:30AM +0100, Joey Gouly wrote:
> > This small series enables the orphan-handling linker flag for the VDSO.
> > This could catch subtle errors if features that use special sections are
> > introduced into the VDSO implementation.
> > 
> > Tested by running the VDSO self tests.
> > Tested building with LLVM LLD and Binutils LD linkers.
> 
> I've applied this locally, but I'm seeing a warning from LLD when linking
> the 32-bit vDSO object:
> 
>   | LD32    arch/arm64/kernel/vdso32/vdso.so.raw
>   | ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
> 
> Please can you take a look and send an additional patch on top to fix this?

I have been meaning to send out a v6, I will try get it out tomorrow or next week.

Thanks,
Joey
Will Deacon June 23, 2022, 7:31 p.m. UTC | #3
On Tue, 10 May 2022 10:58:30 +0100, Joey Gouly wrote:
> This small series enables the orphan-handling linker flag for the VDSO.
> This could catch subtle errors if features that use special sections are
> introduced into the VDSO implementation.
> 
> Tested by running the VDSO self tests.
> Tested building with LLVM LLD and Binutils LD linkers.
> 
> [...]

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

[1/4] arm64: vdso: put ELF related sections in the linker script
      https://git.kernel.org/arm64/c/b87d34ca60ce
[2/4] arm64: vdso: enable orphan handling for VDSO
      https://git.kernel.org/arm64/c/e0ab20b20a1b
[3/4] arm64: vdso32: put ELF related sections in the linker script
      https://git.kernel.org/arm64/c/eeec7223b697
[4/4] arm64: vdso32: enable orphan handling for VDSO
      https://git.kernel.org/arm64/c/9d4775b332e1

Cheers,
Will Deacon June 23, 2022, 7:34 p.m. UTC | #4
On Thu, Jun 23, 2022 at 07:05:03PM +0100, Joey Gouly wrote:
> Hi Will,
> 
> On Thu, Jun 23, 2022 at 06:53:53PM +0100, Will Deacon wrote:
> > Hi Joey,
> > 
> > On Tue, May 10, 2022 at 10:58:30AM +0100, Joey Gouly wrote:
> > > This small series enables the orphan-handling linker flag for the VDSO.
> > > This could catch subtle errors if features that use special sections are
> > > introduced into the VDSO implementation.
> > > 
> > > Tested by running the VDSO self tests.
> > > Tested building with LLVM LLD and Binutils LD linkers.
> > 
> > I've applied this locally, but I'm seeing a warning from LLD when linking
> > the 32-bit vDSO object:
> > 
> >   | LD32    arch/arm64/kernel/vdso32/vdso.so.raw
> >   | ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
> > 
> > Please can you take a look and send an additional patch on top to fix this?
> 
> I have been meaning to send out a v6, I will try get it out tomorrow or next week.

I already queued v5, so please just send stuff on top of that.

Will