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-next>] [day] [month] [year] [list]
Message-ID: <20250821004237.2712312-1-wusamuel@google.com>
Date: Wed, 20 Aug 2025 17:42:32 -0700
From: Samuel Wu <wusamuel@...gle.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Pavel Machek <pavel@...nel.org>, Len Brown <lenb@...nel.org>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Danilo Krummrich <dakr@...nel.org>
Cc: Samuel Wu <wusamuel@...gle.com>, kernel-team@...roid.com, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: [PATCH v3 0/3] PM: Support aborting suspend during filesystem sync

This series adds functionality to handle a wakeup event in the filesystem
sync phase of suspend. This topic was first discussed by Saravana Kannan at
LPC 2024 [1], where the general consensus was to allow filesystem sync on a
parallel thread.

1/3: Moves pm_wakeup_clear() to be with similar functions that do the
     prerequisite bookkeeping prior to suspend_prepare(), making the intent
     of the function clearer. Additionally, this sets up patch2 in the
     series, which requires pm_wakeup_clear() to be called before abort
     functionality during suspend can be enabled.
2/3: Add support for abort during filesystem sync phase of suspend. This
     requires detecting a wakeup event or a filesystem sync finishing,
     whichever comes first.
3/3: Adding onto abort during filesystem sync, handle cases of back-to-back
     suspends and their respective filesystem syncs. Extra care is needed
     to ensure filesystem syncs happen serially while still honoring
     wakeup events that lead to early aborts.

[1]: https://lpc.events/event/18/contributions/1845/

Changes in v3:
- Split v2 patch into 3 patches
- Moved pm_wakeup_clear() outside of if(sync_on_suspend_enabled) condition
- Updated documentation and comments within kernel/power/suspend.c
- v2 link: https://lore.kernel.org/all/20250812232126.1814253-1-wusamuel@google.com/

Changes in v2:
- Added documentation for suspend_abort_fs_sync()
- Made suspend_fs_sync_lock and suspend_fs_sync_complete declaration static
- v1 link: https://lore.kernel.org/all/20250815004635.3684650-1-wusamuel@google.com

Samuel Wu (3):
  PM: Make pm_wakeup_clear() call more clear
  PM: Support aborting suspend during filesystem sync
  PM: Support abort during fs_sync of back-to-back suspends

 drivers/base/power/wakeup.c |  8 ++++
 include/linux/suspend.h     |  3 ++
 kernel/power/process.c      |  1 -
 kernel/power/suspend.c      | 75 ++++++++++++++++++++++++++++++++++++-
 4 files changed, 85 insertions(+), 2 deletions(-)

-- 
2.51.0.261.g7ce5a0a67e-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ