From: Andrew Morton <akpm@linux-foundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Rob Landley <rob@landley.net>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Doug Ledford <dledford@redhat.com>,
Marcel Holtmann <marcel@holtmann.org>,
Serge Hallyn <serge.hallyn@canonical.com>,
Joe Korty <joe.korty@ccur.com>,
David Howells <dhowells@redhat.com>,
James Morris <james.l.morris@oracle.com>,
linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3] fs: introduce pipe-only dump mode suid_dumpable=3
Date: Fri, 22 Jun 2012 12:55:51 -0700 [thread overview]
Message-ID: <20120622125551.269552c2.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120622192413.GA5774@www.outflux.net>
On Fri, 22 Jun 2012 12:24:13 -0700
Kees Cook <keescook@chromium.org> wrote:
> The value
> of suid_dumpable=2 is now historic, and attempting to set this sysctl
> value returns -EINVAL.
This sounds a bit harsh - will it not cause existing configurations to
immediately break? If so, would it not be better to retain the =2 mode
for a while, and emit a nice warning when it is set?
>
> ...
>
> +/* Allow only the valid suid_dumpable values. */
> +static int do_proc_dointvec_suid_dumpable_conv(bool *negp,
> + unsigned long *lvalp, int *valp, int write, void *data)
> +{
> + if (write) {
> + int val = *negp ? -*lvalp : *lvalp;
> + if (val != SUID_DUMPABLE_DISABLED &&
> + val != SUID_DUMPABLE_ENABLED &&
> + val != SUID_DUMPABLE_PIPE_ONLY)
> + return -EINVAL;
> + *valp = val;
> + } else {
> + int val = *valp;
> + if (val < 0) {
> + *negp = true;
> + *lvalp = (unsigned long)-val;
> + } else {
> + *negp = false;
> + *lvalp = (unsigned long)val;
Those two typecasts are unneeded.
> + }
> + }
> + return 0;
> +}
> +
next prev parent reply other threads:[~2012-06-22 19:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 19:24 [PATCH v3] fs: introduce pipe-only dump mode suid_dumpable=3 Kees Cook
2012-06-22 19:55 ` Andrew Morton [this message]
2012-06-22 21:09 ` Kees Cook
2012-06-22 21:34 ` Andrew Morton
2012-06-22 21:51 ` Kees Cook
2012-06-22 21:57 ` Andrew Morton
2012-06-22 22:07 ` Kees Cook
2012-06-22 22:20 ` Andrew Morton
2012-06-22 22:26 ` Kees Cook
2012-06-23 7:30 ` James Morris
2012-06-23 22:34 ` Rob Landley
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=20120622125551.269552c2.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=dhowells@redhat.com \
--cc=dledford@redhat.com \
--cc=ebiederm@xmission.com \
--cc=james.l.morris@oracle.com \
--cc=joe.korty@ccur.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rob@landley.net \
--cc=serge.hallyn@canonical.com \
--cc=viro@zeniv.linux.org.uk \
/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).