From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com Date: Sat, 2 Jul 2011 21:31:36 +0400 From: Solar Designer Message-ID: <20110702173136.GF26232@openwall.com> References: <20110622152514.GA9521@albatros> <20110629151436.9be479fb.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110629151436.9be479fb.akpm@linux-foundation.org> Subject: [kernel-hardening] Re: [RFC] ipc: introduce shm_rmid_forced sysctl To: Andrew Morton Cc: Vasiliy Kulikov , kernel-hardening@lists.openwall.com, Randy Dunlap , "Eric W. Biederman" , "Serge E. Hallyn" , Daniel Lezcano , Oleg Nesterov , Tejun Heo , Ingo Molnar , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org List-ID: On Wed, Jun 29, 2011 at 03:14:36PM -0700, Andrew Morton wrote: > What a horrid patch. But given the POSIX (mis?)feature I don't see a > better way, and the feature seems desirable. Sigh. > > What sort of users would want to turn this on, and why? Originally, I introduced it into Linux 2.0.x-ow to allow for resource limits to be enforced on shared servers, such as with shared web hosting. A user is supposed to be limited by RLIMIT_AS * RLIMIT_NPROC. (This is awfully inflexible, lacking a separate per-user memory limit, but at least it's something.) However, with shared memory segments a user could bypass that limit, because those segments don't have to be tied to a process. So the patch changed that, requiring that any shm segment be tied to a process, or be destroyed. Alexander