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: <CE75595B-3281-404F-A208-1664D5B004D6@8x8.com>
Date: Tue, 18 Feb 2025 15:10:26 -0500
From: Jonathan Lennox <jonathan.lennox@....com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] tc: Fix rounding in tc_calc_xmittime and
 tc_calc_xmitsize.


> On Feb 17, 2025, at 1:14 AM, Stephen Hemminger <stephen@...workplumber.org> wrote:
> 
> On Wed, 5 Feb 2025 16:16:21 -0500
> Jonathan Lennox <jonathan.lennox@....com> wrote:
> 
>> The logic in tc that converts between sizes and times for a given rate (the
>> functions tc_calc_xmittime and tc_calc_xmitsize) suffers from double rounding,
>> with intermediate values getting cast to unsigned int.
> 
> The concept makes sense, but is missing a valid Signed-Off-by: and therefore
> needs to be resent.

Thanks, will fix in v2.

> Also, you don't need to rename the functions, why not always use floating point


There was another function using tc_calc_xmittime (tbv_print_opt) so I was worried
about breaking it, but on inspection I realize it’s also doing a calculation in double
and it’s just printing data, so it should be fine (and hopefully an improvement).

I’ve fixed this in v2 as well.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ