summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2025-12-04 12:22:40 -0500
committerMichael S. Tsirkin <mst@redhat.com>2025-12-24 08:02:56 -0500
commitb6600eff0559ef69479cf6b7dccafddf451c6842 (patch)
treea23aeb82a0eb2c1905a677f41abd9e37ddac523b /tools
parentc53ad75c6236acd22a613fbcde862d3d6d2f8072 (diff)
tools/virtio: add ucopysize.h stub
Add ucopysize.h with stub implementations of check_object_size, copy_overflow, and check_copy_size. Created using Cursor CLI. Message-ID: <5046df90002bb744609248404b81d33b559fe813.1764873799.git.mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtio/linux/ucopysize.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/virtio/linux/ucopysize.h b/tools/virtio/linux/ucopysize.h
new file mode 100644
index 000000000000..8beb7755d060
--- /dev/null
+++ b/tools/virtio/linux/ucopysize.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __LINUX_UCOPYSIZE_H__
+#define __LINUX_UCOPYSIZE_H__
+
+#include <linux/bug.h>
+
+static inline void check_object_size(const void *ptr, unsigned long n,
+ bool to_user)
+{ }
+
+static inline void copy_overflow(int size, unsigned long count)
+{
+}
+
+static __always_inline __must_check bool
+check_copy_size(const void *addr, size_t bytes, bool is_source)
+{
+ return true;
+}
+
+#endif /* __LINUX_UCOPYSIZE_H__ */