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-next>] [day] [month] [year] [list]
Message-Id: <20230207123713.3905-1-wei.w.wang@intel.com>
Date:   Tue,  7 Feb 2023 20:37:11 +0800
From:   Wei Wang <wei.w.wang@...el.com>
To:     pbonzini@...hat.com, seanjc@...gle.com, mhal@...x.co
Cc:     kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Wei Wang <wei.w.wang@...el.com>
Subject: [PATCH v2 0/2] kvm_io_bus_unregister_dev cleanup

This patchset moves kvm io_device destruction into
kvm_io_bus_unregister_dev. This reduces LOCs a bit for users and can 
avoid the leakage of destructing the device explicitly.
Accordingly, below cleanups are included:
- remove the exposure of kvm_iodevice_destructor and the invocation in
  the users as kvm_iodevice_destructor is now invoked in
  kvm_io_bus_unregister_dev;
- Change kvm_deassign_ioeventfd_idx to use list_for_each_entry as the 
  loop ends at the entry that's founded and deleted.

The patches are rebased to
https://github.com/kvm-x86/linux/commit/b1cb1fac22ab

Changelog:
v1->v2:
 - keep kfree(bus) when the new bus is successfully allocated
 - add patch 2

Previous version:
https://lore.kernel.org/lkml/20221229123302.4083-1-wei.w.wang@intel.com/

Wei Wang (2):
  KVM: destruct kvm_io_device while unregistering it from kvm_io_bus
  kvm/eventfd: use list_for_each_entry when deassign ioeventfd

 include/kvm/iodev.h       |  6 ------
 virt/kvm/coalesced_mmio.c |  9 ++-------
 virt/kvm/eventfd.c        |  6 ++----
 virt/kvm/kvm_main.c       | 23 +++++++++++++++--------
 4 files changed, 19 insertions(+), 25 deletions(-)

-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ