From: Andrew Morton <akpm@linux-foundation.org>
To: Waiman Long <longman@redhat.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Al Viro <viro@zeniv.linux.org.uk>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH 0/5] sysctl: Enable easy addition of range showing sysctl parameters
Date: Wed, 7 Mar 2018 14:48:05 -0800 [thread overview]
Message-ID: <20180307144805.224a39e2ab72172f40c3f3d2@linux-foundation.org> (raw)
In-Reply-To: <1520454869-13871-1-git-send-email-longman@redhat.com>
On Wed, 7 Mar 2018 15:34:24 -0500 Waiman Long <longman@redhat.com> wrote:
> This patch series is to be applied on top of the patch
> series "ipc: Clamp *mni to the real IPCMNI limit"
> (https://lkml.org/lkml/2018/3/1/716).
>
> The purpose of this patch series is to enable easy addition of new
> auxillary sysctl parameters that can be read to display ranges of
> other sysctl parameters they are associated with.
>
> With this patch series applied, a developer can add a range-showing
> auxillary sysctl entries by just setting the CTL_FLAGS_SHOW_RANGE
> flag in the ctl_table entry that has a range to show and add one more
> to the number of reserved range entries in the CTL_RESERVE_RANGES()
> macro before the terminating null entry. The new auxillary sysctl
> parameters will have the "_range" suffix added.
>
> The number of ctl_table entries that have the CTL_FLAGS_SHOW_RANGE flag
> should match the number of reserved entries in the CTL_RESERVE_RANGES()
> macro. Otherwise, warning or error like below will be logged in the
> kernel ring buffer.
>
> Warning: Too many reserved ctl_table range entries ("shmmax")!
>
> Error: Insufficient reserved ctl_table range entries ("shmmax")!
>
> The IPC sysctl parameters msgmni and shmmni are extended to have
> those auxillary sysctl entries. As a result, one can now find out
> the range of allowable value by looking at the corresponding
> auxillary _range sysctl parameters. For example,
>
> % cat msgmni_range
> [0, 32768]
>
> That means the msgmni sysctl parameter has to be within the 0 - 32768
> range inclusively.
>
> ...
>
> fs/proc/proc_sysctl.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++---
> include/linux/sysctl.h | 52 +++++++++++++++++++++++++-
> ipc/ipc_sysctl.c | 5 ++-
> kernel/sysctl.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 238 insertions(+), 9 deletions(-)
That quite a bunch of new code and it's not clear to me that we get a
lot of value from it all. Perhaps I'm missing the point.
A worked example would help, along the lines of:
a) Here's how we do X at present and here's the output
b) Here's how we X after these patches and here's the new output
c) b) is better than a) for <reasons>
next prev parent reply other threads:[~2018-03-07 22:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 20:34 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 ` [PATCH 5/5] ipc: Show ranges of msgmni and shmmni with CTL_FLAGS_SHOW_RANGE Waiman Long
2018-03-07 22:48 ` Andrew Morton [this message]
2018-03-08 19:21 ` [PATCH 0/5] sysctl: Enable easy addition of range showing sysctl parameters 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=20180307144805.224a39e2ab72172f40c3f3d2@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--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
all inboxes | Powered by JetHome®