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>] [day] [month] [year] [list]
Message-ID: <ZPhrWDYL+JfI6upH@casper.infradead.org>
Date:   Wed, 6 Sep 2023 13:06:48 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Edward AD <eadavis@...a.com>
Cc:     syzbot+b591856e0f0139f83023@...kaller.appspotmail.com,
        akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] mm: as the same logic with queue_pages_range

On Wed, Sep 06, 2023 at 02:19:02PM +0800, Edward AD wrote:
> Only dealwith queue_pages_range locked vmas.

What?

> Signed-off-by: Edward AD <eadavis@...a.com>
> ---
>  mm/mempolicy.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 42b5567e3773..13050b968479 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -1342,6 +1342,8 @@ static long do_mbind(unsigned long start, unsigned long len,
>  	vma_iter_init(&vmi, mm, start);
>  	prev = vma_prev(&vmi);
>  	for_each_vma_range(vmi, vma, end) {
> +		if (!vma || start < vma->vm_start)
> +			continue;

#define for_each_vma_range(__vmi, __vma, __end)                         \
        while (((__vma) = vma_find(&(__vmi), (__end))) != NULL)

How can this produce a vma that is either NULL or has a vm_start after start?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ