Re: [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx/

Signed-off-by: Jakub Sitnicki <jakub@xxxxxxxxxxxxxx>

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



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux