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: <CAE-Z64Fpq8ZG9CSiKS7QS0Oa_qHQyWhTeOJy3wTEy2BJorFNcQ@mail.gmail.com>
Date: Mon, 15 Dec 2025 15:01:10 +0100
From: Anders Grahn <anders.grahn@...il.com>
To: Florian Westphal <fw@...len.de>
Cc: Pablo Neira Ayuso <pablo@...filter.org>, Jozsef Kadlecsik <kadlec@...filter.org>, Phil Sutter <phil@....cc>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Anders Grahn <anders.grahn@...termo.com>, 
	linux-kernel@...r.kernel.org, netfilter-devel@...r.kernel.org, 
	coreteam@...filter.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netfilter: nft_counter: Fix reset of counters on 32bit archs

> That still truncates val on 32bit.  Maybe use "s64 val"?

Agree. Thanks for the feedback.

On 32bit archs, you're definitely right. It would truncate the counter value on
32bit. However, the problem I intended to fix was the fact that, previously, a
negative value was passed to u64_stats_add() which always wrapped.

Initially, I was a bit reluctant to use s64 for u64_stats_sub() as I wanted to
keep the signature the same as the existing u64_stats_add(). As u64_stats_add()
is used in a lot of places, I was not sure about the effect of this.

However, I can prepare a v2 with just u64_stats_sub(u64_stats_t *, s64).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ