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: <CAJ-ks9nP6sWg4sR33caTDs3rr7Qkv=fg0LQQ4eCpjKA7VPF=mA@mail.gmail.com>
Date: Wed, 29 Oct 2025 10:25:48 -0400
From: Tamir Duberstein <tamird@...nel.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>, Stephen Boyd <sboyd@...nel.org>, 
	Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, 
	Danilo Krummrich <dakr@...nel.org>, linux-pm@...r.kernel.org, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rust: opp: simplify callers of `to_c_str_array`

On Wed, Oct 29, 2025 at 10:24 AM Tamir Duberstein <tamird@...nel.org> wrote:
>
> On Thu, Oct 23, 2025 at 11:23 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
> >
> > On 23-10-25, 09:59, Tamir Duberstein wrote:
> > > Use `Option` combinators to make this a bit less noisy.
> > >
> > > Wrap the `dev_pm_opp_set_config` operation in a closure and use type
> > > ascription to leverage the compiler to check for use after free.
> > >
> > > Signed-off-by: Tamir Duberstein <tamird@...nel.org>
> > > ---
> > > Note: this diff is much smaller with whitespace suppressed (`-w`).
> > >
> > > An alternative approach to compiler checking for UAF that doesn't change
> > > indentation is to add `drop((self, clk_names, regulator_names))` after
> > > `let ret = ...;` but that felt more prone to becoming out of date if
> > > more owned data needed to be added to the function scope.
> > > ---
> > > Changes in v2:
> > > - Avoid use after free; add compiler checking. (Thanks Viresh!)
> > > - Link to v1: https://patch.msgid.link/20251020-opp-simpler-code-v1-1-04f7f447712f@kernel.org
> > > ---
> > >  rust/kernel/opp.rs | 112 +++++++++++++++++++++++++++--------------------------
> > >  1 file changed, 58 insertions(+), 54 deletions(-)
> >
> > Thanks, tested this and it works.
> >
> > Lets see if someone has any more inputs, otherwise I can apply it.
>
> Thanks for testing! Doesn't look like anyone has opinions. Good to go?

Ah I see you've already applied it. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ