linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matteo Croce <mcroce@redhat.com>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: Luis Chamberlain <mcgrof@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: [PATCH 0/2] sysctl: share commonly used constants
Date: Tue,  9 Apr 2019 00:09:23 +0200	[thread overview]
Message-ID: <20190408220925.13077-1-mcroce@redhat.com> (raw)

In the sysctl code there are a lot of duplicate constants used to validate
the user input, which could be put in a shared place. Some of them are not
even constant, fix this with the following patches.
The first one declares the shared constants, the second one makes use of
them for the kernel/ sysctls.
If merged, I will send separate patches for the other susystems.

Matteo Croce (2):
  proc/sysctl: add shared variables for range check
  kernel: use sysctl shared variables for range check

 fs/proc/proc_sysctl.c  |   5 ++
 include/linux/sysctl.h |   4 +
 kernel/pid_namespace.c |   3 +-
 kernel/sysctl.c        | 193 ++++++++++++++++++++---------------------
 kernel/ucount.c        |   6 +-
 5 files changed, 107 insertions(+), 104 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-04-08 22:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 22:09 Matteo Croce [this message]
2019-04-08 22:09 ` [PATCH 1/2] proc/sysctl: add shared variables for range check Matteo Croce
2019-04-10 22:18   ` Kees Cook
2019-04-08 22:09 ` [PATCH 2/2] kernel: use sysctl " Matteo Croce
2019-04-10 18:46   ` Kees Cook
2019-04-10 19:23     ` Matteo Croce
2019-04-10 21:50       ` Kees Cook
2019-04-10 22:30         ` Matteo Croce
2019-04-10 22:34           ` Kees Cook
2019-04-10 22:54             ` Matteo Croce
2019-04-10 22:59               ` Kees Cook
2019-04-16 23:45                 ` Andrew Morton
2019-04-17  3:21   ` Kees Cook
2019-04-17  3:22     ` Kees Cook

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=20190408220925.13077-1-mcroce@redhat.com \
    --to=mcroce@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.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;
as well as URLs for NNTP newsgroup(s).