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: <20220217122107.22434-1-abhsahu@nvidia.com>
Date:   Thu, 17 Feb 2022 17:51:05 +0530
From:   Abhishek Sahu <abhsahu@...dia.com>
To:     <kvm@...r.kernel.org>,
        Alex Williamson <alex.williamson@...hat.com>,
        Cornelia Huck <cohuck@...hat.com>
CC:     Max Gurtovoy <mgurtovoy@...dia.com>,
        Yishai Hadas <yishaih@...dia.com>,
        Zhen Lei <thunder.leizhen@...wei.com>,
        Jason Gunthorpe <jgg@...dia.com>,
        <linux-kernel@...r.kernel.org>, Abhishek Sahu <abhsahu@...dia.com>
Subject: [PATCH v3 0/2] vfio/pci: fixes related with power management

The commit 51ef3a004b1e ("vfio/pci: Restore device state on PM
transition") added a wrapper function vfio_pci_probe_power_state().
For the devices which do not have No_Soft_Reset bit set in its
PMCSR config register, inside this function, the current PCI state
will be saved locally in 'vfio_pci_core_device::pm_save' during
D0->D3hot transition and same will be restored back during D3hot->D0
transition. We have few IOCTLs and internal functions in vfio-pci
driver which can be invoked when the device power state is non-D0.
This patch series fixes issues around reset-related API's if reset
is invoked in the D3hot state.

* Changes in v3

- Split the changes into 2 patches.
- Updated comments and commit message according to updated changes.
- Added code to wakeup devices for vfio_pci_dev_set_try_reset().

* Changes in v2

- Add the Fixes tag and sent this patch independently.
- Invoke vfio_pci_set_power_state() before invoking reset related API's.
- Removed saving of power state locally.
- Removed warning before 'kfree(vdev->pm_save)'.
- Updated comments and commit message according to updated changes.

* v1 of this patch was sent in
https://lore.kernel.org/lkml/20220124181726.19174-4-abhsahu@nvidia.com/

Abhishek Sahu (2):
  vfio/pci: fix memory leak during D3hot to D0 transition
  vfio/pci: wake-up devices around reset functions

 drivers/vfio/pci/vfio_pci_core.c | 61 ++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ