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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ed4ywb88.ffs@tglx>
Date: Wed, 02 Oct 2024 21:33:59 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jeff Layton <jlayton@...nel.org>, John Stultz <jstultz@...gle.com>,
 Stephen Boyd <sboyd@...nel.org>, Alexander Viro <viro@...iv.linux.org.uk>,
 Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, Steven
 Rostedt <rostedt@...dmis.org>, Masami Hiramatsu <mhiramat@...nel.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Jonathan Corbet
 <corbet@....net>, Randy Dunlap <rdunlap@...radead.org>, Chandan Babu R
 <chandan.babu@...cle.com>, "Darrick J. Wong" <djwong@...nel.org>, Theodore
 Ts'o <tytso@....edu>, Andreas Dilger <adilger.kernel@...ger.ca>, Chris
 Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba
 <dsterba@...e.com>, Hugh Dickins <hughd@...gle.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Chuck Lever <chuck.lever@...cle.com>, Vadim
 Fedorenko <vadim.fedorenko@...ux.dev>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
 linux-xfs@...r.kernel.org, linux-ext4@...r.kernel.org,
 linux-btrfs@...r.kernel.org, linux-nfs@...r.kernel.org,
 linux-mm@...ck.org, Jeff Layton <jlayton@...nel.org>
Subject: Re: [PATCH v9 07/12] timekeeping: add percpu counter for tracking
 floor swap events

On Wed, Oct 02 2024 at 14:49, Jeff Layton wrote:
> ---
>  fs/inode.c                         |  5 +++--

Grmbl. I explicitely asked to split this into timekeeping and fs
patches, no?

That allows me to pick the timekeeping patches up myself and give
Christian a stable tag to pull them from. That lets me deal with the
conflicts with other timekeeping stuff which is coming up instead of
having cross tree conflicts.

> +unsigned long timekeeping_get_mg_floor_swaps(void)
> +{
> +	int i;
> +	unsigned long sum = 0;

https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#variable-declarations

And please use 'cpu'

> +
> +	for_each_possible_cpu(i)
> +		sum += per_cpu(timekeeping_mg_floor_swaps, i);

This needs data_race(per_cpu.....) to tell KCSAN that this is
intentionally racy.

Your previous fs specific patch has the same issue.

> +	return sum < 0 ? 0 : sum;

Right, a sum of unsigned longs really needs to be checked for being negative.

>  #ifdef CONFIG_DEBUG_FS
> +DECLARE_PER_CPU(unsigned long, timekeeping_mg_floor_swaps);
> +static inline void timekeeping_inc_mg_floor_swaps(void)

Did you lose your newline key?. Can we please not glue this together for
readability sake?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ