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: <608c7f17-037b-401b-9336-c26bd45d3147@redhat.com>
Date: Fri, 22 Nov 2024 10:32:19 +0100
From: David Hildenbrand <david@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
 "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 syzbot+3511625422f7aa637f0d@...kaller.appspotmail.com,
 stable@...r.kernel.org, Christoph Lameter <cl@...ux.com>
Subject: Re: [PATCH v1] mm/mempolicy: fix migrate_to_node() assuming there is
 at least one VMA in a MM

On 22.11.24 07:19, Andrew Morton wrote:
> On Wed, 20 Nov 2024 15:27:46 -0500 "Liam R. Howlett" <Liam.Howlett@...cle.com> wrote:
> 
>> I hate the extra check because syzbot can cause this as this should
>> basically never happen in real life, but it seems we have to add it.
> 
> So..
> 
> --- a/mm/mempolicy.c~mm-mempolicy-fix-migrate_to_node-assuming-there-is-at-least-one-vma-in-a-mm-fix
> +++ a/mm/mempolicy.c
> @@ -1080,7 +1080,7 @@ static long migrate_to_node(struct mm_st
>   
>   	mmap_read_lock(mm);
>   	vma = find_vma(mm, 0);
> -	if (!vma) {
> +	if (unlikely(!vma)) {
>   		mmap_read_unlock(mm);
>   		return 0;
>   	}
> _
> 
> ?

Why not, at least for documentation purposes. Because I don't think this 
is any fast-path we really care about, so expect the runtime effects to 
be mostly negligible. Thanks!

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ