[PATCH v6 3/7] arm64: uaccess: Add additional userspace GCS accessors

Mark Brown broonie at kernel.org
Wed Aug 20 10:24:24 PDT 2025


On Mon, Aug 18, 2025 at 04:34:48PM -0500, Jeremy Linton wrote:

> Its important to note that GCS pages can be read by normal
> instructions, but the hardware validates that pages used by GCS
> specific operations, have a GCS privilege set. We aren't validating this
> in load_user_gcs because it requires stabilizing the VMA over the read
> which may fault.

I think in the context of uprobes this is reasonable.  We can always go
back later and tighten things up.

Reviewed-by: Mark Brown <broonie at kernel.org>

> +/*
> + * Unlike put/push_user_gcs() above, get/pop_user_gsc() doesn't
> + * validate the GCS permission is set on the page being read.  This
> + * differs from how the hardware works when it consumes data stored at
> + * GCSPR. Callers should assure this is acceptable.

s/assure/ensure/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250820/3e9e368c/attachment.sig>


More information about the linux-arm-kernel mailing list