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.0907240227070.32622@chino.kir.corp.google.com>
Date:	Fri, 24 Jul 2009 02:27:20 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
cc:	Paul Menage <menage@...gle.com>, Rik van Riel <riel@...hat.com>,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mel@....ul.ie>, Nick Piggin <npiggin@...e.de>
Subject: Re: [PATCH] copy over oom_adj value at fork time

On Fri, 24 Jul 2009, KOSAKI Motohiro wrote:

> > Simply reverting it isn't an option unless you fix the underlying livelock 
> > problem that my patches originally addressed and no viable alternative has 
> > been proposed.
> 
> I disagree.
> I agree with old behavior have one bug. but it doesn't provide any regression
> allowing reason although old behavior is totally suck.
> 

I don't understand most of this, sorry.  I think what you're saying is 
that you don't fix one bug by introducing another.

The "regression" here is that changing /proc/pid/oom_adj for a vfork'd 
child would change the oom_adj value of the parent as well.  That is 
actually the behavior that leads to the livelock where the oom killer 
would repeatedly select a child and it could not be killed because it 
shares memory with an OOM_DISABLE parent.  That would cause the oom killer 
to be called by the page allocator infinitely without ever freeing memory.

That behavior is unacceptable, so I disagree that reverting my patches is 
an option.

I suggested a workaround by introducing /proc/pid/oom_adj_child which 
applications would need to use instead of oom_adj after vfork() and prior 
to execve() (if such open source applications exist in the first place).

> Not solve. "please rewrite your application" isn't good solution.
> 

They'd need to use the new interface because the old behavior would lead 
to a kernel livelock because it allowed tasks sharing memory to be 
oom disabled and enabled at the same time.  That seems like a very good 
reason to fix the application, otherwise it may livelock the kernel if its 
ooms before exec.  The behavior you're defending is the SOURCE of the 
livelock.

> Hm...
> This is just idea, Does moving oom_adj from mm_struct to signal_struct solve
> this problem?
> I mean vfork() share mm_struct, but doesn't share signal_struct.
> 

oom_adj values are not a characteristic of signals, they are a trait of 
memory.  They specify how the oom killer should favor (or disable) amounts 
of memory in oom conditions.
--
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