]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Clear up confusion in bpf_skb_adjust_room()'s documentation
authorQuentin Monnet <quentin@isovalent.com>
Fri, 12 Aug 2022 15:37:27 +0000 (16:37 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 15 Aug 2022 15:34:29 +0000 (17:34 +0200)
commit901db752b3d50b901d3186bc207d80e7f71c6e1a
tree4853274a298fc312bfd7a12eeeceb8d619bb56d2
parent9d24f3cd722a278bb551da4a9dab7f7aca90a734
bpf: Clear up confusion in bpf_skb_adjust_room()'s documentation

Adding or removing room space _below_ layers 2 or 3, as the description
mentions, is ambiguous. This was written with a mental image of the
packet with layer 2 at the top, layer 3 under it, and so on. But it has
led users to believe that it was on lower layers (before the beginning
of the L2 and L3 headers respectively).

Let's make it more explicit, and specify between which layers the room
space is adjusted.

Reported-by: Rumen Telbizov <rumen.telbizov@menlosecurity.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220812153727.224500-3-quentin@isovalent.com
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h