linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] tracing: Fix WARN_ON in tracing_buffers_mmap_close
       [not found]       ` <20260227102038.0fef81e9@gandalf.local.home>
@ 2026-02-27 20:56         ` Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2026-02-27 20:56 UTC (permalink / raw)
  To: Vincent Donnefort
  Cc: Qing Wang, Masami Hiramatsu, Mathieu Desnoyers, linux-kernel,
	linux-trace-kernel, syzbot+3b5dd2030fe08afdf65d, linux-mm,
	Andrew Morton, Lorenzo Stoakes, Vlastimil Babka

On Fri, 27 Feb 2026 10:20:38 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri, 27 Feb 2026 11:22:22 +0000
> Vincent Donnefort <vdonnefort@google.com> wrote:
> 
> > > Ah right, Syzkaller is using madvise(MADVISE_DOFORK) which resets VM_DONTCOPY.    
> > 
> > As we are applying restrictive rules for this mapping, I believe setting VM_IO
> > might be a better fix.  
> 
> Agreed.
> 

Adding MM folks so we do this right.

Dear MM folks,

Here's the issue. When the ftrace ring buffer is memory mapped to user
space, we do not want anything "special" done to it. One of those things we
did not want done was to have it copied on fork. To do that, we added
VM_DONTCOPY, but we didn't know that an madvise() could disable that. It
looks like VM_IO will prevent that from happening.

But looking at the various flags, I see there's a VM_SPECIAL. I'm wondering
if that is what we should use?

The effected code is here:

   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/ring_buffer.c#n7172

What's your thoughts?

Thanks,

-- Steve


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-27 20:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20260227025842.1085206-1-wangqing7171@gmail.com>
     [not found] ` <aaFrmHzIAkEe7ufy@google.com>
     [not found]   ` <aaF0zS3xh5KgM_yy@google.com>
     [not found]     ` <aaF-bhAIhCgusG9k@google.com>
     [not found]       ` <20260227102038.0fef81e9@gandalf.local.home>
2026-02-27 20:56         ` [PATCH] tracing: Fix WARN_ON in tracing_buffers_mmap_close Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox