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:   Mon, 10 Jun 2019 09:05:08 +0800
From:   Peter Xu <peterx@...hat.com>
To:     Marcelo Tosatti <mtosatti@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        John Stultz <john.stultz@...aro.org>,
        Stephen Boyd <sboyd@...nel.org>,
        Luiz Capitulino <lcapitulino@...hat.com>
Subject: Re: [PATCH] timers: Fix up get_target_base() to use old base properly

On Thu, Jun 06, 2019 at 12:28:08PM -0300, Marcelo Tosatti wrote:
> On Mon, Jun 03, 2019 at 09:29:44PM +0800, Peter Xu wrote:
> > get_target_base() in the timer code is not using the "base" parameter
> > at all.  My gut feeling is that instead of removing that extra
> > parameter, what we really want to do is "return the old base if it
> > does not suite for a new one".
> 
> Hi Peter,

Hi, Marcelo,

> 
> I think its a dead parameter: you always want to use the local base
> if the timer is not pinned.

Thanks for the comment.

But what if it was pinned?  Could the old code always do right even in
the scenario I mentioned below?

https://lkml.org/lkml/2019/6/4/34

Also note that if the timer was not pinned, IMHO it'll go into the
check below and it seems to likely to have another timer base instead
of the local base if it's not a housekeeping cpu (because
get_nohz_timer_target() will always try to provision timers onto the
housekeeping ones), or did I misunderstand your comment?

#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
	if (static_branch_likely(&timers_migration_enabled) &&
	    !(tflags & TIMER_PINNED))
		return get_timer_cpu_base(tflags, get_nohz_timer_target());
#endif

Regards,

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ