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: <CANiq72m70q+zviHVNSV_AEwOByVBiMuSQL5vyo2UMMpD-vd+_Q@mail.gmail.com>
Date:   Wed, 4 May 2022 10:09:34 +0200
From:   Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     Miguel Ojeda <ojeda@...nel.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>, kunit-dev@...glegroups.com,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kunit: take `kunit_assert` as `const`

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.

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

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ