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:	Thu, 7 Jun 2012 22:28:17 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	akpm@...ux-foundation.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>, khlebnikov@...nvz.org,
	kamezawa.hiroyu@...fujitsu.com, markus@...ppelsdorf.de,
	oleg@...hat.com, stable@...r.kernel.org
Subject: Re: [patch 12/12] mm: correctly synchronize rss-counters at
 exit/exec

On Thu, 7 Jun 2012, Linus Torvalds wrote:
> No, this is apparently that same "almost there" patch from Oleg. I
> guarantee that it's wrong.
> 
>                 Linus
> 
> ---
> 
> [ This part, to be exact: ]
> 
> On Thu, Jun 7, 2012 at 6:16 PM, Hugh Dickins <hughd@...gle.com> wrote:
> > --- a/kernel/tsacct.c
> > +++ b/kernel/tsacct.c
> > @@ -91,6 +91,7 @@ void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
> >        stats->virtmem = p->acct_vm_mem1 * PAGE_SIZE / MB;
> >        mm = get_task_mm(p);
> >        if (mm) {
> > +               sync_mm_rss(mm);
> >                /* adjust to KB unit */
> >                stats->hiwater_rss   = get_mm_hiwater_rss(mm) * PAGE_SIZE / KB;
> >                stats->hiwater_vm    = get_mm_hiwater_vm(mm)  * PAGE_SIZE / KB;
> > --

Yup.

It does look as if Oleg's intent (last chance to update xacct stats
from dying current task) would be well served by changing that to

		if (p == current)
			sync_mm_rss(mm);

but I've made too many hurried decisions recently to sign off on that.

Hugh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ