acrn-hypervisor/hypervisor/common
Wu Zhou 925e3d95b4 hv: add max_len for sbuf_put param
sbuf_put copies sbuf->ele_size of data, and puts into ring. Currently
this function assumes that data size from caller is no less than
sbuf->ele_size.

But as sbuf->ele_size is usually setup by some sources outside of the HV
(e.g., the service VM), it is not meant to be trusted. So caller should
provide the max length of the data for safety reason. sbuf_put() will
return UINT32_MAX if max_len of data is less than element size.

Additionally, a helper function sbuf_put_many() is added for putting
multiple entries.

Tracked-On: #8547
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2024-02-20 11:52:02 +08:00
..
delay.c hv/mod_timer: separate delay functions from the timer module 2021-05-18 16:43:28 +08:00
efi_mmap.c HV: fix build issue on RELEASE version 2021-11-16 19:01:44 +08:00
event.c hv: support halt in hv idle 2023-09-15 11:52:40 +08:00
hv_main.c hv: sched: Add sched_params struct for thread parameters 2023-09-18 16:26:05 +08:00
hypercall.c hv: Write _CPC to guests' ACPI when VHWP is enabled 2023-06-09 10:06:42 +08:00
irq.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ptdev.c ptirq: Fix ptirq hash tables 2023-04-13 12:24:57 +08:00
sbuf.c hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
sched_bvt.c hv: sched: add four parameters for BVT scheduler 2023-09-18 16:26:05 +08:00
sched_iorr.c hv: sched: Add sched_params struct for thread parameters 2023-09-18 16:26:05 +08:00
sched_noop.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
sched_prio.c hv: sched: Add sched_params struct for thread parameters 2023-09-18 16:26:05 +08:00
schedule.c hv: sched: Add sched_params struct for thread parameters 2023-09-18 16:26:05 +08:00
softirq.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
ticks.c hv/mod_timer: split tsc handling code from timer. 2021-05-18 16:43:28 +08:00
timer.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
trusty_hypercall.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
vm_event.c hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
vm_load.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00