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]
Date:	Mon, 31 Mar 2014 15:11:56 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Viresh Kumar <viresh.kumar@...aro.org>
cc:	Frédéric Weisbecker <fweisbec@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	Linaro Networking <linaro-networking@...aro.org>
Subject: Re: [Query]: hrtimer: Does switch_hrtimer_base() need to check
 hrtimer_check_target()?

On Fri, 28 Mar 2014, Viresh Kumar wrote:

> Hi Thomas,
> 
> I couldn't understand one part of hrtimer (obviously there are
> others as well, but here I am sure I couldn't understood it :)).
> 
> In switch_hrtimer_base() we are calling hrtimer_check_target()
> which guarantees this:
> 
> /*
>  * With HIGHRES=y we do not migrate the timer when it is expiring
>  * before the next event on the target cpu because we cannot reprogram
>  * the target cpu hardware and we would cause it to fire late.
>  *
>  * Called with cpu_base->lock of target cpu held.
>  */
> 
> But switch_hrtimer_base() is only called from one place, i.e.
> __hrtimer_start_range_ns() and at the point (where we call
> switch_hrtimer_base()) expiration time is not yet known as
> we call this routine later:
> 
> hrtimer_set_expires_range_ns()
> 
> So, do we really need to call hrtimer_check_target() at all
> in switch_hrtimer_base()? Or do we need to move
> hrtimer_set_expires_range_ns() before calling
> switch_hrtimer_base() ??

Yes, we should move setting the expiry time before we call
switch_hrtimer_base().

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ