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: <20201021095951.GB2628@hirez.programming.kicks-ass.net>
Date:   Wed, 21 Oct 2020 11:59:51 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Xi Wang <xii@...gle.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Josh Don <joshdon@...gle.com>, linux-kernel@...r.kernel.org,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v2 1/1] sched: watchdog: Touch kernel watchdog with sched
 count

On Tue, Oct 20, 2020 at 01:57:04PM -0700, Xi Wang wrote:
> The main purpose of kernel watchdog is to test whether scheduler can
> still schedule tasks on a cpu. In order to reduce latency / jitter
> from periodically invoking watchdog reset in thread context, we can
> simply test if pick_next_task can run. This is done by forcing resched
> and checking rq->sched_count.

Whitespace exists for a reason, use more of it. Also, the above isn't
actually accurate anymore and carried over from the previous
implementation.

> Compared to actually resetting watchdog
> from cpu stop / migration threads, we lose coverage on: a migration
> thread actually get picked and we actually context switch to the
> migration thread. These steps are unlikely to silently fail. The
> change would provide nearly the same level of protection with less
> overhead.
> 
> With this patch we can still switch back to the old method with the
> boot option watchdog_touch_with_thread. However code for the old
> method can be completely removed in the future.

I'd suggest removing all the #ifdef and config muck. Either its a good
idea or it's not.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ