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: <a2563b83-e5d7-4d02-a317-54d51e718d32@kernel.org>
Date: Sat, 25 Oct 2025 20:31:19 -0500
From: Mario Limonciello <superm1@...nel.org>
To: Askar Safin <safinaskar@...il.com>, rafael@...nel.org
Cc: gregkh@...uxfoundation.org, guoqing.zhang@....com,
 linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
 mario.limonciello@....com, todd.e.brandt@...ux.intel.com,
 torvalds@...uxfoundation.org, regressions <regressions@...ts.linux.dev>
Subject: Re: [REGRESSION][BISECTED] Hibernation: WARNING at
 kernel/power/main.c:48 pm_restrict_gfp_mask (was: "[PATCH v1] PM: hibernate:
 Restrict GFP mask in hibernation_snapshot()")



On 10/25/25 12:08 AM, Askar Safin wrote:
> "Rafael J. Wysocki" <rafael@...nel.org>:
>> 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.
> 
> #regzbot introduced: 449c9c02537a146ac97ef962327a221e21c9cab3
> 
> This commit introduced regression: now I see WARNING every time when
> I hibernate. The bug reproduces both on real hardware and in Qemu.
> 
> Here is script I used to reproduce this bug in Qemu:
> https://zerobin.net/?aadae7117a208c0a#Xh8aI5+u3pyk+vKwET7j+yXolLeoSLe/AedcvnNeCLs=
> 
> Here is resulting log (dmesg) on current master (43e9ad0c55a3):
> https://zerobin.net/?471d17d0632e7f85#uYne0yUu+rP4KnDbOFFqtCrcDIi6UpQz2uIQw85lcdQ=
> 
> Here is the most interesting part:
> 
> [    1.735001] PM: Image saving progress:  90%
> [    1.746611] PM: Image saving progress: 100%
> [    1.747208] PM: Image saving done
> [    1.747403] PM: hibernation: Wrote 30164 kbytes in 0.13 seconds (232.03 MB/s)
> [    1.747837] PM: Image size after compression: 8908 kbytes
> [    1.748190] PM: S|
> [    1.750351] ------------[ cut here ]------------
> [    1.750627] WARNING: CPU: 0 PID: 1 at kernel/power/main.c:48 pm_restrict_gfp_mask+0x3b/0x40
> 
> On real hardware exactly same thing happens (i. e. WARNING at kernel/power/main.c:48 pm_restrict_gfp_mask).
> 

Thanks for the report, and especially for the simple reproducer!

This is pretty similar to the problem we had with hybrid sleep. [1]

Link: https://git.kernel.org/torvalds/c/469d80a3712c6 [1]

I believe this should help:

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 14e85ff23551..e15907f28c4c 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -721,6 +721,7 @@ static void power_down(void)
                 kernel_restart(NULL);
                 break;
         case HIBERNATION_PLATFORM:
+               pm_restore_gfp_mask();
                 error = hibernation_platform_enter();
                 if (error == -EAGAIN || error == -EBUSY) {
                         events_check_enabled = false;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ