mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
add IO requrest 'req_buf' check before reference
This address maybe invalid if a hostile address was set in hypercall 'HC_SET_IOREQ_BUFFER'.it should be validated before using. Update: -- save HVA to guest OS's request buffer in hyperviosr -- change type of 'req_buf' from 'uint64_t' to 'void *' -- remove HPA to HVA translation code when using this addr. -- use error number instead of -1 when return error cases. Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -76,8 +76,8 @@ struct vm_sw_info {
|
||||
struct sw_kernel_info kernel_info;
|
||||
/* Additional information specific to Linux guests */
|
||||
struct sw_linux linux_info;
|
||||
/* GPA Address of guest OS's request buffer */
|
||||
uint64_t req_buf;
|
||||
/* HVA to guest OS's request buffer */
|
||||
void *req_buf;
|
||||
};
|
||||
|
||||
struct vm_pm_info {
|
||||
|
Reference in New Issue
Block a user