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: <20180201203205.Horde.YtKPm_GK0EOCMEr9mvnfcDd@gator4166.hostgator.com>
Date:   Thu, 01 Feb 2018 20:32:05 -0600
From:   "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Alan Cox <gnomes@...rguk.ukuu.org.uk>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        "Wong Hoi Sing, Edison" <hswong3i@...il.com>,
        "Hung Hing Lun, Mike" <hlhung3i@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tcp_lp: use 64-bit arithmetic instead of 32-bit

Hi Andrew,

Quoting Andrew Lunn <andrew@...n.ch>:

> On Wed, Jan 31, 2018 at 07:07:49PM -0600, Gustavo A. R. Silva wrote:
>>
>> Hi Alan,
>>
>> Quoting Alan Cox <gnomes@...rguk.ukuu.org.uk>:
>>
>> >On Wed, 31 Jan 2018 18:24:07 -0600
>> >"Gustavo A. R. Silva" <gustavo@...eddedor.com> wrote:
>> >
>> >>Cast to s64 some variables and a macro in order to give the
>> >>compiler complete information about the proper arithmetic to
>> >>use. Notice that these elements are used in contexts that
>> >>expect expressions of type s64 (64 bits, signed).
>> >>
>> >>Currently such expression are being evaluated using 32-bit
>> >>arithmetic.
>> >
>> >The question you need to ask is 'can it overflow 32bit maths', otherwise
>> >you are potentially making the system do extra work for no reason.
>> >
>>
>> Yeah, I get your point and it seems that in this particular case there is no
>> risk of a 32bit overflow, but in general and IMHO as the code evolves, the
>> use of incorrect arithmetic may have security implications in the future, so
>> I advocate for code correctness in this case.
>
> Hi Gustavo
>
> Is this on the hotpath? How much overhead does it add to 32 bit
> architectures which don't have 64 bit arithmetic in hardware? There
> are a lot of embedded systems which are 32 bit.
>

I'm sorry, I don't have access to 32-bit hardware at the moment.

Thanks
--
Gustavo




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ