# Re: \[PATCH v4 4/8\] arm64: uaccess: Add additional userspace GCS accessors

- From: Mark Brown \<broonie@kernel.org\>
- Date: 2025-07-23 11:01:15 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/07/3145379
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/07/3140791/t.md

```text
On Wed, Jul 23, 2025 at 10:50:33AM +0100, Catalin Marinas wrote:
> On Fri, Jul 18, 2025 at 11:37:36PM -0500, Jeremy Linton wrote:
> > +/*
> > + * Unlike put_user_gcs() above, the use of copy_from_user() may provide
> > + * an opening for non GCS pages to be used to source data. Therefore this
> > + * should only be used in contexts where that is acceptable.
> > + */

> Even in user space, the GCS pages can be read with normal loads, so
> already usable as a data source if one wants to (not that it's of much
> use). So not sure the comment here is needed.

The comment should probably be clarified to mention that the specific
issue is the lack of an operation that does a load with GCS permission
check to match what we have for stores, it'd be a bit of a landmine to
have the operation available without anything that flags that it didn't
validate the permissions (even assuming people read the comments in the
header...).
```

## Attachments

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