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: <YOMc2PZTur+qyhH9@smile.fi.intel.com>
Date:   Mon, 5 Jul 2021 17:53:12 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Trent Piepho <tpiepho@...il.com>,
        Colin Ian King <colin.king@...onical.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] math: Make RATIONAL tristate

On Mon, Jul 05, 2021 at 01:46:33PM +0200, Geert Uytterhoeven wrote:
> All but one symbols that select RATIONAL are tristate, but RATIONAL
> itself is bool.  Change it to tristate, so the rational fractions
> support code can be modular if no builtin code relies on it.
> 
> While at it, add support for compile-testing and provide a help text.

...

> Exposed by commit b6c75c4afceb8bc0 ("lib/math/rational: add Kunit test
> cases") and CONFIG_KUNIT_ALL_TESTS=m.
> 
> I'm not so happy RATIONAL_KUNIT_TEST selects RATIONAL, as test code
> should depend on the presence of the feature to test.  Else enabling
> a test may add unneeded code to a production kernel.
> Perhaps the "if COMPILE_TEST" should be dropped, making RATIONAL
> visible, so RATIONAL_KUNIT_TEST can depend on RATIONAL instead?

...

> +	tristate "Rational fractions support" if COMPILE_TEST

Making it tristate is okay, but visible (even for COMPILE_TEST)... why?
Just on purpose to be dependent on for test case? I understand your
justification above, but it will bring all hidden symbols to be unhidden
(due to test cases) and this is not the right thing to do in my opinion.

Why not to complain to KUnit people to fix their infra to avoid tests that
tries non-selected feature(s)?

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ