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: <20250908024655.14636-1-tuhaowen@uniontech.com>
Date: Mon,  8 Sep 2025 10:46:55 +0800
From: tuhaowen <tuhaowen@...ontech.com>
To: wusamuel@...gle.com,
	saravanak@...gle.com
Cc: rafael@...nel.org,
	len.brown@...el.com,
	pavel@...nel.org,
	linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	huangbibo@...ontech.com
Subject: Sync timeout mechanisms - Request for coordination

Hi Samuel and Saravana,

I hope this email finds you well. I'm reaching out regarding the sync
timeout mechanisms for suspend/hibernation that we've both been working on.

Rafael from the upstream kernel has indicated that he would prefer us to
coordinate our approaches rather than having two separate implementations.
He mentioned your patch series "PM: Support aborting suspend during
filesystem sync" and suggested we work together on a unified solution.

I would like to discuss how we can merge our approaches. Below is a
summary of my current implementation:

**My approach - Time-based timeout mechanism:**
- Introduces a configurable timeout for sync operations during both
  suspend and hibernation
- Uses kthread with wait_for_completion_timeout() to implement timeout
- Provides sysfs interface /sys/power/sleep_sync_timeout for runtime
  configuration  
- Default behavior unchanged (timeout disabled by default)
- Addresses scenarios where sync is excessively slow without wakeup events

You can see the detailed implementation and Rafael's feedback at:
https://lore.kernel.org/linux-pm/CAJZ5v0jBRy=CvZiWQQaorvc-zT+kkaB6+S2TErGmkaPAGmHLOQ@mail.gmail.com/

**Key differences I see between our approaches:**
1. Your solution focuses on aborting sync when wakeup events occur
2. My solution addresses cases where there are no wakeup events but sync
   is excessively slow (e.g., slow/faulty storage)
3. Your approach uses workqueue + completion, mine uses kthread + timeout
4. Both aim to prevent indefinite hangs but cover different scenarios

**Potential unified approach:**
I believe both mechanisms could complement each other:
- Event-driven abort (your approach) for responsive wakeup handling
- Time-based timeout (my approach) for proactive protection against
  slow storage
- Single, unified implementation in kernel/power/main.c

Would you be interested in discussing how we can combine these approaches?
I'm open to:
1. Merging the implementations into a single solution
2. Adopting your workqueue approach with added timeout functionality
3. Any other technical approach you think would work better

Looking forward to your thoughts and collaboration.

Best regards,
Haowen Tu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ