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:	Fri, 09 Apr 2010 20:19:04 -0400
From:	Rik van Riel <riel@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	Johannes Weiner <hannes@...xchg.org>,
	Borislav Petkov <bp@...en8.de>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan.kim@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Lee Schermerhorn <Lee.Schermerhorn@...com>,
	Nick Piggin <npiggin@...e.de>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	sgunderson@...foot.com
Subject: Re: [PATCH -v2] rmap: make anon_vma_prepare link in all the anon_vmas
 of a mergeable VMA

On 04/09/2010 07:56 PM, Linus Torvalds wrote:

> So _instead_ of all the patches that have floated about, I would suggest
> this simple change to "find_mergeable_anon_vma()" instead..

Boris, this is your chance to really ruin our week :)

If the bug persists with Linus's patch, we've been fixing
the wrong bug all week long, and you are experiencing
something else...

I'm getting really curious now.

> ---
>   mm/mmap.c |    6 ++++--
>   1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 75557c6..462a8ca 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -850,7 +850,8 @@ struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *vma)
>   	vm_flags = vma->vm_flags&  ~(VM_READ|VM_WRITE|VM_EXEC);
>   	vm_flags |= near->vm_flags&  (VM_READ|VM_WRITE|VM_EXEC);
>
> -	if (near->anon_vma&&  vma->vm_end == near->vm_start&&
> +	if (near->anon_vma&&  list_is_singular(&near->anon_vma_chain)&&
> +			vma->vm_end == near->vm_start&&
>    			mpol_equal(vma_policy(vma), vma_policy(near))&&
>   			can_vma_merge_before(near, vm_flags,
>   				NULL, vma->vm_file, vma->vm_pgoff +
> @@ -871,7 +872,8 @@ try_prev:
>   	vm_flags = vma->vm_flags&  ~(VM_READ|VM_WRITE|VM_EXEC);
>   	vm_flags |= near->vm_flags&  (VM_READ|VM_WRITE|VM_EXEC);
>
> -	if (near->anon_vma&&  near->vm_end == vma->vm_start&&
> +	if (near->anon_vma&&  list_is_singular(&near->anon_vma_chain)&&
> +			near->vm_end == vma->vm_start&&
>     			mpol_equal(vma_policy(near), vma_policy(vma))&&
>   			can_vma_merge_after(near, vm_flags,
>   				NULL, vma->vm_file, vma->vm_pgoff))

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ