public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kees Cook <keescook@chromium.org>
Cc: John Stultz <john.stultz@linaro.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Ruchi Kandoi <kandoiruchi@google.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Oren Laadan <orenl@cellrox.com>,
	Rom Lemarchand <romlem@android.com>,
	Android Kernel Team <kernel-team@android.com>
Subject: Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread.
Date: Fri, 5 Feb 2016 12:50:08 -0800	[thread overview]
Message-ID: <20160205125008.15ccbdbe82afc3521a8ee381@linux-foundation.org> (raw)
In-Reply-To: <CAGXu5j+W0oOCu1RR9FpEwX8ztiNHnpGpO2PyS54oMG85Yf08GQ@mail.gmail.com>

On Fri, 5 Feb 2016 12:44:04 -0800 Kees Cook <keescook@chromium.org> wrote:

> On Fri, Feb 5, 2016 at 12:39 PM, John Stultz <john.stultz@linaro.org> wrote:
> > On Fri, Feb 5, 2016 at 12:32 PM, Andrew Morton
> > <akpm@linux-foundation.org> wrote:
> >> On Fri, 5 Feb 2016 12:23:13 -0800 John Stultz <john.stultz@linaro.org> wrote:
> >>> On Fri, Feb 5, 2016 at 12:13 PM, Andrew Morton
> >>> <akpm@linux-foundation.org> wrote:
> >>>>
> >>>> IOW, it would be more consistent to add sys_set_timer_slack()?
> >>>
> >>> I'm fine with moving this way.
> >>>
> >>> Ruchi/Rom: Any objections to that idea?
> >>>
> >>> Thomas/Arjan: Any other functionality we should consider including
> >>> when adding a syscall to tweak timer slack?
> >>
> >> A syscall is quite a bit more fuss - implement it on x86_64, provide a
> >> no-op default in sys_ni.c, add a test suite into
> >> tools/testing/selftests (mainly for arch maintainers), wait for the
> >> various arch maintainers to wire it up.
> >
> > Yea. It is. And I'm not excited to start over on this, but this
> > functionality has already run into trouble in the Android tree, as the
> > PR_SET_TIMERSLACK_PID value has hit multiple collisions over time.  So
> > this functionality upstream would help resolve that pain.
> >
> >> Fortunately the build system now emits little messages which tell
> >> maintainers that there's a new syscall which needs looking at.
> >>
> >> And a manpage will be needed, but a prctl manpage patch would have been
> >> needed anyway.
> >
> > Yea.
> 
> Could this be exposed as a writable /proc entry instead? Like the oom_* stuff?

/proc/<pid>/timer_slack_ns, guarded by ptrace_may_access(), documented
under Documentation/?  Yup, that would work.  It's there for all
architectures from day one and there is precedent.  It's not as nice,
but /proc nasties will always be with us.

  reply	other threads:[~2016-02-05 20:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 18:08 [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack of an arbitrary thread John Stultz
2016-02-05 20:10 ` Kees Cook
2016-02-05 20:18   ` John Stultz
2016-02-05 20:13 ` Andrew Morton
2016-02-05 20:23   ` John Stultz
2016-02-05 20:32     ` Andrew Morton
2016-02-05 20:39       ` John Stultz
2016-02-05 20:44         ` Kees Cook
2016-02-05 20:50           ` Andrew Morton [this message]
2016-02-05 22:35             ` John Stultz
2016-02-06  0:51               ` John Stultz
2016-02-06  1:56                 ` Andrew Morton
2016-02-06  2:41                   ` John Stultz
2016-02-06  2:15                 ` Arjan van de Ven
2016-02-06  2:50                   ` John Stultz
2016-02-06  2:54                     ` Arjan van de Ven

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=20160205125008.15ccbdbe82afc3521a8ee381@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.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=orenl@cellrox.com \
    --cc=romlem@android.com \
    --cc=tglx@linutronix.de \
    /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