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: <880b6e4d-58c3-4fb7-a378-12b842fcc7c9@kernel.org>
Date: Fri, 26 Sep 2025 11:47:26 -0500
From: Mario Limonciello <superm1@...nel.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
 Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/2] PM: hibernate: Restrict GFP mask in power_down()

On 9/26/25 11:40 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Commit 12ffc3b1513e ("PM: Restrict swap use to later in the
> suspend sequence") caused hibernation_platform_enter() to call
> pm_restore_gfp_mask() via dpm_resume_end(), so when power_down()
> returns after aborting hibernation_platform_enter(), it needs
> to match the pm_restore_gfp_mask() call in hibernate() that will
> occur subsequently.
> 
> Address this by adding a pm_restrict_gfp_mask() call to the relevant
> error path in power_down().
> 
> Fixes: 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence")
> Cc: 6.16+ <stable@...r.kernel.org> # 6.16+
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@...nel.org>> ---
>   kernel/power/hibernate.c |    2 ++
>   1 file changed, 2 insertions(+)
> 
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -733,6 +733,8 @@ static void power_down(void)
>   	case HIBERNATION_PLATFORM:
>   		error = hibernation_platform_enter();
>   		if (error == -EAGAIN || error == -EBUSY) {
> +			/* Match pm_restore_gfp_mask() in hibernate(). */
> +			pm_restrict_gfp_mask();
>   			swsusp_unmark();
>   			events_check_enabled = false;
>   			pr_info("Wakeup event detected during hibernation, rolling back.\n");
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ