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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1601271214170.3886@nanos>
Date:	Wed, 27 Jan 2016 12:15:47 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Arjan van de Ven <arjan@...ux.intel.com>
cc:	John Stultz <john.stultz@...aro.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Ruchi Kandoi <kandoiruchi@...gle.com>,
	Oren Laadan <orenl@...lrox.com>,
	Micha Kalfon <micha@...lrox.com>,
	Rom Lemarchand <romlem@...roid.com>,
	Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [RFC][PATCH v2] prctl: Add PR_SET_TIMERSLACK_PID for setting
 timer slack of an arbitrary thread.

On Tue, 26 Jan 2016, Arjan van de Ven wrote:
> On 1/25/2016 8:28 PM, John Stultz wrote:
> > From: Ruchi Kandoi <kandoiruchi@...gle.com>
> > 
> > This allows power/performance management software to set timer
> > slack for other threads according to its policy for the thread
> > (such as when the thread is designated foreground vs. background
> > activity)
> > 
> > Second argument is similar to PR_SET_TIMERSLACK, if non-zero
> > then the slack is set to that value otherwise sets it to the
> > default for the thread.
> > 
> > Takes PID of the thread as the third argument.
> > 
> > This interface checks that the calling task has permissions to
> > to use PTRACE_MODE_ATTACH on the target task, so that we can
> > ensure arbitrary apps do not change the timer slack for other
> > apps.
> 
> Acked-by: Arjan van de Ven <arjan@...ux.intel.com>
> 
> only slight concern is the locking around the value of the field in the task
> struct,
> but nobody does read-modify-write on it, so they'll get either the new or the
> old version,
> which should be ok.
> 
> (until now only the local thread would touch the field, and if you're setting
> it, by definition
> you're not going to sleep yet, so you're not using the field)

Even if you access it remote, it's a non issue. The task will see either the
old or the new value. Which is equally true when you add locking around the
write.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ