Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Commit

Permalink
Fixed HAX_VCPU_IOCTL_SET_MSRS access type
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandro Sanchez Bach <[email protected]>
  • Loading branch information
AlexAltea committed Nov 15, 2018
1 parent 6d36461 commit 23219d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/hax_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
#define HAX_VCPU_IOCTL_GET_MSRS \
HAX_IOCTL(HAX_IOWR, 0x06, struct hax_msr_data)
#define HAX_VCPU_IOCTL_SET_MSRS \
HAX_IOCTL(HAX_IOW, 0x07, struct hax_msr_data)
HAX_IOCTL(HAX_IOWR, 0x07, struct hax_msr_data)
#define HAX_VCPU_IOCTL_INTERRUPT \
HAX_IOCTL(HAX_IOW, 0x08, uint32_t)
#define HAX_VCPU_IOCTL_DEBUG \
Expand Down
4 changes: 4 additions & 0 deletions platforms/linux/components.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ static long hax_vcpu_ioctl(struct file *filp, unsigned int cmd,
}
}
msrs.done = i;
if (copy_to_user(argp, &msrs, sizeof(msrs))) {
ret = -EFAULT;
break;
}
break;
}
case HAX_VCPU_IOCTL_GET_MSRS__LEGACY:
Expand Down

0 comments on commit 23219d2

Please sign in to comment.