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

- From: Mark Brown \<broonie@kernel.org\>
- Date: 2025-08-20 17:24:31 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/08/3179396
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/08/3175698/t.md

```text
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@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/
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-trace-kernel/2025/08/3179396/attachment/0) (application/pgp-signature, 488 bytes)
