lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 5 Feb 2016 12:23:13 -0800
From:	John Stultz <john.stultz@...aro.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Ruchi Kandoi <kandoiruchi@...gle.com>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Oren Laadan <orenl@...lrox.com>,
	Rom Lemarchand <romlem@...roid.com>,
	Kees Cook <keescook@...omium.org>,
	Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH] prctl: Add PR_SET_TIMERSLACK_PID for setting timer slack
 of an arbitrary thread.

On Fri, Feb 5, 2016 at 12:13 PM, Andrew Morton
<akpm@...ux-foundation.org> wrote:
> On Fri,  5 Feb 2016 10:08:43 -0800 John Stultz <john.stultz@...aro.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?

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ