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: <c754c406-2816-4b70-a4a8-7a11b9ec45d3@efficios.com>
Date: Mon, 15 Dec 2025 08:35:58 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
 Tal Zussman <tz2294@...umbia.edu>, Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Ingo Molnar <mingo@...nel.org>,
 Rik van Riel <riel@...riel.com>, Andrew Morton <akpm@...ux-foundation.org>,
 "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>,
 x86@...nel.org, Will Deacon <will@...nel.org>,
 "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>, Nick Piggin
 <npiggin@...il.com>, Peter Zijlstra <peterz@...radead.org>,
 David Hildenbrand <david@...nel.org>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, linux-mm@...ck.org,
 linux-arch@...r.kernel.org
Subject: Re: [PATCH v2 2/2] mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS

On 2025-12-15 07:40, Lorenzo Stoakes wrote:
> On Fri, Dec 12, 2025 at 04:08:08AM -0500, Tal Zussman wrote:
>> This has been unused since it was added 11 years ago in commit
>> d17d8f9dedb9 ("x86/mm: Add tracepoints for TLB flushes").
>>
>> Acked-by: David Hildenbrand <david@...hat.com>
>> Reviewed-by: Rik van Riel <riel@...riel.com>
>> Signed-off-by: Tal Zussman <tz2294@...umbia.edu>
> 
> Hmm, guess just a way of counting the number of reasons, but if nobody's using
> it that's silly. So:

If TRACE_DEFINE_ENUM was implemented differently [1,2], then we could use
NR_TLB_FLUSH_REASONS in a static assert to validate that the number of
exported enum labels matches the enum tlb_flush_reason.

This would catch this kind of discrepancy at compile-time.

Thanks,

Mathieu

[1] https://github.com/lttng/lttng-modules/blob/master/include/instrumentation/events/sched.h#L132
[2] https://github.com/lttng/lttng-modules/blob/master/include/lttng/tracepoint-event-impl.h#L176

> 
-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ