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:	Sun, 04 Mar 2012 11:43:40 +0400
From:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
To:	Hugh Dickins <hughd@...gle.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Johannes Weiner <hannes@...xchg.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 3.3] memcg: fix GPF when cgroup removal races with last
 exit

Konstantin Khlebnikov wrote:
> Hugh Dickins wrote:
>>
>> Konstantin, I've not yet looked into how this patch affects your
>> patchsets; but I do know that this surreptitious-switch-to-root
>> behaviour seemed nightmarish when I was doing per-memcg per-zone
>> locking (particularly inside something like __activate_page(), where
>> we del and add under a single lock), and unnecessary once you and I
>> secure the memcg differently.  So you may just want to revert this in
>> patches for linux-next; but I've a suspicion that now we understand
>> it better, this technique might still be usable, and more efficient.
>
> Yes, something like that. But, I  must fix my "isolated-pages" counters first,
> otherwise I just reintroduce this bug again.
>

I have thought little more and invented better approach: we can keep isolated pages
counted in lruvec->lru_size[] and vmstat counters. Thus isolated pages will prevent
removing it's memory cgroup. This method is more complicated than your tricky pushing
pages to root lruvec, but it more generic and does not adds new page-counters.
--
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