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  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:   Mon, 8 Jul 2019 10:35:34 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     Pengfei Li <lpf.vector@...il.com>
Cc:     akpm@...ux-foundation.org, urezki@...il.com, rpenyaev@...e.de,
        peterz@...radead.org, guro@...com, rick.p.edgecombe@...el.com,
        rppt@...ux.ibm.com, aryabinin@...tuozzo.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/vmalloc.c: Remove always-true conditional in
 vmap_init_free_space

On Tue, Jul 09, 2019 at 01:06:31AM +0800, Pengfei Li wrote:
> When unsigned long variables are subtracted from one another,
> the result is always non-negative.
> 
> The vmap_area_list is sorted by address.
> 
> So the following two conditions are always true.
> 
> 1) if (busy->va_start - vmap_start > 0)
> 2) if (vmap_end - vmap_start > 0)
> 
> Just remove them.

That condition won't be true if busy->va_start == vmap_start.

Powered by blists - more mailing lists