lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250925072609.GU4067720@noisy.programming.kicks-ass.net>
Date: Thu, 25 Sep 2025 09:26:09 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Takaya Saeki <takayas@...gle.com>, Tom Zanussi <zanussi@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ian Rogers <irogers@...gle.com>,
	Douglas Raillard <douglas.raillard@....com>
Subject: Re: [PATCH v2 3/8] tracing: Have syscall trace events read user
 space string

On Tue, Sep 23, 2025 at 09:05:00AM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@...dmis.org>
> 
> 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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ