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: <YbPJEznncIVSKQvH@bombadil.infradead.org>
Date:   Fri, 10 Dec 2021 13:39:31 -0800
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Greg KH <gregkh@...uxfoundation.org>,
        Petr Mladek <pmladek@...e.com>
Cc:     tj@...nel.org, akpm@...ux-foundation.org, jeyu@...nel.org,
        shuah@...nel.org, bvanassche@....org, dan.j.williams@...el.com,
        joe@...ches.com, tglx@...utronix.de, keescook@...omium.org,
        rostedt@...dmis.org, minchan@...nel.org,
        linux-spdx@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-block@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
        copyleft-next@...ts.fedorahosted.org
Subject: Re: [PATCH v9 3/6] selftests: add tests_sysfs module

On Wed, Dec 08, 2021 at 05:48:25PM -0800, Luis Chamberlain wrote:
> On Fri, Dec 03, 2021 at 04:29:02PM +0100, Greg KH wrote:
> > On Fri, Oct 29, 2021 at 11:44:57AM -0700, Luis Chamberlain wrote:
> > > This adds a new selftest module which can be used to test sysfs, which
> > > would otherwise require using an existing driver. This lets us muck
> > > with a template driver to test breaking things without affecting
> > > system behaviour or requiring the dependencies of a real device
> > > driver.
> > 
> > Test sysfs "how"?  What exactly are you wanting to test?
> 
> You can look at the 32 tests added after all patches applied.
> 
> > I see lots of things in this code as examples of how to NOT use sysfs,
> > so are you testing my review cycles?  :)
> 
> You are exagerating, there are 32 tests there and only 2 tests deal
> with a deadlock which we are not yet sure how widespread it could be.

Also very important is how one test uses failure injection support to proove
how getting the kernfs active reference suffices to avoid crashes with
module removal and uses of sysfs ops in a driver, something which *you*
did not believe to be true but the code speaks for itself. This is also
why uses of try_module_get() is *safe* if used on sysfs ops.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ