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: <c0ff39e2-27fc-170f-00f5-d5e9ab5a22cd@huawei.com>
Date:   Tue, 15 Mar 2022 20:30:49 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Matthew Wilcox <willy@...radead.org>
CC:     <akpm@...ux-foundation.org>, <hughd@...gle.com>,
        <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/mlock: remove unneeded start >= vma->vm_end check

On 2022/3/15 0:17, Matthew Wilcox wrote:
> On Mon, Mar 14, 2022 at 11:32:23PM +0800, Miaohe Lin wrote:
>> If find_vma returns a vma, it must satisfies that start < vma->vm_end.
>> Since vma list is sorted in the ascending order, so we will never see
>> start >= vma->vm_end here. Remove this unneeded check.
> 
> faulty logic; vm_start + len might wrap.

Many thanks for comment. I agree with you about "vm_start + len" might wrap.
But what I mean here is that we will never see "start" >= vma->vm_end here
as find_vma guarantees this. And I leave the "start + len <=  vma->vm_start"
check untouched. So my cleanup should be right. Or am I miss something?

Thanks.

> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ