[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240213234212.3766256-2-keescook@chromium.org>
Date: Tue, 13 Feb 2024 15:42:11 -0800
From: Kees Cook <keescook@...omium.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Kees Cook <keescook@...omium.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org,
linux-hardening@...r.kernel.org,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Dan Williams <dan.j.williams@...el.com>,
Keith Packard <keithp@...thp.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Dmitry Antipov <dmantipov@...dex.ru>,
Nathan Chancellor <nathan@...nel.org>,
kernel test robot <lkp@...el.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 2/2] net/ipv4: Annotate imsf_slist_flex with __counted_by(imsf_numsrc)
The size of the imsf_slist_flex member is determined by imsf_numsrc, so
annotate it as such.
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Eric Dumazet <edumazet@...gle.com>
Cc: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org
Cc: linux-hardening@...r.kernel.org
Acked-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Signed-off-by: Kees Cook <keescook@...omium.org>
---
include/uapi/linux/in.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index e682ab628dfa..2f0c4d40bc7b 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -199,7 +199,8 @@ struct ip_msfilter {
__u32 imsf_numsrc;
union {
__be32 imsf_slist[1];
- __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex);
+ __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex,
+ __counted_by(imsf_numsrc));
};
};
--
2.34.1
Powered by blists - more mailing lists