public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Sitnicki <jakub@cloudflare.com>
To: linux-man@vger.kernel.org
Cc: bpf@vger.kernel.org, Alejandro Colomar <alx.manpages@gmail.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>
Subject: [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero
Date: Mon, 25 Apr 2022 18:08:03 +0200	[thread overview]
Message-ID: <20220425160803.114851-1-jakub@cloudflare.com> (raw)

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


             reply	other threads:[~2022-04-25 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 16:08 Jakub Sitnicki [this message]
2022-04-25 21:01 ` [PATCH] bpf.2: Note that unused fields and padding in bpf_attr must be zero Alejandro Colomar
2022-04-26  9:05   ` Jakub Sitnicki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220425160803.114851-1-jakub@cloudflare.com \
    --to=jakub@cloudflare.com \
    --cc=alx.manpages@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox