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: <CABVgOSmkZ9EXijBRx_pvS=Opizb1z2632B5rVsd1WRNOL5o8GA@mail.gmail.com>
Date:   Wed, 4 May 2022 22:04:57 +0800
From:   David Gow <davidgow@...gle.com>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     Daniel Latypov <dlatypov@...gle.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kunit: take `kunit_assert` as `const`

On Wed, May 4, 2022 at 4:09 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> Hi Daniel,
>
> On Mon, May 2, 2022 at 9:44 PM Daniel Latypov <dlatypov@...gle.com> wrote:
> >
> > Reviewed-by: Daniel Latypov <dlatypov@...gle.com>
> >
> > Thanks for this, the code definitely should have been this way from the start.
> >
> > I had wanted to make this change but mistakenly thought the format
> > func took it via non-const for some reason.
> > I must have misread it once and got it into my head that we were
> > leaving the door open for mutable child structs (which sounds like a
> > bad idea).
>
> Thanks for reviewing it so quickly! Yeah, I was unsure too if there
> was an external reason such as some future plan to use the mutability
> as you mention or maybe some out-of-tree user was relying on it
> already.
>
> But I thought it would be best to make it stricter until it is
> actually needed (if ever); or if there is an actual user for
> mutability, it should be documented/noted in-tree.

I definitely agree here -- I can't recall any particular plan that
would require this to be non-const, and we can always change it back
if we really need to.

> It also simplifies a tiny bit a Rust-side call to
> `kunit_do_failed_assertion` that I am using within generated Rust
> documentation tests.

Very exciting! I assume that's the PR here:
https://github.com/Rust-for-Linux/linux/pull/757

Cheers,
-- David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ