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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250822174259.bf4ed76a0da7d0d6f80ba2c1@linux-foundation.org>
Date: Fri, 22 Aug 2025 17:42:59 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: Shuah Khan <shuah@...nel.org>, David Hildenbrand <david@...hat.com>,
 Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, "Liam R. Howlett"
 <Liam.Howlett@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport
 <rppt@...nel.org>, Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko
 <mhocko@...e.com>, Jason Gunthorpe <jgg@...pe.ca>, John Hubbard
 <jhubbard@...dia.com>, Peter Xu <peterx@...hat.com>, Leon Romanovsky
 <leon@...nel.org>, Zi Yan <ziy@...dia.com>, Baolin Wang
 <baolin.wang@...ux.alibaba.com>, Nico Pache <npache@...hat.com>, Ryan
 Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>, Barry Song
 <baohua@...nel.org>, Paul Walmsley <paul.walmsley@...ive.com>, Palmer
 Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, Alexandre
 Ghiti <alex@...ti.fr>, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 linux-riscv@...ts.infradead.org, kevin.brodsky@....com,
 kernel@...labora.com
Subject: Re: [PATCH v3 0/8] selftests/mm: Add compiler flags and fix found
 warnings

On Fri, 22 Aug 2025 13:20:57 +0500 Muhammad Usama Anjum <usama.anjum@...labora.com> wrote:

> Recently, I reviewed a patch on the mm/kselftest mailing list about a
> test which had obvious type mismatch fix in it. It was strange why that
> wasn't caught during development and when patch was accepted. This led
> me to discover that those extra compiler options to catch these warnings
> aren't being used. When I added them, I found tens of warnings in just
> mm suite.
> 
> In this series, I'm adding these flags and fixing those warnings. In the
> last try several months ago [1], I'd patches for individual tests. I've
> made patches better by grouping the same type of fixes together. Hence
> there is no changelog for individual patches.

I think it would be best to avoid adding warnings to selftests which
aren't present in the main kernel code.  If only to avoid surprising
people over what isn't permissible in selftests/.

In particular, there's an expectation that we can do

#else
static inline int some_stub(type1 arg1, type2 arg2)
{
}
#endif

without warning.  We do this extensively.

Also, please be aware that there's already a patch in mm-new which
centralizes selftests' __maybe_unused definition.
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-centralise-maybe-unused-definition-in-kselftesth.patch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ