From 1bf4abe4021192a4bcd5d400b699552f2a6d5777 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 24 Aug 2023 18:44:52 +0200 Subject: vhost-user: use guest buffer directly in vu_handle_tx() Check the buffer address is correctly in the mmap'ed memory. Signed-off-by: Laurent Vivier --- packet.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packet.h') diff --git a/packet.h b/packet.h index 8377dcf..0aec6d9 100644 --- a/packet.h +++ b/packet.h @@ -22,6 +22,8 @@ struct pool { struct iovec pkt[1]; }; +int vu_packet_check_range(void *buf, size_t offset, size_t len, + const char *start, const char *func, int line); void packet_add_do(struct pool *p, size_t len, const char *start, const char *func, int line); void *packet_get_do(const struct pool *p, const size_t idx, -- cgit v1.2.3