Re: [PATCH v7 03/45] arm64: RME: Handle Granule Protection Faults (GPFs)

From: Gavin Shan
Date: Sun Mar 02 2025 - 18:44:14 EST


On 2/14/25 2:13 AM, Steven Price wrote:
If the host attempts to access granules that have been delegated for use
in a realm these accesses will be caught and will trigger a Granule
Protection Fault (GPF).

A fault during a page walk signals a bug in the kernel and is handled by
oopsing the kernel. A non-page walk fault could be caused by user space
having access to a page which has been delegated to the kernel and will
trigger a SIGBUS to allow debugging why user space is trying to access a
delegated page.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
Signed-off-by: Steven Price <steven.price@xxxxxxx>
---
Changes since v2:
* Include missing "Granule Protection Fault at level -1"
---
arch/arm64/mm/fault.c | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)


Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>