[PATCH] arm64: scs: Work around full LTO issue with dynamic SCS
Sami Tolvanen
samitolvanen at google.com
Wed Jan 10 11:57:58 PST 2024
Hi Ard,
On Wed, Jan 10, 2024 at 5:26 AM Ard Biesheuvel <ardb+git at google.com> wrote:
>
> From: Ard Biesheuvel <ardb at kernel.org>
>
> Full LTO takes the '-mbranch-protection=none' passed to the compiler
> when generating the dynamic shadow call stack patching code as a hint to
> stop emitting PAC instructions altogether. (Thin LTO appears unaffected
> by this)
Does this affect all Clang versions? Is there a compiler bug filed for
this issue?
> Work around this by stripping unwind tables from the object in question,
> which should be sufficient to prevent the patching code from attempting
> to patch itself.
>
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
Please add a Fixes tag to ensure this gets backported. Otherwise,
looks like a reasonable workaround to me.
Reviewed-by: Sami Tolvanen <samitolvanen at google.com>
Sami
More information about the linux-arm-kernel
mailing list