[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] target/arm: Fix BTI versus CF_PCREL
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2] target/arm: Fix BTI versus CF_PCREL |
Date: |
Thu, 8 Aug 2024 12:38:09 +0100 |
On Fri, 2 Aug 2024 at 01:30, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> With pcrel, we cannot check the guarded page bit at translation
> time, as different mappings of the same physical page may or may
> not have the GP bit set.
>
> Instead, add a couple of helpers to check the page at runtime,
> after all other filters that might obviate the need for the check.
>
> The set_btype_for_br call must be moved after the gen_a64_set_pc
> call to ensure the current pc can still be computed.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>
> v2: Enable unwind from guarded_page_br.
> Since guarded_page_check is called exclusively with btype != 0,
> it must immediately follow an indirect branch or eret, so cpu
> state is up-to-date, so unwind is not required.
>
Applied to target-arm.next, thanks.
-- PMM