Thread (19 messages) flat view 19 messages, 4 authors, 9d ago

Re: [PATCH bpf 01/11] bpf: Fix bounds check for skb-backed dynptrs

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-09-16 23:08:48
Also in: bpf

On Wed, 16 Sep 2026 05:08:19 +0000 Emil Tsalapatis wrote:
-	if (likely(skb_headlen(skb) - offset >= len))
+	if (likely((u64)offset <= skb_headlen(skb) && 
+			(u64)len <= skb_headlen(skb) - (u64)offset))
I don't think the 64b arithmetic is needed since the max value
(headlen) itself is 32b. You can cast to unsigned int.

Also the continuation line is mis-aligned 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help