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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 29 Jan 2022 01:35:13 +0000
From:   "Wang, Wei W" <wei.w.wang@...el.com>
To:     Janosch Frank <frankja@...ux.ibm.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "Zeng, Guang" <guang.zeng@...el.com>,
        "Liu, Jing2" <jing2.liu@...el.com>,
        "Tian, Kevin" <kevin.tian@...el.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "Zhong, Yang" <yang.zhong@...el.com>
Subject: RE: [PATCH] kvm: Move KVM_GET_XSAVE2 IOCTL definition at the end of
 kvm.h

On Friday, January 28, 2022 11:40 PM, Janosch Frank wrote:
> This way we can more easily find the next free IOCTL number when adding
> new IOCTLs.

Yes, this is good, but sometimes the relevant code tend to be put together (e.g. ioctl for vm fd and ioctls for vcpu fds), so not necessary to force them to be put in the number order.
I think it would be better to record the last used number in the comment on top, and new additions need to update it (similar to the case that we update the api doc):

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 9563d294f181..b7e5199ec47e 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -6,6 +6,9 @@
  * Userspace interface for /dev/kvm - kernel based virtual machine
  *
  * Note: you must update KVM_API_VERSION if you change this interface.
+ *
+ * Last used cap number: KVM_CAP_XSAVE2(208)
+ * Last used ioctl number: KVM_HAS_DEVICE_ATTR(0xe3)
  */

 #include <linux/const.h>

Thanks,
Wei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ