Re: [PATCH v2] rust: page: add byte-wise atomic memory copy methods

From: Greg KH

Date: Fri Feb 13 2026 - 07:18:52 EST


On Fri, Feb 13, 2026 at 10:55:57AM +0100, Peter Zijlstra wrote:
> On Thu, Feb 12, 2026 at 03:51:24PM +0100, Andreas Hindborg wrote:
> > When copying data from buffers that are mapped to user space, it is
> > impossible to guarantee absence of concurrent memory operations on those
> > buffers. Copying data to/from `Page` from/to these buffers would be
> > undefined behavior if no special considerations are made.
> >
> > Add methods on `Page` to read and write the contents using byte-wise atomic
> > operations.
>
> I'm completely failing to understand. What!?
>
> There is no such thing as an 'atomic' byte load, nor does it help one
> whit against concurrent modification of the memory you're copying.

I too am totally confused when reading this patch, and the previous
ones. Shouldn't the "normal" copy_from_user() stuff be used here
correctly? Why is anything new needed?

thanks,

greg k-h