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]
Message-ID: <1486497952.2096.13.camel@redhat.com>
Date:   Tue, 07 Feb 2017 15:05:52 -0500
From:   Rik van Riel <riel@...hat.com>
To:     Frederic Weisbecker <fweisbec@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Wanpeng Li <wanpeng.li@...mail.com>, stable@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] nohz: Fix possible missing clock reprog after tick soft
 restart

On Tue, 2017-02-07 at 17:44 +0100, Frederic Weisbecker wrote:
> ts->next_tick keeps track of the next tick deadline in order to
> optimize
> clock programmation on irq exit and avoid redundant clock device
> writes.
> 
> Now if ts->next_tick missed an update, we may spuriously miss a clock
> reprog later as the nohz code is fooled by an obsolete next_tick
> value.
> 
> This is what happens here on a specific path: when we observe an
> expired timer from the nohz update code on irq exit, we perform a
> soft
> tick restart which simply fires the closest possible tick without
> actually exiting the nohz mode and restoring a periodic state. But we
> forget to update ts->next_tick accordingly.
> 
> As a result, after the next tick resulting from such soft tick
> restart,
> the nohz code sees a stale value on ts->next_tick which doesn't match
> the clock deadline that just expired. If that obsolete ts->next_tick
> value happens to collide with the actual next tick deadline to be
> scheduled, we may spuriously bypass the clock reprogramming. In the
> worst case, the tick may never fire again.
> 
> Lets fix this with a ts->next_tick reset on soft tick restart.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Wanpeng Li <wanpeng.li@...mail.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Rik van Riel <riel@...hat.com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: stable@...r.kernel.org
> 

Acked-by: Rik van Riel <riel@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ