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: <CAM_iQpUHeNKGbjRY13nTp4F5fgEitQXz2W2C9GbqS+ygNhZGHg@mail.gmail.com>
Date:	Mon, 18 Jul 2016 11:29:33 -0700
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int

On Sat, Jul 16, 2016 at 7:08 AM, Konstantin Khlebnikov
<khlebnikov@...dex-team.ru> wrote:
> In kernel HTB keeps tokens in signed 64-bit in nanoseconds. In netlink
> protocol these values are converted into pshed ticks (64ns for now) and
> truncated to 32-bit. In struct tc_htb_xstats fields "tokens" and "ctokens"
> are declared as unsigned 32-bit but they could be negative thus tool 'tc'
> prints them as signed. Big values loose higher bits and/or become negative.
>
> This patch clamps tokens in xstat into range from INT_MIN to INT_MAX.
> In this way it's easier to understand what's going on here.

Makes sense to me, I don't know why we didn't use signed int in
the beginning, interpreting an unsigned int as signed is confusing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ