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: <5459665f-a0ac-4b17-8830-17fa26f78dcb@maciej.szmigiero.name>
Date: Tue, 14 Jan 2025 12:31:24 +0100
From: "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
 M Chetan Kumar <m.chetan.kumar@...el.com>,
 Loic Poulain <loic.poulain@...aro.org>,
 Sergey Ryazanov <ryazanov.s.a@...il.com>,
 Johannes Berg <johannes@...solutions.net>,
 Bjorn Helgaas <bhelgaas@...gle.com>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, "Rafael J . Wysocki" <rafael@...nel.org>,
 netdev@...r.kernel.org, linux-pci@...r.kernel.org, linux-pm@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] net: wwan: iosm: Fix hibernation by re-binding the
 driver around it

On 14.01.2025 09:49, Paolo Abeni wrote:
> On 1/9/25 12:33 AM, Maciej S. Szmigiero wrote:
>   @@ -530,3 +531,56 @@ void ipc_pcie_kfree_skb(struct iosm_pcie
> *ipc_pcie, struct sk_buff *skb)
>>   	IPC_CB(skb)->mapping = 0;
>>   	dev_kfree_skb(skb);
>>   }
>> +
>> +static int pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused)
>> +{
>> +	if (mode == PM_HIBERNATION_PREPARE || mode == PM_RESTORE_PREPARE) {
>> +		if (pci_registered) {
> 
> Out of sheer ignorance on my side, why 'mode == PM_RESTORE_PREPARE' is
> required above? Isn't the driver already unregistered by the previous
> PM_HIBERNATION_PREPARE call?

If the restore kernel had this driver loaded then it needs to be unregistered
before restoring the hibernation image so it has chance to shut the modem
firmware down rather than keep it running during the restore process.

This way when the driver from the restored image re-binds the device it finds
it in the proper non-running state.

> Thanks,
> 
> Paolo
> 

Thanks,
Maciej


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ