kvm.h patch file problem
B1aNB1aN opened this issue · 0 comments
B1aNB1aN commented
File and line number: KVM-PT/include/uapi/linux/kvm.h.patch:68-74
Problem:
The io code is not correct.
Original Code:
#define KVM_VMX_PT_ENABLE_ADDR0 _IO(KVMIO, 0xaa) /* enable IP-filtering for addr0 */
#define KVM_VMX_PT_ENABLE_ADDR1 _IO(KVMIO, 0xab) /* enable IP-filtering for addr1 */
#define KVM_VMX_PT_ENABLE_ADDR2 _IO(KVMIO, 0xac) /* enable IP-filtering for addr2 */
#define KVM_VMX_PT_ENABLE_ADDR3 _IO(KVMIO, 0xad) /* enable IP-filtering for addr3 */
#define KVM_VMX_PT_DISABLE_ADDR0 _IO(KVMIO, 0xae) /* disable IP-filtering for addr0 */
#define KVM_VMX_PT_DISABLE_ADDR1 _IO(KVMIO, 0xaf) /* disable IP-filtering for addr1 */
I think it should be like following.
#define KVM_VMX_PT_ENABLE_ADDR0 _IO(KVMIO, 0xda) /* enable IP-filtering for addr0 */
#define KVM_VMX_PT_ENABLE_ADDR1 _IO(KVMIO, 0xdb) /* enable IP-filtering for addr1 */
#define KVM_VMX_PT_ENABLE_ADDR2 _IO(KVMIO, 0xdc) /* enable IP-filtering for addr2 */
#define KVM_VMX_PT_ENABLE_ADDR3 _IO(KVMIO, 0xdd) /* enable IP-filtering for addr3 */
#define KVM_VMX_PT_DISABLE_ADDR0 _IO(KVMIO, 0xde) /* disable IP-filtering for addr0 */
#define KVM_VMX_PT_DISABLE_ADDR1 _IO(KVMIO, 0xdf) /* disable IP-filtering for addr1 */
Reason:
The io code KVM_VMX_PT_ENABLE_ADDR3 conflict with io code KVM_KVMCLOCK_CTRL in kvm.h.
The same problem is in kAFL too.