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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZwF6JEHIQda92sIL@duo.ucw.cz>
Date: Sat, 5 Oct 2024 19:40:52 +0200
From: Pavel Machek <pavel@....cz>
To: "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	Len Brown <len.brown@...el.com>,
	linux-pm <linux-pm@...r.kernel.org>, linux-kernel@...r.kernel.org,
	Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
	David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org
Subject: Re: Root filesystem read access for firmware load during hibernation
 image writing

Hi!

> In my case, a USB device (RTL8821CU) gets reset at that stage due to
> commit 04b8c8143d46 ("btusb: fix Realtek suspend/resume") and so it tries
> to request_firmware() from the root filesystem after that thaw/reset,
> when the hibernation image is being written.
> 
> It usually succeeds, however often it deadlocks somewhere in Btrfs code
> resulting in the system failing to power off after writing the hibernate
> image:
> power_off() calls dpm_suspend_start(), which calls dpm_prepare(), which
> waits for device probe to finish.
> 
> And device probe is stuck forever trying to load that USB stick firmware
> from the filesystem - so in the end the system never powers off during
> (after) hibernation.
> 
> That's why I wonder whether this firmware load is supposed to work correctly
> during that hibernation state and so the system may be hitting some kind of
> a swsusp/btrfs/block layer race condition.
> 
> Or, alternatively, maybe  reading files is not supported at this point and
> so this is really a btrtl/rtw88 bug?

I'd say not supported at this point. Reading file may still read to
atime update, etc, and we can't really can't support that easily.

Suggestion is to keep firmware cached in memory, or at least cache it
in memory when hibernation begins.

BR,
										Pavel
										
-- 
People of Russia, stop Putin before his war on Ukraine escalates.

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ