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: <c17610f8-b34c-4abb-8d79-9c1678106add@nvidia.com>
Date: Sat, 2 Aug 2025 16:35:55 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>,
 Andrew Morton <akpm@...ux-foundation.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>, 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, Shuah Khan <shuah@...nel.org>
Cc: kernel@...labora.com
Subject: Re: [PATCH v2 3/8] selftests: kselftest.h: Add __unused macro

On 7/31/25 9:01 AM, Muhammad Usama Anjum wrote:
...
> diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
> index c3b6d2604b1e4..8d17036d88396 100644
> --- a/tools/testing/selftests/kselftest.h
> +++ b/tools/testing/selftests/kselftest.h
> @@ -92,6 +92,10 @@
>  #endif
>  #define __printf(a, b)   __attribute__((format(printf, a, b)))
>  
> +#ifndef __unused
> +#define __unused         __attribute__((__unused__))
> +#endif

Hi Muhammad,

In case you're interested in going slightly deeper on this:

Entertainingly, there are several kselftest dirs that also use this
attribute directly, and I quite enjoyed seeing that the *same* attribute
is now defined as:

    __maybe_unused
    __always_unused
    __unused         # from your patch here

$ git grep -n  '__attribute__((__unused__))'
bpf/prog_tests/sockmap_helpers.h:11:#define __always_unused     __attribute__((__unused__))
landlock/audit.h:28:#define __maybe_unused __attribute__((__unused__))
landlock/common.h:26:#define __maybe_unused __attribute__((__unused__))
mm/pkey-helpers.h:88:# define __maybe_unused __attribute__((__unused__))
mm/protection_keys.c:1307:      __attribute__((__unused__)) int peek_result;
net/ovpn/ovpn-cli.c:37:#define __always_unused __attribute__((__unused__))
perf_events/watermark_signal.c:20:#define __maybe_unused __attribute__((__unused__))



thanks,
-- 
John Hubbard


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ