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: <bd0abacb-e0d5-40f5-b786-6021f6d8bd2e@linuxfoundation.org>
Date: Tue, 20 Feb 2024 16:07:28 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
 Guenter Roeck <linux@...ck-us.net>, David Gow <davidgow@...gle.com>,
 Brendan Higgins <brendan.higgins@...ux.dev>, Rae Moar <rmoar@...gle.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
 Matthew Auld <matthew.auld@...el.com>,
 Arunpravin Paneer Selvam <arunpravin.paneerselvam@....com>,
 Christian König <christian.koenig@....com>,
 kselftest list <linux-kselftest@...r.kernel.org>,
 KUnit Development <kunit-dev@...glegroups.com>,
 Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: Linux 6.8-rc5

On 2/20/24 13:16, Linus Torvalds wrote:
> On Tue, 20 Feb 2024 at 11:57, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>>
>> It turns out that that commit is buggy for another reason, but it's
>> hidden by the fact that apparently KUNIT_ASSERT_FALSE_MSG() doesn't
>> check the format string.
> 
> The fix for that is this:
> 
>    --- a/include/kunit/test.h
>    +++ b/include/kunit/test.h
>    @@ -579,7 +579,7 @@ void __printf(2, 3) kunit_log_append(struct
> string_stream *log, const char *fmt,
> 
>     void __noreturn __kunit_abort(struct kunit *test);
> 
>    -void __kunit_do_failed_assertion(struct kunit *test,
>    +void __printf(6,7) __kunit_do_failed_assertion(struct kunit *test,
>                                   const struct kunit_loc *loc,
>                                   enum kunit_assert_type type,
>                                   const struct kunit_assert *assert,
> 
> but that causes a *lot* of noise (not just in drm_buddy_test.c), so
> I'm not going to apply that fix as-is. Clearly there's a lot of
> incorrect format parameters that have never been checked.
> 
> Instead adding Shuah and the KUnit people to the participants, and
> hoping that they will fix this up and we can get the format fixes for
> KUnit in the 6.9 timeframe.
> 

We will take care of this for 6.9

> Side note: when I apply the above patch, the suggestions gcc spews out
> look invalid. Gcc seems to suggest turning a a format string of '%d"
> to "%ld" for a size_t variable. That's wrong. It should be "%zu".
> 
> A 'size_t' can in fact be 'unsigned int' on some platforms (not just
> in theory), so %ld is really incorrect not just from a sign
> perspective.
> 
> Anyway, I guess I will commit the immediate drm_buddy_test.c fix to
> get rid of the build issue, but the KUnit message format string issue
> will have to be a "let's get this fixed up _later_" issue.
> 
>                Linus

Thank you.

-- Shuah


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ