Bug 831133 - feature request: shm_rmid_forced
feature request: shm_rmid_forced
Status: CLOSED DUPLICATE of bug 781600
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.4
Unspecified Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Jerome Marchand
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-12 05:35 EDT by Vasiliy Kulikov
Modified: 2012-07-10 11:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-10 11:51:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
add shm_rmid_forced sysctl (11.02 KB, patch)
2012-06-12 05:35 EDT, Vasiliy Kulikov
no flags Details | Diff

  None (edit)
Description Vasiliy Kulikov 2012-06-12 05:35:26 EDT
Created attachment 591151 [details]
add shm_rmid_forced sysctl

This patch is a backport of shm_rmid_forced patch from upstream kernel.

"This patch adds support for shm_rmid_forced sysctl.  If set to 1, all
shared memory objects in current ipc namespace will be automatically
forced to use IPC_RMID.  POSIX way of handling shmem allows to create
shm objects and call shmdt() leaving shm object associated with no
process, thus consuming memory not counted via rlimits.  With
shm_rmid_forced=1 the shared memory object is counted at least for one
process, so OOM killer may effectively kill the fat process holding
the shared memory.

It obviously breaks POSIX, some programs relying on the feature would
stop working.  So, set shm_rmid_forced=1 only if you're sure nobody uses
"orphaned" memory.  shm_rmid_forced=0 by default for compatability
reasons.

The feature was previously impemented in -ow as a configure option."


The LKML discussion:
http://www.openwall.com/lists/kernel-hardening/2011/06/22/4

The merged patches:
140d0b2108faebc77c6523296e211e509cb9f5f9
298507d4d2cff2248e84afcf646b697301294442
33a30ed4bdccd95ed84a1a20c1fef8ac89788ce5
4c677e2eefdba9c5bfc4474e2e91b26ae8458a1d
5774ed014f02120db9a6945a1ecebeb97c2acccb
b34a6b1da371ed8af1221459a18c67970f7e3d53
Comment 2 Petr Matousek 2012-06-12 05:50:07 EDT
b34a6b1da371ed8af1221459a18c67970f7e3d53 is already present in 6.3, not sure about the others.
Comment 3 Jerome Marchand 2012-07-10 11:51:01 EDT
This is a duplicate of bz 781600.

*** This bug has been marked as a duplicate of bug 781600 ***

Note You need to log in before you can comment on or make changes to this bug.