* [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero
@ 2022-04-25 16:08 Jakub Sitnicki
2022-04-25 21:01 ` Alejandro Colomar
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Sitnicki @ 2022-04-25 16:08 UTC (permalink / raw)
To: linux-man
Cc: bpf, Alejandro Colomar, Michael Kerrisk, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko
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/
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
---
man2/bpf.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man2/bpf.2 b/man2/bpf.2
index 2d257eaa6..ee57226ee 100644
--- a/man2/bpf.2
+++ b/man2/bpf.2
@@ -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
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero
2022-04-25 16:08 [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero Jakub Sitnicki
@ 2022-04-25 21:01 ` Alejandro Colomar
2022-04-26 9:05 ` Jakub Sitnicki
0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Colomar @ 2022-04-25 21:01 UTC (permalink / raw)
To: Jakub Sitnicki, linux-man
Cc: bpf, Michael Kerrisk, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko
Hi Jakub,
On 4/25/22 18:08, Jakub Sitnicki wrote:
> 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/
>
> Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Patch applied.
Thanks,
Alex
> ---
> man2/bpf.2 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man2/bpf.2 b/man2/bpf.2
> index 2d257eaa6..ee57226ee 100644
> --- a/man2/bpf.2
> +++ b/man2/bpf.2
> @@ -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.
> The
> .I size
> argument is the size of the union pointed to by
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero
2022-04-25 21:01 ` Alejandro Colomar
@ 2022-04-26 9:05 ` Jakub Sitnicki
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Sitnicki @ 2022-04-26 9:05 UTC (permalink / raw)
To: Alejandro Colomar
Cc: linux-man, bpf, Michael Kerrisk, Alexei Starovoitov,
Daniel Borkmann, Andrii Nakryiko
On Mon, Apr 25, 2022 at 11:01 PM +02, Alejandro Colomar wrote:
[...]
>> diff --git a/man2/bpf.2 b/man2/bpf.2
>> index 2d257eaa6..ee57226ee 100644
>> --- a/man2/bpf.2
>> +++ b/man2/bpf.2
>> @@ -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.
>
Thanks for the fixup, Alex. I will keep it in mind for the next time.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-26 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 16:08 [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero Jakub Sitnicki
2022-04-25 21:01 ` Alejandro Colomar
2022-04-26 9:05 ` Jakub Sitnicki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.