[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] docs/cpu-features: Update "PAuth" (Pointer Authentica
From: |
Eric Auger |
Subject: |
Re: [PATCH v2 2/3] docs/cpu-features: Update "PAuth" (Pointer Authentication) details |
Date: |
Mon, 17 Feb 2025 18:43:01 +0100 |
User-agent: |
Mozilla Thunderbird |
Hi Kashyap,
On 2/17/25 5:37 PM, Kashyap Chamarthy wrote:
> PAuth (Pointer Authentication), a security feature in software, is
> relevant for both KVM and QEMU. Relect this fact into the docs:
>
> - For KVM, `pauth` is a binary, "on" vs "off" option. The host CPU
> will choose the cryptographic algorithm.
>
> - For TCG, however, along with `pauth`, a couple of properties can be
> controlled -- they're are related to cryptographic algorithm choice.
>
> Thanks to Peter Maydell and Marc Zyngier for explaining more about PAuth
> on IRC (#qemu, OFTC).
>
> Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
> ---
> v2: address Marc Zyngier's comments:
> https://lists.gnu.org/archive/html/qemu-devel/2025-01/msg03451.html
> ---
> docs/system/arm/cpu-features.rst | 46 +++++++++++++++++++++++++++++---
> 1 file changed, 42 insertions(+), 4 deletions(-)
>
> diff --git a/docs/system/arm/cpu-features.rst
> b/docs/system/arm/cpu-features.rst
> index a596316384..94d260b573 100644
> --- a/docs/system/arm/cpu-features.rst
> +++ b/docs/system/arm/cpu-features.rst
> @@ -204,11 +204,49 @@ the list of KVM vCPU features and their descriptions.
> the guest scheduler behavior and/or be exposed to the guest
> userspace.
>
> -TCG vCPU Features
> -=================
> +"PAuth" (Pointer Authentication)
> +================================
> +
> +PAuth (Pointer Authentication) is a security feature in software that
> +was introduced in Armv8.3-A. It aims to protect against ROP
> +(return-oriented programming) attacks.
> +
> +KVM
> +---
> +
> +``pauth``
> +
> + Enable or disable ``FEAT_Pauth``. No other properties can be
> + controlled.
> +
> + The host CPU will define the PAC (pointer authentication
> + code) cryptographic algorithm.
> +
> + There are different "levels" of PAuth support. The host CPU
> + definition will define that level (e.g. PAuth, EPAC, PAuth2, FPAC,
> + FPACCOMBINE, etc). Refer to the Arm architecture extension documents
> + for details about the description of these features.
> +
> +Live migration and PAuth
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +The level of PAuth support depends on which Arm architecture a given CPU
> +supports (e.g. Armv8.3 vs. Armv8.6). This gradation in PAuth support
> +has implications for live migration. For example, to be able to
> +live-migrate from host-A (with Armv8.3) to host-B (with Arm v8.6):
> +
> + - the source and destination hosts must "agree" on (a) the PAC
> + signature algorithm, and (b) all the sub-features of PAuth; or
> +
> + - the alternative (and less desirable) option is to turn off PAuth
> + off on both source and destination — this is generally not
> + recommended, as PAuth is a security feature.
> +
> +TCG
> +---
>
> -TCG vCPU features are CPU features that are specific to TCG.
> -Below is the list of TCG vCPU features and their descriptions.
The resulting header layout seems weird to me.
Initially we had at top level (assuming ===):
KVM vCPU Features
TCG vCPU Features
SVE CPU Properties
SME CPU Properties
RME CPU Properties
and now
TCG vCPU Features has somehow disappeared giving the impression that
there are none.
SME and RME and TCG only if am not wrong while PAUTH and SVE are both
KVM and TCG
Maybe we shall
- rename KVM vCPU Features -> KVM only vCPU Features
- Add a TCG only vCPU features including both SME and RME ones
- introduce a top level KVM and TCG vCPU features with below:
PAUTH, SVE, detailing potential different semantic for both KVM and TCG mode
Also while we are at it, we may use vCPU everywhere instead of CPU (SVE
CPU Properties) and just skip CPU if it lays within the KVM and TCG vCPU
Features
Thanks
Eric
> +For TCG, along with ``pauth``, it is possible to control a few other
> +properties of PAuth:
>
> ``pauth``
> Enable or disable ``FEAT_Pauth`` entirely.
[PATCH v2 0/3] docs: Small changes to system/arm/cpu-features and more, Kashyap Chamarthy, 2025/02/17
[PATCH v2 3/3] docs: Fix "Arm" capitalization, Kashyap Chamarthy, 2025/02/17