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:   Tue, 4 Dec 2018 12:56:41 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Roland Dreier <roland@...estorage.com>
cc:     John Stultz <john.stultz@...aro.org>,
        Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clocksource: Add heuristics to avoid switching away from
 TSC due to timer delay

Roland,

On Fri, 30 Nov 2018, Roland Dreier wrote:
>  		delta = clocksource_delta(csnow, cs->cs_last, cs->mask);
> +
> +		/* If the cycle delta is beyond what we can safely
> +		 * convert to nsecs, and the watchdog clocksource
> +		 * suggests that we've overslept, skip checking this
> +		 * iteration to avoid marking a clocksource as
> +		 * unstable because of a severely delayed timer. */

  		 /*
		  * Proper multiline comments look like this not like
		  * the above.
		  */

That aside. Why are you trying to do heuristics on the delta?

We have way better information than that. The watchdog timer expiry time is
known and we can determine the exact delay of the timer.

The watchdog clocksource provides the maximum 'idle' time, i.e. the time
between two reads, in clocksource::max_idle_ns. That value is filled in
when the clocksource is configured.

So without doing speculation we can make an informed decision:

    elapsed = jiffies_to_nsec(jiffies - watchdog_timer->expires) +
    	      WATCHDOG_INTERVAL_NS;

    if (elapsed > wdcs->max_idle_ns) {
       	    Skip ......
    }

Hmm?

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ