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]
Date:   Fri, 20 May 2022 15:13:50 -0700
From:   Daniel Latypov <dlatypov@...gle.com>
To:     David Gow <davidgow@...gle.com>
Cc:     Brendan Higgins <brendanhiggins@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] kunit: tool: refactor internal kconfig handling, allow overriding

On Fri, May 20, 2022 at 11:13 AM Daniel Latypov <dlatypov@...gle.com> wrote:
>
> On Thu, May 19, 2022 at 11:13 PM David Gow <davidgow@...gle.com> wrote:
> >
> > I like this, but do think there are a few gaps this doesn't handle
> > properly. (Though exactly how we'd deal with them, I'm not yet sure.)
> >
> > In particular, it's not possible to disable a pair of options where
> > one depends on the other: disabling the parent option will result in
> > the child one not being present in the generated config. This will
> > conflict both with "=y" and "=n/not set": we'd need a way to _remove_
> > a kconfig option for that to work.
>
> Do you have an example?
> Because what you describe sounds like how we want it to work, but I'm
> not sure if I'm misunderstanding the scenario you describe.

Talking offline with David, we've come up with a small example.

If we add this kconfig somewhere
+config X
+       bool "X"
+       default y
+
+config Y
+       bool "Y"
+       default y
+       depends on X
+

Then running this will fail
$ ./tools/testing/kunit/kunit.py config --kunitconfig xy_kunitconfig
--kconfig_add=CONFIG_X=n --kconfig_add=CONFIG_Y=n

It will fail with this
This is probably due to unsatisfied dependencies.
Missing: # CONFIG_Y is not set

The problem is that kunit.py is looking for an explicit line saying
CONFIG_Y is not set.
But CONFIG_Y's dependencies are not met, so Kconfig doesn't write it out.

I assume we can treat the absence of it in the file as proof that it's not set.
I.e. the bug lies in the is_subset() logic we have in kunit.py?

I think there's also a general problem with kunit.py/kunitconfig not
really handling disabling options properly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ