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] [day] [month] [year] [list]
Message-ID: <24abb0c2-553c-49a5-8daf-60d3726557df@kernel.org>
Date: Wed, 10 Sep 2025 13:26:28 -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>,
 Todd Brandt <todd.e.brandt@...ux.intel.com>,
 Linus Torvalds <torvalds@...uxfoundation.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Samuel Zhang <guoqing.zhang@....com>
Subject: Re: [PATCH v1] PM: hibernate: Restrict GFP mask in
 hibernation_snapshot()

On 9/10/25 4:41 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") incorrectly removed a pm_restrict_gfp_mask() call from
> hibernation_snapshot(), so memory allocations involving swap are not
> prevented from being carried out in this code path any more which may
> lead to serious breakage.
> 
> The symptoms of such breakage have become visible after adding a
> shrink_shmem_memory() call to hibernation_snapshot() in commit
> 2640e819474f ("PM: hibernate: shrink shmem pages after dev_pm_ops.prepare()")
> which caused this problem to be much more likely to manifest itself.
> 
> However, since commit 2640e819474f was initially present in the DRM
> tree that did not include commit 12ffc3b1513e, the symptoms of this
> issue were not visible until merge commit 260f6f4fda93 ("Merge tag
> 'drm-next-2025-07-30' of https://gitlab.freedesktop.org/drm/kernel")
> that exposed it through an entirely reasonable merge conflict
> resolution.
> 
> Fixes: 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence")
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220555
> Reported-by: Todd Brandt <todd.e.brandt@...ux.intel.com>
> Tested-by: Todd Brandt <todd.e.brandt@...ux.intel.com>
> Cc: 6.16+ <stable@...r.kernel.org> # 6.16+
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> 
> This is super-urgent, so I'm going to fast-track it.

Thanks.  Looking at the codepaths again it makes sense.
It's a bit surprising to me this showed up, we had done stress testing 
before submitting.  Nonetheless, thank you for the fix.

Reviewed-by: Mario Limonciello (AMD) <superm1@...nel.org>

> 
> ---
>   kernel/power/hibernate.c |    1 +
>   1 file changed, 1 insertion(+)
> 
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -449,6 +449,7 @@ int hibernation_snapshot(int platform_mo
>   	shrink_shmem_memory();
>   
>   	console_suspend_all();
> +	pm_restrict_gfp_mask();
>   
>   	error = dpm_suspend(PMSG_FREEZE);
>   
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ