linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/4] ipc: Increase IPCMNI limit & IPC id generation modes
@ 2018-11-05 15:43 Waiman Long
  2018-11-05 15:43 ` [PATCH v10 1/4] ipc: Allow boot time extension of IPCMNI from 32k to 8M Waiman Long
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Waiman Long @ 2018-11-05 15:43 UTC (permalink / raw)
  To: Luis R. Rodriguez, Kees Cook, Andrew Morton, Jonathan Corbet
  Cc: linux-kernel, linux-fsdevel, linux-doc, Al Viro, Matthew Wilcox,
	Eric W. Biederman, Takashi Iwai, Davidlohr Bueso, Manfred Spraul,
	Waiman Long

v9->v10:
 - Drop v9 patches 1 & 2 because they have been merged upstream.
 - Minor twist to fix checkpatch warnings.
 - Add a new ipcid_mode sysctl parameter (new patches 3 & 4) to control
   how the IPC ids are being generated.

v7 patch: https://lkml.org/lkml/2018/5/7/666
v8 patch: https://lkml.org/lkml/2018/6/18/706
v9 patch: https://lkml.org/lkml/2018/9/7/1141  

There are users out there requesting increase in the IPCMNI value to
more than 32k. This patchset does that by using a boot kernel parameter
"ipcmni_extend" to increase the IPCMNI limit from 32k to 8M when that
boot command line option is specified.

To reduce the chance of id reuse, a new sysctl parameter ipcid_mode is
added for changing the way an IPC id is being generated. Currently,
three modes are supported - legacy, delete and cyclic. They differs
in the way the identifier and sequence number within an id are being
generated. This new mode is per IPC namespace.

The IPC id mode can be changed dynamically at run time, but extending
the IPCMNI number can only be done at boot time.

Patch 1 adds a "ipcmni_extend" boot command line parameter to extend
the IPCMNI limit from 32k to 8M.

Patch 2 changes how the sequence number within an id is being generated
to reduce the chance of id reuse with "ipcmni_extend".

Patch 3 decouples the new sequence generation mode into a new sysctl
parameter "ipcid_mode" so that it can be used even if "ipcmni_extend"
isn't specified.

Patch 4 adds a cyclic mode to "ipcid_mode" to allocate identifier
cyclically as well.

Waiman Long (4):
  ipc: Allow boot time extension of IPCMNI from 32k to 8M
  ipc: Conserve sequence numbers in extended IPCMNI mode
  ipc: Make the new sequence number generation mode available to all
  ipc: Add a cyclic mode for id generation

 Documentation/admin-guide/kernel-parameters.txt |  3 ++
 Documentation/sysctl/kernel.txt                 | 23 ++++++++++++
 include/linux/ipc_namespace.h                   | 14 +++++++
 ipc/ipc_sysctl.c                                | 25 ++++++++++++-
 ipc/msg.c                                       |  3 +-
 ipc/namespace.c                                 |  2 +
 ipc/sem.c                                       |  3 +-
 ipc/shm.c                                       |  3 +-
 ipc/util.c                                      | 41 +++++++++++++++------
 ipc/util.h                                      | 49 ++++++++++++++++++++-----
 10 files changed, 140 insertions(+), 26 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-08 21:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 15:43 [PATCH v10 0/4] ipc: Increase IPCMNI limit & IPC id generation modes Waiman Long
2018-11-05 15:43 ` [PATCH v10 1/4] ipc: Allow boot time extension of IPCMNI from 32k to 8M Waiman Long
2018-11-06 13:20   ` Matthew Wilcox
2018-11-08 21:29     ` Waiman Long
2018-11-05 15:43 ` [PATCH v10 2/4] ipc: Conserve sequence numbers in extended IPCMNI mode Waiman Long
2018-11-05 15:43 ` [PATCH v10 3/4] ipc: Make the new sequence number generation mode available to all Waiman Long
2018-11-06  4:53   ` kbuild test robot
2018-11-05 15:43 ` [PATCH v10 4/4] ipc: Add a cyclic mode for id generation Waiman Long
2018-11-06 13:02   ` Matthew Wilcox
2018-11-08 21:38     ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).