From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37300 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726032AbeIHBLr (ORCPT ); Fri, 7 Sep 2018 21:11:47 -0400 From: Waiman Long To: "Luis R. Rodriguez" , Kees Cook , Andrew Morton , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, Al Viro , Matthew Wilcox , "Eric W. Biederman" , Takashi Iwai , Davidlohr Bueso , Waiman Long Subject: [PATCH v9 0/4] ipc: IPCMNI limit check for *mni & increase that limit Date: Fri, 7 Sep 2018 16:28:53 -0400 Message-Id: <1536352137-12003-1-git-send-email-longman@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: v8->v9: - Rebased to 4.19-rc2 (changes needed only in patches 3 & 4). - Drop patch 5 "ipc: Add a new ipcmni_compat sysctl to fall back to old behavior" as this patch may not really be needed. - Move 1 byte from sequence number to index in extended mode leading to 8M IPCMNI limit in extended mode. - Change some macro names to avoid name collision. v6 patch: https://lkml.org/lkml/2018/4/27/1094 v7 patch: https://lkml.org/lkml/2018/5/7/666 v8 patch: https://lkml.org/lkml/2018/6/18/706 The sysctl parameters msgmni, shmmni and semmni have an inherent limit of IPC_MNI (32k). However, users may not be aware of that because they can write a value much higher than that without getting any error or notification. Reading the parameters back will show the newly written values which are not real. The real IPCMNI limit is now enforced to make sure that users won't put in an unrealistic value. The first 2 patches enforce the limits. There are also users out there requesting increase in the IPCMNI value. The last 2 patches attempt to do that by using a boot kernel parameter "ipcmni_extend" to increase the IPCMNI limit from 32k to 8M if the users really want the extended value. Waiman Long (4): ipc: IPCMNI limit check for msgmni and shmmni ipc: IPCMNI limit check for semmni ipc: Allow boot time extension of IPCMNI from 32k to 8M ipc: Conserve sequence numbers in extended IPCMNI mode Documentation/admin-guide/kernel-parameters.txt | 3 ++ include/linux/ipc_namespace.h | 1 + ipc/ipc_sysctl.c | 42 ++++++++++++++++++-- ipc/util.c | 29 +++++++++----- ipc/util.h | 51 +++++++++++++++++++++---- 5 files changed, 107 insertions(+), 19 deletions(-) -- 1.8.3.1