On 8/29/23 10:36 PM, Marco Elver wrote: [...]
In this case, maybe data_race(*ldst++ = *lsrc++) would be more appropriate and efficient. Unlikely that READ_ONCE()/WRITE_ONCE() here helps make this any safer, i.e. the memcpy is still not atomic and if it's a bug on the user's side, it'll corrupt data either way.
I wasn't aware of data_race(), thanks for the suggestion! Just flushed out a small patch. Thanks, Daniel