[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/7] targer/arm: Inform helpers whether a PAC instruction is
From: |
Peter Maydell |
Subject: |
Re: [PATCH 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined' |
Date: |
Mon, 13 Feb 2023 17:08:09 +0000 |
On Thu, 2 Feb 2023 at 21:12, Aaron Lindsay <aaron@os.amperecomputing.com> wrote:
>
> An instruction is a 'combined' Pointer Authentication instruction if it
> does something in addition to PAC - for instance, branching to or
> loading an address from the authenticated pointer. Knowing whether a PAC
> operation is 'combined' is needed to implement the FPACCOMBINE feature
> for ARMv8.3.
>
> Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com>
> ---
> -uint64_t HELPER(autia)(CPUARMState *env, uint64_t x, uint64_t y)
> +static uint64_t pauth_autia(CPUARMState *env, uint64_t x, uint64_t y,
> + bool is_combined)
> {
> int el = arm_current_el(env);
> if (!pauth_key_enabled(env, el, SCTLR_EnIA)) {
> return x;
> }
> pauth_check_trap(env, el, GETPC());
You can't move a GETPC() into a sub-function like this : it has
to remain in the top level helper function. If you need the
value in a sub-function, you need to pass it down. This is why
pauth_check_trap() has its 'ra' argument. (See patch 6 review
comment for more explanation.)
> - return pauth_auth(env, x, y, &env->keys.apia, false, 0);
> + return pauth_auth(env, x, y, &env->keys.apia, false, 0, is_combined);
> }
thanks
-- PMM
- [PATCH 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection, (continued)
- [PATCH 1/7] target/arm: v8.3 PAC ID_AA64ISAR[12] feature-detection, Aaron Lindsay, 2023/02/02
- [PATCH 3/7] target/arm: Implement v8.3 EnhancedPAC, Aaron Lindsay, 2023/02/02
- [PATCH 2/7] target/arm: Implement v8.3 QARMA3 PAC cipher, Aaron Lindsay, 2023/02/02
- [PATCH 4/7] target/arm: Implement v8.3 Pauth2, Aaron Lindsay, 2023/02/02
- [PATCH 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined', Aaron Lindsay, 2023/02/02
- Re: [PATCH 5/7] targer/arm: Inform helpers whether a PAC instruction is 'combined',
Peter Maydell <=
- [PATCH 6/7] target/arm: Implement v8.3 FPAC and FPACCOMBINE, Aaron Lindsay, 2023/02/02
- [PATCH 7/7] target/arm: Add CPU properties for most v8.3 PAC features, Aaron Lindsay, 2023/02/02