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:	Mon, 27 Jul 2009 16:48:41 -0700
From:	Paul Menage <menage@...gle.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch -mmotm] mm: introduce oom_adj_child

On Sun, Jul 26, 2009 at 2:50 PM, David Rientjes<rientjes@...gle.com> wrote:
> +If oom_adj_child is set to equal oom_adj, then it will mirror oom_adj whenever
> +it changes.  This avoids having to set both values when simply tuning oom_adj
> +and that value should be inherited by all children.

Maybe have a distinct value for oom_adj_child (the default) that means
"default to mm->oom_adj" ?

Shouldn't oom_adj_child be per-task? Otherwise you're theoretically
allowing races between different threads that try to fork children
with different oom_adj values at the same time. Not a particularly
likely problem, but it seems bad to bake the change of races into the
API.

Also, I'm not sure that the requirement that oom_adj_child be >=
oom_adj is a good restriction. Sure, if a task gives its child a lower
oom_adj than itself it's potentially playing with fire, but it may
well be that the new child is expected todaemonize itself in the very
near future and hence no longer be the child of the current process. I
don't think that restricting the values that the sysadmin or root
processes can apply on the grounds that they might not do what they
want is the right approach.

It would also maybe be nicer to use a prctl() rather than introducing
yet another file in /proc/<pid> - but I guess that's a style argument
rather than a strict technical issue.

Paul
--
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