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, 17 May 2017 11:58:56 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>
Subject: Re: [patch V2 16/17] init: Introduce SYSTEM_SCHEDULING state

On Tue, May 16, 2017 at 08:42:47PM +0200, Thomas Gleixner wrote:
> might_sleep() debugging and smp_processor_id() debugging should be active
> right after the scheduler starts working. The init task can invoke
> smp_processor_id() from preemptible context as it is pinned on the boot cpu
> until sched_smp_init() removes the pinning and lets it schedule on all non
> isolated cpus.
> 
> Add a new state which allows to enable those checks earlier and add it to
> the xen do_poweroff() function.
> 
> No functional change.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> Cc: Juergen Gross <jgross@...e.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Makes sense to me. FWIW:

Acked-by: Mark Rutland <mark.rutland@....com>

Mark.

> ---
> 
> V2: Use only one intermediate state and document that state order matters.
> 
>  drivers/xen/manage.c   |    1 +
>  include/linux/kernel.h |    6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> --- a/drivers/xen/manage.c
> +++ b/drivers/xen/manage.c
> @@ -190,6 +190,7 @@ static void do_poweroff(void)
>  {
>  	switch (system_state) {
>  	case SYSTEM_BOOTING:
> +	case SYSTEM_SCHEDULING:
>  		orderly_poweroff(true);
>  		break;
>  	case SYSTEM_RUNNING:
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -490,9 +490,13 @@ extern int root_mountflags;
>  
>  extern bool early_boot_irqs_disabled;
>  
> -/* Values used for system_state */
> +/*
> + * Values used for system_state. Ordering of the states must not be changed
> + * as code checks for <, <=, >, >= STATE.
> + */
>  extern enum system_states {
>  	SYSTEM_BOOTING,
> +	SYSTEM_SCHEDULING,
>  	SYSTEM_RUNNING,
>  	SYSTEM_HALT,
>  	SYSTEM_POWER_OFF,
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ