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: <20110611163943.GA3238@redhat.com>
Date:	Sat, 11 Jun 2011 18:39:43 +0200
From:	Andrea Arcangeli <aarcange@...hat.com>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Hiroyuki Kamezawa <kamezawa.hiroyuki@...il.com>,
	Ying Han <yinghan@...gle.com>, Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	Oleg Nesterov <oleg@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] [BUGFIX] update mm->owner even if no next owner.

On Sat, Jun 11, 2011 at 09:04:14AM -0700, Hugh Dickins wrote:
> I had another go at reproducing it, 2 hours that time, then a try with
> 692e0b35427a reverted: it ran overnight for 9 hours when I stopped it.
> 
> Andrea, please would you ask Linus to revert that commit before -rc3?
> Or is there something else you'd like us to try instead?  I admit that
> I've not actually taken the time to think through exactly how it goes
> wrong, but it does look dangerous.

Here I was asked if the mem_cgroup_newpage_charge need the mmap_sem at
all. And if not why not to release the mmap_sem early.

https://lkml.org/lkml/2011/3/14/276

So I didn't see why mmap_sem was needed, I also asked confirmation and
who answered agreed it was safe without mmap_sem even if it's the only
place doing that. Maybe that assumption was wrong and we need
mmap_sem after all if this commit is causing problems.

Or did you find something wrong in the actual patch?

Do I understand right that the bug just that we must run
alloc_hugepage_vma+mem_cgroup_newpage_charge within the same critical
section protected by the mmap_sem read mode? Do we know why?

> The way I reproduce it is with my tmpfs kbuilds swapping load,
> in this case restricting mem by memcg, and (perhaps the important
> detail, not certain) doing concurrent swapoff/swapon repeatedly -
> swapoff takes another mm_users reference to the mm it's working on,
> which can cause surprises.

Ok.
--
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