From: "Serge E. Hallyn" <serue@us.ibm.com>
To: mtk.manpages@gmail.com
Cc: lkml <linux-kernel@vger.kernel.org>,
"Andrew G. Morgan" <morgan@kernel.org>,
Ulrich Drepper <drepper@redhat.com>
Subject: Re: [PATCH v2] define convenient securebits masks for prctl users
Date: Thu, 15 Oct 2009 09:18:22 -0500 [thread overview]
Message-ID: <20091015141822.GB16162@us.ibm.com> (raw)
In-Reply-To: <cfd18e0f0910142226r59f3331fld435840dc96ea334@mail.gmail.com>
Quoting Michael Kerrisk (mtk.manpages@googlemail.com):
> Hi Serge,
>
> On Wed, Oct 14, 2009 at 11:15 PM, Serge E. Hallyn <serue@us.ibm.com> wrote:
> > The securebits are used by passing them to prctl with the
> > PR_{S,G}ET_SECUREBITS commands. But the defines must be
> > shifted to be used in prctl, which begs to be confused and
> > misused by userspace. So define some more convenient
> > values for userspace to specify. This way userspace does
> >
> > prctl(PR_SET_SECUREBITS, SECBIT_NOROOT);
> >
> > instead of
> >
> > prctl(PR_SET_SECUREBITS, 1 << SECURE_NOROOT);
> >
> > Thanks to Michael for the idea.
> >
> > This patch also adds include/linux/securebits to the installed headers.
> > Then perhaps it can be included by glibc's sys/prctl.h.
> >
> > Changelog:
> > Oct 14: (Suggestions by Michael Kerrisk):
> > 1. spell out SETUID in SECBIT_NO_SETUID*
> > 2. SECBIT_X_LOCKED does not imply SECBIT_X
> > 3. add definitions for keepcaps
>
> Thanks for these changes.
Thanks for taking a look and commenting!
> > Oct 14: As suggested by Michael Kerrisk, don't
> > use SB_* as that convention is already in
> > use. Use SECBIT_ prefix instead.
> >
> > Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
> > Acked-by: Andrew G. Morgan <morgan@kernel.org>
>
> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
thanks,
-serge
prev parent reply other threads:[~2009-10-15 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 21:15 [PATCH v2] define convenient securebits masks for prctl users Serge E. Hallyn
2009-10-15 5:26 ` Michael Kerrisk
2009-10-15 14:18 ` Serge E. Hallyn [this message]
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=20091015141822.GB16162@us.ibm.com \
--to=serue@us.ibm.com \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=morgan@kernel.org \
--cc=mtk.manpages@gmail.com \
/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