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: <03dba78e-4271-ac60-3d7f-a07924735049@intel.com>
Date:   Thu, 18 Mar 2021 16:59:41 +0100
From:   "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Josef Bacik <josef@...icpanda.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "kernel-team@...com" <kernel-team@...com>
Subject: Re: [PATCH][RESEND] Revert "PM: ACPI: reboot: Use S5 for reboot"

On 3/18/2021 6:42 AM, Kai-Heng Feng wrote:
> On Thu, Mar 18, 2021 at 1:25 AM Josef Bacik <josef@...icpanda.com> wrote:
> [snipped]
>> "shutdown now" works fine with and without your patch.  Thanks,
> Rafael,
> Please revert the patch while we are working on it.

Done, thanks!


> Josef,
> Can you please test the following patch:
>
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index eb1b15850761..263444a3fb38 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -233,6 +233,15 @@ void migrate_to_reboot_cpu(void)
>          set_cpus_allowed_ptr(current, cpumask_of(cpu));
>   }
>
> +static void kernel_shutdown_prepare(enum system_states state)
> +{
> +       blocking_notifier_call_chain(&reboot_notifier_list,
> +               (state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL);
> +       system_state = state;
> +       usermodehelper_disable();
> +       device_shutdown();
> +}
> +
>   /**
>    *     kernel_restart - reboot the system
>    *     @cmd: pointer to buffer containing command to execute for restart
> @@ -243,7 +252,7 @@ void migrate_to_reboot_cpu(void)
>    */
>   void kernel_restart(char *cmd)
>   {
> -       kernel_restart_prepare(cmd);
> +       kernel_shutdown_prepare(SYSTEM_POWER_OFF);
>          if (pm_power_off_prepare)
>                  pm_power_off_prepare();
>          migrate_to_reboot_cpu();
> @@ -257,14 +266,6 @@ void kernel_restart(char *cmd)
>   }
>   EXPORT_SYMBOL_GPL(kernel_restart);
>
> -static void kernel_shutdown_prepare(enum system_states state)
> -{
> -       blocking_notifier_call_chain(&reboot_notifier_list,
> -               (state == SYSTEM_HALT) ? SYS_HALT : SYS_POWER_OFF, NULL);
> -       system_state = state;
> -       usermodehelper_disable();
> -       device_shutdown();
> -}
>   /**
>    *     kernel_halt - halt the system
>    *
>
>> Josef


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ