From: Waiman Long <longman@redhat.com>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Matthew Wilcox <willy@infradead.org>,
Waiman Long <longman@redhat.com>
Subject: [PATCH 5/5] ipc: Show ranges of msgmni and shmmni with CTL_FLAGS_SHOW_RANGE
Date: Wed, 7 Mar 2018 15:34:29 -0500 [thread overview]
Message-ID: <1520454869-13871-6-git-send-email-longman@redhat.com> (raw)
In-Reply-To: <1520454869-13871-1-git-send-email-longman@redhat.com>
The CTL_FLAGS_SHOW_RANGE flag is added to the msgmni and shmmni
ctl_table entries to show their ranges. Two range table entries are
reserved for the new *_range sysctl parameters.
Signed-off-by: Waiman Long <longman@redhat.com>
---
ipc/ipc_sysctl.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 2c03f57..3b4d7cd 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -143,7 +143,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
.proc_handler = proc_ipc_dointvec_minmax,
.extra1 = &zero,
.extra2 = &ipc_mni,
- .flags = CTL_FLAGS_CLAMP_RANGE,
+ .flags = CTL_FLAGS_CLAMP_RANGE|CTL_FLAGS_SHOW_RANGE,
},
{
.procname = "shm_rmid_forced",
@@ -171,7 +171,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
.proc_handler = proc_ipc_dointvec_minmax,
.extra1 = &zero,
.extra2 = &ipc_mni,
- .flags = CTL_FLAGS_CLAMP_RANGE,
+ .flags = CTL_FLAGS_CLAMP_RANGE|CTL_FLAGS_SHOW_RANGE,
},
{
.procname = "auto_msgmni",
@@ -228,6 +228,7 @@ static int proc_ipc_sem_dointvec(struct ctl_table *table, int write,
.extra2 = &int_max,
},
#endif
+ CTL_RESERVE_RANGES(2)
{}
};
--
1.8.3.1
next prev parent reply other threads:[~2018-03-07 20:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 20:34 [PATCH 0/5] sysctl: Enable easy addition of range showing sysctl parameters Waiman Long
2018-03-07 20:34 ` [PATCH 1/5] sysctl: Clarify how the ctl_table.flags should be set Waiman Long
2018-03-07 20:34 ` [PATCH 2/5] sysctl: Add a new handler proc_show_minmax() Waiman Long
2018-03-07 20:34 ` [PATCH 3/5] sysctl: Add a new ctl_table flag to show min/max range Waiman Long
2018-03-07 20:34 ` [PATCH 4/5] proc/sysctl: Handle CTL_FLAGS_SHOW_RANGE ctl_table flag Waiman Long
2018-03-07 20:34 ` Waiman Long [this message]
2018-03-07 22:48 ` [PATCH 0/5] sysctl: Enable easy addition of range showing sysctl parameters Andrew Morton
2018-03-08 19:21 ` Waiman Long
2018-03-08 18:34 ` Luis R. Rodriguez
2018-03-08 19:11 ` Waiman Long
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=1520454869-13871-6-git-send-email-longman@redhat.com \
--to=longman@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox