bpf.2: Note that unused fields and padding in bpf_attr must be zero
PATCH 1/1 bpf.2: Note that unused fields and padding in bpf_attr must be zero
In a discussion regarding a potential backward incompatible change [1], Andrii Nakryiko points out that unused bytes of bpf_attr should be zero. Add this bit of information to the bpf(2) man page.
[1] https://lore.kernel.org/bpf/CAEf4BzbT4vQBnZzdD00SuPCDkeb4Cm=F6PLUoO_3X93UQD5hbQ@mail.gmail.com/
--- man2/bpf.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man2/bpf.2 +1 -1
@@ -142,7 +142,7 @@ provided via .IR attr , which is a pointer to a union of type .I bpf_attr -(see below). +(see below). The unused fields and padding must be zeroed out before the call. The .I size argument is the size of the union pointed to by
Signature · 1 line
2.35.1
Hi Jakub,
Quoted 7 lines · Jakub Sitnicki
In a discussion regarding a potential backward incompatible change [1], Andrii Nakryiko points out that unused bytes of
bpf_attrshould be zero. Add this bit of information to the bpf(2) man page.[1] https://lore.kernel.org/bpf/CAEf4BzbT4vQBnZzdD00SuPCDkeb4Cm=F6PLUoO_3X93UQD5hbQ@mail.gmail.com/
Signed-off-by Jakub Sitnicki <[email protected]>
Patch applied.
Thanks,
Alex
Quoted 9 lines
--- man2/bpf.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man2/bpf.2 +0
-0
man2/bpf.2 provided via · line 145
Quoted 5 lines
man2/bpf.2 +1
-1@@ -142,7 +142,7 @@ provided via .IR attr , which is a pointer to a union of type .I bpf_attr -(see below). +(see below). The unused fields and padding must be zeroed out before the call.
But I changed it to add a separate line, instead of continuation in the same one.
Quoted 3 lines
man2/bpf.2 +0
-0The .I size argument is the size of the union pointed to by
On Mon, Apr 25, 2022 at 11:01 PM +02, Alejandro Colomar wrote:
[...]
Quoted 5 lines
Quoted 5 lines
man2/bpf.2 +0
-0@@ -142,7 +142,7 @@ provided via
Quoted 9 lines
man2/bpf.2 provided via · line 145
Quoted 5 lines
man2/bpf.2 +1
-1.IR attr , which is a pointer to a union of type .I bpf_attr -(see below). +(see below). The unused fields and padding must be zeroed out before the call.But I changed it to add a separate line, instead of continuation in the same one.
Thanks for the fixup, Alex. I will keep it in mind for the next time.