On Tue, Sep 23, 2025 at 09:05:00AM -0400, Steven Rostedt wrote: > From: Steven Rostedt <[email protected]> > > As of commit 654ced4a1377 ("tracing: Introduce tracepoint_is_faultable()") > system call trace events allow faulting in user space memory. Have some of > the system call trace events take advantage of this. > > Introduce a way to read strings that are nul terminated into the trace > event. The way this is accomplished is by creating a per CPU temporary > buffer that is used to read unsafe user memory. > > When a syscall trace event needs to read user memory, it reads the per CPU > schedule switch counter. It then disables migration and enables > preemption, copies the user space memory into this buffer, then disables > preemption again. It reads the per CPU schedule switch counter again and > if it matches it considers the buffer is valid. Otherwise it needs to try > again. This is similar to how seqcount works, but uses the per CPU context > switch counter as the sequence counter.
And you can't just allocate memory and not bother with the migrate_disable() and retry stuff because?
