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]
Date:   Thu, 4 Apr 2019 17:33:54 +0100
From:   Dmitry Safonov <dima@...sta.com>
To:     Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        David Ahern <dsahern@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Ido Schimmel <idosch@...lanox.com>, netdev@...r.kernel.org
Subject: Re: [RFC 1/4] net/ipv4/fib: Remove run-time check in tnode_alloc()

On 4/1/19 6:50 PM, Alexander Duyck wrote:
> On Mon, 2019-04-01 at 16:55 +0100, Dmitry Safonov wrote:
> Actually now that I think about it TNODE_VMALLOC_MAX is likely much
> less than 31. The logic that we have to be concerned with is:
> 	size = TNODE_SIZE(1ul << bits);
> 
> If size is a 32b value, and the size of a pointer is 4 bytes, then our
> upper limit is roughly ilog2((4G - 28) / 4), which comes out to 29.
> What we are trying to avoid is overflowing the size variable, not
> actually limiting the vmalloc itself.

Oh yes, I see - managed to forget that size can also overflow inside
TNODE_SIZE().
>> So, I wanted to remove run-time check here on x86_64..
>> I could do it by adding !CONFIG_64BIT around the check.
> 
> I have no problem with that. All I am suggesting is that if at all
> possible we should use TNODE_VMALLOC_MAX instead of BITS_PER_LONG.

Yeah, will rework this part.

Thanks,
          Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ