Skip to content

kvm.h patch file problem #6

@B1aNB1aN

Description

@B1aNB1aN

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions