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: <20250709124536.4ce3a90b@batman.local.home>
Date: Wed, 9 Jul 2025 12:45:36 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Palmer Dabbelt <palmer@...belt.com>
Cc: alexghiti@...osinc.com, mhiramat@...nel.org, Mark Rutland
 <mark.rutland@....com>, Paul Walmsley <paul.walmsley@...ive.com>,
 aou@...s.berkeley.edu, Alexandre Ghiti <alex@...ti.fr>,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
 linux-riscv@...ts.infradead.org, rabenda.cn@...il.com,
 wangruikang@...as.ac.cn, ziyao@...root.org
Subject: Re: [PATCH] riscv: ftrace: Properly acquire text_mutex to fix a
 race condition

On Wed, 09 Jul 2025 07:12:47 -0700 (PDT)
Palmer Dabbelt <palmer@...belt.com> wrote:

> >  #ifdef CONFIG_DYNAMIC_FTRACE
> > +void ftrace_arch_code_modify_prepare(void)
> > +{
> > +	mutex_lock(&text_mutex);
> > +}
> > +
> > +void ftrace_arch_code_modify_post_process(void)
> > +{
> > +	mutex_unlock(&text_mutex);
> > +}  
> 
> IIRC there's a reason we don't do it this way, we had (or had tried to) 
> have it before.  It's been a while, though, and I'm just having some a 
> coffee so may I'm just wrong...

Yes, because it caused issues with stop machine[1], but if you are no
longer using stop machine, this should be what you should do now.

[1] https://lore.kernel.org/all/20220310045454.672097-1-changbin.du@gmail.com/

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ