Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvm.h patch file problem #6

Open
B1aNB1aN opened this issue Jul 3, 2020 · 0 comments
Open

kvm.h patch file problem #6

B1aNB1aN opened this issue Jul 3, 2020 · 0 comments

Comments

@B1aNB1aN
Copy link

B1aNB1aN commented Jul 3, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant