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] [day] [month] [year] [list]
Message-ID: <mhng-E799444F-E3F5-4100-B236-45026970E1A5@palmerdabbelt-mac>
Date: Wed, 16 Jul 2025 08:22:44 -0700 (PDT)
From: Palmer Dabbelt <palmer@...belt.com>
To: rostedt@...dmis.org
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 09:45:36 PDT (-0700), rostedt@...dmis.org wrote:
> 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/

Thanks.  The v2 staged for the tester, should show up on fixes soon.

>
> -- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ