llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Apply dbaee836d60a8 to linux-5.10.y
@ 2024-08-27 22:21 Nathan Chancellor
  2024-08-29 16:19 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2024-08-27 22:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin; +Cc: stable, llvm

Hi Greg and Sasha,

Please apply commit dbaee836d60a ("KVM: arm64: Don't use cbz/adr with
external symbols") to linux-5.10.y, as a recent LLVM optimization around
__cold functions [1] can cause hyp_panic() to be too far away from
__guest_enter(), resulting in the same error that occurred with LTO (for
the same reason):

  ld.lld: error: arch/arm64/built-in.a(kvm/hyp/entry.o):(function __guest_enter: .text+0x120): relocation R_AARCH64_CONDBR19 out of range: 14339212 is not in [-1048576, 1048575]; references 'hyp_panic'
  >>> referenced by entry.S:88 (arch/arm64/kvm/hyp/vhe/../entry.S:88)
  >>> defined in arch/arm64/built-in.a(kvm/hyp/vhe/switch.o)

  ld.lld: error: arch/arm64/built-in.a(kvm/hyp/entry.o):(function __guest_enter: .text+0x134): relocation R_AARCH64_ADR_PREL_LO21 out of range: 14339192 is not in [-1048576, 1048575]; references 'hyp_panic'
  >>> referenced by entry.S:97 (arch/arm64/kvm/hyp/vhe/../entry.S:97)
  >>> defined in arch/arm64/built-in.a(kvm/hyp/vhe/switch.o)

It applies cleanly with 'patch -p1' and I have verified that it fixes
the issue.

[1]: https://github.com/llvm/llvm-project/commit/6b11573b8c5e3d36beee099dbe7347c2a007bf53

Cheers,
Nathan

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

* Re: Apply dbaee836d60a8 to linux-5.10.y
  2024-08-27 22:21 Apply dbaee836d60a8 to linux-5.10.y Nathan Chancellor
@ 2024-08-29 16:19 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2024-08-29 16:19 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: Sasha Levin, stable, llvm

On Tue, Aug 27, 2024 at 03:21:59PM -0700, Nathan Chancellor wrote:
> Hi Greg and Sasha,
> 
> Please apply commit dbaee836d60a ("KVM: arm64: Don't use cbz/adr with
> external symbols") to linux-5.10.y, as a recent LLVM optimization around
> __cold functions [1] can cause hyp_panic() to be too far away from
> __guest_enter(), resulting in the same error that occurred with LTO (for
> the same reason):
> 
>   ld.lld: error: arch/arm64/built-in.a(kvm/hyp/entry.o):(function __guest_enter: .text+0x120): relocation R_AARCH64_CONDBR19 out of range: 14339212 is not in [-1048576, 1048575]; references 'hyp_panic'
>   >>> referenced by entry.S:88 (arch/arm64/kvm/hyp/vhe/../entry.S:88)
>   >>> defined in arch/arm64/built-in.a(kvm/hyp/vhe/switch.o)
> 
>   ld.lld: error: arch/arm64/built-in.a(kvm/hyp/entry.o):(function __guest_enter: .text+0x134): relocation R_AARCH64_ADR_PREL_LO21 out of range: 14339192 is not in [-1048576, 1048575]; references 'hyp_panic'
>   >>> referenced by entry.S:97 (arch/arm64/kvm/hyp/vhe/../entry.S:97)
>   >>> defined in arch/arm64/built-in.a(kvm/hyp/vhe/switch.o)
> 
> It applies cleanly with 'patch -p1' and I have verified that it fixes
> the issue.
> 
> [1]: https://github.com/llvm/llvm-project/commit/6b11573b8c5e3d36beee099dbe7347c2a007bf53

Now queued up, thanks.
greg k-h

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

end of thread, other threads:[~2024-08-29 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 22:21 Apply dbaee836d60a8 to linux-5.10.y Nathan Chancellor
2024-08-29 16:19 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).