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: <alpine.DEB.2.00.1210190229450.26815@chino.kir.corp.google.com>
Date:	Fri, 19 Oct 2012 02:31:33 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Glauber Costa <glommer@...allels.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	cgroups@...r.kernel.org, Mel Gorman <mgorman@...e.de>,
	Tejun Heo <tj@...nel.org>, Michal Hocko <mhocko@...e.cz>,
	Johannes Weiner <hannes@...xchg.org>,
	kamezawa.hiroyu@...fujitsu.com, Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>, devel@...nvz.org,
	linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH v5 06/14] memcg: kmem controller infrastructure

On Fri, 19 Oct 2012, Glauber Costa wrote:

> >>> Do we actually need to test PF_KTHREAD when current->mm == NULL? 
> >>> Perhaps because of aio threads whcih temporarily adopt a userspace mm?
> >>
> >> I believe so. I remember I discussed this in the past with David
> >> Rientjes and he advised me to test for both.
> >>
> > 
> > PF_KTHREAD can do use_mm() to assume an ->mm but hopefully they aren't 
> > allocating slab while doing so.  Have you considered actually charging 
> > current->mm->owner for that memory, though, since the kthread will have 
> > freed the memory before unuse_mm() or otherwise have charged it on behalf 
> > of a user process, i.e. only exempting PF_KTHREAD?
> > 
> I always charge current->mm->owner.
> 

Yeah, I'm asking have you considered charging current->mm->owner for the 
memory when a kthread (current) assumes the mm of a user process via 
use_mm()?  It may free the memory before calling unuse_mm(), but it's also 
allocating the memory on behalf of a user so this exemption might be 
dangerous if use_mm() becomes more popular.  I don't think there's 
anything that prevents that charge, I'm just wondering if you considered 
doing it even for kthreads with an mm.
--
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