From: Arjan van de Ven <arjan@linux.intel.com>
To: Kees Cook <keescook@chromium.org>, John Stultz <john.stultz@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>,
Oren Laadan <orenl@cellrox.com>,
Ruchi Kandoi <kandoiruchi@google.com>,
Rom Lemarchand <romlem@android.com>,
Android Kernel Team <kernel-team@android.com>,
Todd Kjos <tkjos@google.com>, Colin Cross <ccross@android.com>,
Nick Kralevich <nnk@google.com>,
Dmitry Shmidt <dimitrysh@google.com>,
Elliott Hughes <enh@google.com>
Subject: Re: [PATCH 2/2] proc: Add /proc/<pid>/timerslack_ns interface
Date: Wed, 13 Jul 2016 22:29:40 -0700 [thread overview]
Message-ID: <df4496b1-17dc-1da5-77c5-6c94fcd1e147@linux.intel.com> (raw)
In-Reply-To: <CAGXu5jJwAVdKBKUgWgGvwoHn8p7bNWMVK8+BNqmaE+Q7TrT1rA@mail.gmail.com>
On 7/13/2016 8:39 PM, Kees Cook wrote:
>>
>> So I worry I'm a bit stuck here. For general systems, CAP_SYS_NICE is
>> too low a level of privilege to set a tasks timerslack, but
>> apparently CAP_SYS_PTRACE is too high a privilege for Android's
>> system_server to require just to set a tasks timerslack value.
>>
>> So I wanted to ask again if we might consider backing this down to
>> CAP_SYS_NICE, or if we can instead introduce a new CAP_SYS_TIMERSLACK
>> or something to provide the needed in-between capability level.
>
> Adding new capabilities appears to not really be viable (lots of
> threads about this...)
>
> I think the original CAP_SYS_NICE should be fine. A malicious
> CAP_SYS_NICE process can do plenty of insane things, I don't feel like
> the timer slack adds to any realistic risks.
if the result is really as bad as you describe, then that is worse than
the impact of this being CAP_SYS_NICE, and thus SYS_TRACE is maybe the
purist answer, but not the pragmatic best answer; certainly I don't want
to make the overall system security worse.
I wonder how much you want to set the slack; one of the options (and I don't
know how this will work in the code, if it's horrible don't do it)
is to limit how much slack CAP_SYS_NICE can set (say, 50 or 100 msec, e.g. in the order
of a "time slice" or two if Linux had time slices, similar to what nice would do)
while CAP_SYS_TRACE can set the full 4 seconds.
If it makes the code horrible, don't do it and just do SYS_NICE.
next prev parent reply other threads:[~2016-07-14 5:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 1:06 [PATCH 0/2] Extend timer_slack_ns to u64 on 32bit systems & add /proc/<pid>/timerslack_ns John Stultz
2016-02-17 1:06 ` [PATCH 1/2] timer: Convert timer_slack_ns from unsigned long to u64 John Stultz
2016-02-17 1:06 ` [PATCH 2/2] proc: Add /proc/<pid>/timerslack_ns interface John Stultz
2016-02-17 19:35 ` Andrew Morton
2016-02-17 20:09 ` Kees Cook
2016-02-17 20:18 ` Andrew Morton
2016-02-17 20:51 ` John Stultz
2016-02-17 21:07 ` Andrew Morton
2016-02-17 22:29 ` John Stultz
2016-02-17 22:45 ` Kees Cook
2016-02-17 22:51 ` John Stultz
2016-02-17 22:53 ` Andrew Morton
2016-02-17 20:49 ` John Stultz
2016-02-18 5:59 ` [PATCH] proc: /proc/<pid>/timerslack_ns permissions fixes John Stultz
2016-02-18 17:52 ` Kees Cook
2016-07-13 23:47 ` [PATCH 2/2] proc: Add /proc/<pid>/timerslack_ns interface John Stultz
2016-07-14 3:39 ` Kees Cook
2016-07-14 5:29 ` Arjan van de Ven [this message]
2016-07-14 12:48 ` Serge E. Hallyn
2016-07-14 13:42 ` Arjan van de Ven
2016-07-14 16:01 ` John Stultz
2016-07-14 16:09 ` John Stultz
2016-07-14 17:45 ` Kees Cook
2016-07-14 17:48 ` Arjan van de Ven
2016-07-14 17:49 ` Serge E. Hallyn
2016-07-14 17:56 ` Kees Cook
2016-07-14 20:21 ` Serge E. Hallyn
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=df4496b1-17dc-1da5-77c5-6c94fcd1e147@linux.intel.com \
--to=arjan@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=ccross@android.com \
--cc=dimitrysh@google.com \
--cc=enh@google.com \
--cc=john.stultz@linaro.org \
--cc=kandoiruchi@google.com \
--cc=keescook@chromium.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nnk@google.com \
--cc=orenl@cellrox.com \
--cc=romlem@android.com \
--cc=tglx@linutronix.de \
--cc=tkjos@google.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
Powered by JetHome