Thread (4 messages) 4 messages, 4 authors, 2024-10-01

Re: [PATCH] arm64: Force position-independent veneers

From: Ard Biesheuvel <ardb@kernel.org>
Date: 2024-09-27 10:45:26

On Fri, 27 Sept 2024 at 12:18, Mark Rutland [off-list ref] wrote:
Certain portions of code always need to be position-independent
regardless of CONFIG_RELOCATABLE, including code which is executed in an
idmap or which is executed before relocations are applied. In some
kernel configurations the LLD linker generates position-dependent
veneers for such code, and when executed these result in early boot-time
failures.
...
I've opted to pass '--pic-veneer' unconditionally, as:

* In addition to solving the boot failure, these sequences are generally
  nicer as they require fewer instructions and don't need to perform
  data accesses.
Yeah, and accessing literal pools interspersed with the code. I find
it rather bizarre that --pic-veneer is not the default when using the
small code model.

...
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Marc Zyngier <maz@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help