All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Vasiliy Kulikov <segoon@openwall.com>,
	solar@openwall.com, Andrew Morton <akpm@linux-foundation.org>,
	kernel-hardening@lists.openwall.com,
	Randy Dunlap <rdunlap@xenotime.net>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Serge E. Hallyn" <serge.hallyn@canonical.com>,
	Daniel Lezcano <daniel.lezcano@free.fr>,
	Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: [kernel-hardening] Re: [RFC] ipc: introduce shm_rmid_forced sysctl
Date: Sun, 3 Jul 2011 21:38:08 +0200	[thread overview]
Message-ID: <20110703193808.GA17797@elte.hu> (raw)
In-Reply-To: <20110701151827.7061dcda@lxorguk.ukuu.org.uk>


* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> > As we really prefer working systems over non-working ones (and lots 
> > of unattached shm segments can clearly result in a non-working 
> > system) we can only accept the "this will break stuff" argument if 
> > it's *demonstrated* to break stuff and if the failure scenario is 
> > carefully described in the commit.
> > 
> > It would take a serious breakage to override a "system locks up 
> > swapping itself to death" failure scenario.
> 
> Ths shared memory interface is defined to be persistent for good 
> reason and all sorts of apps rely upon that so no you can't just 
> ignore that. As a configurable alternative it makes sense (indeed 
> many SYS5 admins used to run shared memory segment sweepers to 
> clean up long idle ones)
> 
> However if it's locking the machine up and not being properly 
> handled by resource management then
> 
> a) your resource management is broken so fix that instead
> b) if your resource management is busted or you are not properly
> tracking resource commits then the user is going to be able to achieve the
> same result by other means (eg a unix domain socket bomb)
> 
> If you've got no overcommit set you shouldn't be able to swap to 
> death, it may be the sysv shared memory objects need to be 
> accounted for specifically somewhere but that would be the right 
> thing to fix and the mechanisms to do it exist.

But the majority of systems have overcommit enabled - that is our 
default.

This is a simple extension of the OOM killer being able to ... kill 
things on OOM, ok? 'to kill' implies 'to break'.

Thanks,

	Ingo

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Vasiliy Kulikov <segoon@openwall.com>,
	solar@openwall.com, Andrew Morton <akpm@linux-foundation.org>,
	kernel-hardening@lists.openwall.com,
	Randy Dunlap <rdunlap@xenotime.net>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Serge E. Hallyn" <serge.hallyn@canonical.com>,
	Daniel Lezcano <daniel.lezcano@free.fr>,
	Oleg Nesterov <oleg@redhat.com>, Tejun Heo <tj@kernel.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [RFC] ipc: introduce shm_rmid_forced sysctl
Date: Sun, 3 Jul 2011 21:38:08 +0200	[thread overview]
Message-ID: <20110703193808.GA17797@elte.hu> (raw)
In-Reply-To: <20110701151827.7061dcda@lxorguk.ukuu.org.uk>


* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> > As we really prefer working systems over non-working ones (and lots 
> > of unattached shm segments can clearly result in a non-working 
> > system) we can only accept the "this will break stuff" argument if 
> > it's *demonstrated* to break stuff and if the failure scenario is 
> > carefully described in the commit.
> > 
> > It would take a serious breakage to override a "system locks up 
> > swapping itself to death" failure scenario.
> 
> Ths shared memory interface is defined to be persistent for good 
> reason and all sorts of apps rely upon that so no you can't just 
> ignore that. As a configurable alternative it makes sense (indeed 
> many SYS5 admins used to run shared memory segment sweepers to 
> clean up long idle ones)
> 
> However if it's locking the machine up and not being properly 
> handled by resource management then
> 
> a) your resource management is broken so fix that instead
> b) if your resource management is busted or you are not properly
> tracking resource commits then the user is going to be able to achieve the
> same result by other means (eg a unix domain socket bomb)
> 
> If you've got no overcommit set you shouldn't be able to swap to 
> death, it may be the sysv shared memory objects need to be 
> accounted for specifically somewhere but that would be the right 
> thing to fix and the mechanisms to do it exist.

But the majority of systems have overcommit enabled - that is our 
default.

This is a simple extension of the OOM killer being able to ... kill 
things on OOM, ok? 'to kill' implies 'to break'.

Thanks,

	Ingo

  reply	other threads:[~2011-07-03 19:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 15:25 [kernel-hardening] [RFC] ipc: introduce shm_rmid_forced sysctl Vasiliy Kulikov
2011-06-22 15:25 ` Vasiliy Kulikov
2011-06-22 16:03 ` [kernel-hardening] " Randy Dunlap
2011-06-22 16:03   ` Randy Dunlap
2011-06-29 22:14 ` [kernel-hardening] " Andrew Morton
2011-06-29 22:14   ` Andrew Morton
2011-06-30  9:21   ` [kernel-hardening] " Vasiliy Kulikov
2011-06-30  9:21     ` Vasiliy Kulikov
2011-06-30 13:08     ` [kernel-hardening] " Vasiliy Kulikov
2011-06-30 13:08       ` Vasiliy Kulikov
2011-07-01 11:25   ` [kernel-hardening] " Ingo Molnar
2011-07-01 11:25     ` Ingo Molnar
2011-07-01 11:35     ` [kernel-hardening] " Vasiliy Kulikov
2011-07-01 11:35       ` Vasiliy Kulikov
2011-07-01 12:04       ` [kernel-hardening] " Ingo Molnar
2011-07-01 12:04         ` Ingo Molnar
2011-07-01 14:18         ` [kernel-hardening] " Alan Cox
2011-07-01 14:18           ` Alan Cox
2011-07-03 19:38           ` Ingo Molnar [this message]
2011-07-03 19:38             ` Ingo Molnar
2011-07-03 21:25             ` [kernel-hardening] " Alan Cox
2011-07-03 21:25               ` Alan Cox
2011-07-02 16:50       ` [kernel-hardening] " Solar Designer
2011-07-02 16:50         ` Solar Designer
2011-07-02 17:31   ` [kernel-hardening] " Solar Designer
2011-07-02 17:31     ` Solar Designer
2011-07-04 15:08 ` [kernel-hardening] " Oleg Nesterov
2011-07-04 15:08   ` Oleg Nesterov
2011-07-04 15:36   ` [kernel-hardening] " Vasiliy Kulikov
2011-07-04 15:36     ` Vasiliy Kulikov
2011-07-04 15:44     ` [kernel-hardening] " Oleg Nesterov
2011-07-04 15:44       ` Oleg Nesterov
2011-07-04 16:06       ` [kernel-hardening] " Vasiliy Kulikov
2011-07-04 16:06         ` Vasiliy Kulikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110703193808.GA17797@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=daniel.lezcano@free.fr \
    --cc=ebiederm@xmission.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=rdunlap@xenotime.net \
    --cc=segoon@openwall.com \
    --cc=serge.hallyn@canonical.com \
    --cc=solar@openwall.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.