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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <vfllifvyada5q6agv2jouzqvlcisdqvkv54vs32x3b6jku4aw4@qqqfsgv57mvt>
Date:   Thu, 20 Jul 2023 13:29:21 +0200
From:   Maxime Ripard <mripard@...nel.org>
To:     David Gow <davidgow@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Brendan Higgins <brendan.higgins@...ux.dev>,
        linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] drivers: base: Add basic devm tests for root
 devices

Hi David,

On Wed, Jul 19, 2023 at 05:13:45PM +0800, David Gow wrote:
> On Wed, 28 Jun 2023 at 17:49, Maxime Ripard <mripard@...nel.org> wrote:
> >
> > The root devices show some odd behaviours compared to regular "bus" devices
> > that have been probed through the usual mechanism, so let's create kunit
> > tests to exercise those paths and odd cases.
> >
> > Signed-off-by: Maxime Ripard <maxime@...no.tech>
> > ---
> 
> Reviewed-by: David Gow <davidgow@...gle.com>

Thanks!

> There's definitely an argument that root devices are not supposed to
> be like regular devices, and so devm_ managed resources aren't
> supposed to work with them. Either way:
> - It needs to be documented somewhere (and this test makes for good
> documentation, IMO).
> - It should be consistent: if devm_ isn't to be used with root
> devices, it should fail everywhere, and if it is, it should work in
> all the cases below.
> 
> So I'm all in favour of including this test and making root devices work.

I agree 100%. I've reworded the commit log a bit to make it clearer
that's what we should strive for, and that this is what this patch is
doing.

> That being said, I am planning to send out a patchset adding a struct
> kunit_device for use in tests, which will be attached to a "kunit"
> bus. I think the combination of "fix devm_ with root devices" and
> "don't recommend root devices as a 'fake' device for testing" is
> probably the longer-term solution everyone can agree upon?

Yeah, that sounds reasonable to me

Maxime

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ