public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Avi Kivity <avi@scylladb.com>
Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Proposal: CAP_PAYLOAD to reduce Meltdown and Spectre mitigation costs
Date: Sun, 7 Jan 2018 13:06:43 -0500	[thread overview]
Message-ID: <20180107180643.GG2404@thunk.org> (raw)
In-Reply-To: <d71a1b44-9b17-4b49-3a38-530c739e8d82@scylladb.com>

On Sun, Jan 07, 2018 at 02:51:59PM +0200, Avi Kivity wrote:
> 
> I don't see the connection. The browser wouldn't run with CAP_PAYLOAD set.
> 
> In a desktop system, only init retains CAP_PAYLOAD.
> 
> On a server that runs one application (and some supporting processes), only
> init and that one application have CAP_PAYLOAD (if the sysadmin makes it
> so).

In the classical (as defined by the withdrawn Posix draft spec)
capaibilities model, if you have a setuid root process it gets all the
capabilities, and capabilities are used to limit what privileges a
root process.  Hence using strict capabilities, any setuid root
process would have CAP_PAYLOAD.

Linux has extensions which allow you to have capability bound which
capabilities that can be obtained by a process, so you _could_ make it
work, but it just seems like an bad fit, since it's not strictly
speaking a root-owned privilege.  It's more like a configuration
setting, and so modulating it via cgroups attribute seems to make a
lot more sense --- it's certainly (IMHO) less confusing than trying to
ab(use) the capabilities system and its extensions in this fashion.

	    		 	    	- Ted

  reply	other threads:[~2018-01-07 18:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 19:33 Proposal: CAP_PAYLOAD to reduce Meltdown and Spectre mitigation costs Avi Kivity
2018-01-06 20:02 ` Alan Cox
2018-01-07  9:16   ` Avi Kivity
2018-01-07 12:29     ` Theodore Ts'o
2018-01-07 12:34       ` Ozgur
2018-01-07 12:51       ` Avi Kivity
2018-01-07 18:06         ` Theodore Ts'o [this message]
2018-01-06 20:24 ` Willy Tarreau
2018-01-07  9:14   ` Avi Kivity
2018-01-07 17:39     ` Willy Tarreau
2018-01-07 14:36   ` Alan Cox
2018-01-07 15:15     ` Avi Kivity
2018-01-07 17:26     ` Willy Tarreau
2018-01-08  1:33 ` Casey Schaufler
2018-01-18 22:49 ` Pavel Machek

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=20180107180643.GG2404@thunk.org \
    --to=tytso@mit.edu \
    --cc=avi@scylladb.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.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