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
Also in
linux-arm-kernel, linux-perf-users, lkml
Reply to
Catalin Marinas, 2025-07-23
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:
quoted
+/*
+ * 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

Thread (25 messages) 25 messages, 5 authors, last reply 2025-07-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help