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] [day] [month] [year] [list]
Message-ID: <CABVgOS=HdQ08=kR0eLAm3=f2_vX4_UWV2=bF1+7uVnjJtQK1Dw@mail.gmail.com>
Date:   Fri, 2 Sep 2022 07:53:09 +0800
From:   David Gow <davidgow@...gle.com>
To:     Shuah Khan <skhan@...uxfoundation.org>
Cc:     Joe Fradley <joefradley@...gle.com>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        KUnit Development <kunit-dev@...glegroups.com>,
        Jonathan Corbet <corbet@....net>, kernel-team@...roid.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] tools: Add new "test" taint to kernel-chktaint

On Fri, Sep 2, 2022 at 2:57 AM Shuah Khan <skhan@...uxfoundation.org> wrote:
>
> On 8/23/22 22:41, David Gow wrote:
> > On Wed, Aug 24, 2022 at 12:19 PM Joe Fradley <joefradley@...gle.com> wrote:
> >>
> >> Commit c272612cb4a2 ("kunit: Taint the kernel when KUnit tests are run")
> >> added a new taint flag for when in-kernel tests run. This commit adds
> >> recognition of this new flag in kernel-chktaint.
> >>
>
> What happens without this change? It isn't clear what this change is
> fixing.
>

Without this patch, running ./tools/debugging/kernel-chktaint against
a kernel tainted due to loading/running an in-kernel test (KUnit,
kselftest, etc) will not describe the reason for the taint:

Kernel is "tainted" for the following reasons:
For a more detailed explanation of the various taint flags see
Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources
or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html
Raw taint value as int/string: 262144/'G                 '

With this change (which should've been introduced along with the new
taint flag), the 'N' taint is printed correctly, along with an
explanation:

Kernel is "tainted" for the following reasons:
* an in-kernel test (such as a KUnit test) has been run (#18)
For a more detailed explanation of the various taint flags see
Documentation/admin-guide/tainted-kernels.rst in the Linux kernel sources
or https://kernel.org/doc/html/latest/admin-guide/tainted-kernels.html
Raw taint value as int/string: 262144/'G                 N'

> >> Reviewed-by: David Gow <davidgow@...gle.com>
> >> Signed-off-by: Joe Fradley <joefradley@...gle.com>
> >> ---
> >> Changes in v2:
> >> - based off of kselftest/kunit branch
> >> - Added David's Reviewed-by tag
> >>
> >
> > This still looks good to me.
> >
> > Unless anyone objects, I guess we'll take this through the KUnit
> > branch (which, after all, is where the taint was originally added).
> > I've added it to the list for 6.1, but it technically could be
> > considered a fix for 6.0 as well.
> >
>
> I can definitely take this for Linux 6.0 with additional information
> on the problems seen without this change.
>

Yeah, basically the output from kernel-chktaint is incomplete (and, in
the case of the taint string, I'd argue wrong).

Not a disaster if this doesn't land for 6.0, but given 6.0 c an
generate the new taint flag, it makes sense to decode it correctly if
possible.

Cheers,
-- David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ