From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892AbcGNQJi (ORCPT ); Thu, 14 Jul 2016 12:09:38 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:36471 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751835AbcGNQJf (ORCPT ); Thu, 14 Jul 2016 12:09:35 -0400 MIME-Version: 1.0 In-Reply-To: <20160714124806.GB31333@mail.hallyn.com> References: <1455671191-32105-1-git-send-email-john.stultz@linaro.org> <1455671191-32105-3-git-send-email-john.stultz@linaro.org> <20160714124806.GB31333@mail.hallyn.com> From: John Stultz Date: Thu, 14 Jul 2016 09:09:33 -0700 Message-ID: Subject: Re: [PATCH 2/2] proc: Add /proc//timerslack_ns interface To: "Serge E. Hallyn" Cc: Kees Cook , Andrew Morton , Thomas Gleixner , Arjan van de Ven , lkml , Oren Laadan , Ruchi Kandoi , Rom Lemarchand , Android Kernel Team , Todd Kjos , Colin Cross , Nick Kralevich , Dmitry Shmidt , Elliott Hughes Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2016 at 5:48 AM, Serge E. Hallyn wrote: > Quoting Kees Cook (keescook@chromium.org): >> 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. > > Can someone give a detailed explanation of what you could do with > the new timerslack feature and compare it to what you can do with > sys_nice? Looking at the man page for CAP_SYS_NICE, it looks like such a task can set a task as SCHED_FIFO, so they could fork some spinning processes and set them all SCHED_FIFO 99, in effect delaying all other tasks for an infinite amount of time. So one might argue setting large timerslack vlaues isn't that different risk wise? thanks -john