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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0giqpTnJS_4D0LxfJpdk6-xjziNcu=xXkJo+KD12NYHgA@mail.gmail.com>
Date:   Fri, 9 Jul 2021 17:40:35 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     xiongxin <win239@....com>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Pavel Machek <pavel@....cz>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        xiongxin <xiongxin@...inos.cn>
Subject: Re: [PATCH] PM / s2idle: Fix the failure of specifying
 "mem_sleep_default=" parameter

On Fri, Jul 9, 2021 at 3:03 AM xiongxin <win239@....com> wrote:
>
> From: xiongxin <xiongxin@...inos.cn>
>
> On the arm64 platform, the psci driver is used by default to set the
> suspend_ops structure; but the psci_acpi_init() function is called
> before the command-line parameter "mem_sleep_default=" is specified;
> the user cannot set the desired suspend mode through the
> "mem_sleep_default=" parameter;
>
> In mem_sleep_default_setup(), judge whether suspend_ops is set, if it
> has been assigned, rewrite the value of mem_sleep_current variable; in
> order to complete the user setting;
>
> Signed-off-by: xiongxin <xiongxin@...inos.cn>

It's the third submission of the same patch AFAICS.

Have you made any changes to it since the previous submissions?  If
not, it is not necessary (or even useful) to resend it.

>
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index d8cae434f9eb..bef4b17de3f6 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -192,6 +192,21 @@ static int __init mem_sleep_default_setup(char *str)
>                         break;
>                 }
>
> +       /*
> +        * When the suspend_ops has been set, "mem_sleep_default=*" will
> +        * be invalid, here to fix this situation.
> +        */
> +       if (suspend_ops) {
> +               if (mem_sleep_default == PM_SUSPEND_TO_IDLE)
> +                       mem_sleep_current = PM_SUSPEND_TO_IDLE;
> +               else if ((mem_sleep_default == PM_SUSPEND_STANDBY) &&
> +                               valid_state(PM_SUSPEND_STANDBY))
> +                       mem_sleep_current = PM_SUSPEND_STANDBY;
> +               else if ((mem_sleep_default >= PM_SUSPEND_MEM) &&
> +                               valid_state(PM_SUSPEND_MEM))
> +                       mem_sleep_current = PM_SUSPEND_MEM;
> +       }
> +
>         return 1;
>  }
>  __setup("mem_sleep_default=", mem_sleep_default_setup);
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ