summaryrefslogtreecommitdiffstats
path: root/io_uring/net.h
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2023-02-23 17:43:53 +0100
committerJens Axboe <axboe@kernel.dk>2023-04-03 15:16:14 +0200
commite1fe7ee885dc0712e982ee465d9f8b96254c30c1 (patch)
tree855f06df7edca5065d29434d55ccd5d3f5423525 /io_uring/net.h
parentio_uring: Move from hlist to io_wq_work_node (diff)
downloadlinux-e1fe7ee885dc0712e982ee465d9f8b96254c30c1.tar.xz
linux-e1fe7ee885dc0712e982ee465d9f8b96254c30c1.zip
io_uring: Add KASAN support for alloc_caches
Add support for KASAN in the alloc_caches (apoll and netmsg_cache). Thus, if something touches the unused caches, it will raise a KASAN warning/exception. It poisons the object when the object is put to the cache, and unpoisons it when the object is gotten or freed. Signed-off-by: Breno Leitao <leitao@debian.org> Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://lore.kernel.org/r/20230223164353.2839177-2-leitao@debian.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/net.h')
-rw-r--r--io_uring/net.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/io_uring/net.h b/io_uring/net.h
index 5ffa11bf5d2e..191009979bcb 100644
--- a/io_uring/net.h
+++ b/io_uring/net.h
@@ -5,8 +5,8 @@
#include "alloc_cache.h"
-#if defined(CONFIG_NET)
struct io_async_msghdr {
+#if defined(CONFIG_NET)
union {
struct iovec fast_iov[UIO_FASTIOV];
struct {
@@ -22,8 +22,11 @@ struct io_async_msghdr {
struct sockaddr __user *uaddr;
struct msghdr msg;
struct sockaddr_storage addr;
+#endif
};
+#if defined(CONFIG_NET)
+
struct io_async_connect {
struct sockaddr_storage address;
};