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:   Wed, 21 Oct 2020 12:12:57 +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:

> +	if (watchdog_touch_with_sched) {
> +		/* Trigger reschedule for the next round */
> +		set_tsk_need_resched(current);
> +		set_preempt_need_resched();

Blergh.. that's gross. This relies on this being in IRQ context and
either: PREEMPT=y *OR* this always being from userspace. Otherwise
there's no guarantee the return-from-interrupt will actually schedule.

> +		/* sched_count increase in __schedule is taken as watchdog touched */
> +		if (sched_get_count(smp_processor_id()) -
> +		    __this_cpu_read(watchdog_sched_prev)) {
> +			__touch_watchdog();
> +			__this_cpu_write(soft_watchdog_warn, false);
> +			return HRTIMER_RESTART;
> +		}
> +	}
> +
>  	/* check for a softlockup
>  	 * This is done by making sure a high priority task is
>  	 * being scheduled.  The task touches the watchdog to
> -- 
> 2.29.0.rc1.297.gfa9743e501-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ