From: Andrew Morton <akpm@linux-foundation.org>
To: John Stultz <john.stultz@linaro.org>
Cc: 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>,
Kees Cook <keescook@chromium.org>,
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:32:30 -0800 [thread overview]
Message-ID: <20160205123230.bd8bd228a0f3798a281266eb@linux-foundation.org> (raw)
In-Reply-To: <CALAqxLVd=E5JuGdPXs8AL8gO7o1VAm0A-V=ZYVz8pz+NWeRRHA@mail.gmail.com>
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:
> > On Fri, 5 Feb 2016 10:08:43 -0800 John Stultz <john.stultz@linaro.org> wrote:
> >> @@ -2218,6 +2222,27 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
> >> case PR_GET_TID_ADDRESS:
> >> error = prctl_get_tid_address(me, (int __user **)arg2);
> >> break;
> >> + case PR_SET_TIMERSLACK_PID:
> >> + rcu_read_lock();
> >> + tsk = find_task_by_vpid((pid_t)arg3);
> >
> > hm, as far as I can tell this is the first instance in which prctl() is
> > used to play with a task other than "current". Maybe this isn't a good
> > precedent.
> >
> > If you look at all the other diddle-other-task functions in
> > kernel/sys.c, you'll see that they are standalone syscalls. What
> > you've done here is just a bit lazy: added what is effectively a new
> > standalone syscall, only it has been hidden within the prctl() switch
> > statement.
> >
> > I don't see a practical problem with this - we could have implemented
> > all those other syscalls as prctl submodes as well. But we didn't...
> >
> > 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.
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.
next prev parent reply other threads:[~2016-02-05 20:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 18:08 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 [this message]
2016-02-05 20:39 ` John Stultz
2016-02-05 20:44 ` Kees Cook
2016-02-05 20:50 ` Andrew Morton
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=20160205123230.bd8bd228a0f3798a281266eb@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
all inboxes | Powered by JetHome®