acrn-hypervisor/hypervisor/debug
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
..
console.c hv: add param to control INIT used to kick pCPU 2022-09-26 13:28:02 +08:00
dbg_cmd.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
dump.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
hypercall.c hv: extend sbuf hypercall 2022-09-27 10:26:42 +08:00
logmsg.c hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
Makefile HV: makefile: to avoid duplicated build libs 2020-05-21 15:12:21 +08:00
npk_log.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
printf.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
profiling.c hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
sbuf.c hv: support asyncio request 2022-09-27 10:26:42 +08:00
shell_priv.h hv: shell: improve console to modify input easier 2022-07-28 23:31:43 +08:00
shell.c hv: change the version format 2022-11-21 09:45:26 +08:00
string.c Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
trace.c hv: add max_len for sbuf_put param 2024-02-20 11:52:02 +08:00
uart16550.c hv: support for pci uart with high mmio 2022-11-21 16:50:05 +08:00