All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
	"Martin KaFai Lau" <martin.lau@kernel.org>
Subject: [PATCH bpf-next v2 3/3] docs/bpf: Add KF_RCU documentation
Date: Sat, 3 Dec 2022 10:46:13 -0800	[thread overview]
Message-ID: <20221203184613.478967-1-yhs@fb.com> (raw)
In-Reply-To: <20221203184557.476871-1-yhs@fb.com>

Add proper KF_RCU documentation in kfuncs.rst.

Signed-off-by: Yonghong Song <yhs@fb.com>
---
 Documentation/bpf/kfuncs.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/bpf/kfuncs.rst b/Documentation/bpf/kfuncs.rst
index 90774479ab7a..b027fe16ee66 100644
--- a/Documentation/bpf/kfuncs.rst
+++ b/Documentation/bpf/kfuncs.rst
@@ -191,6 +191,15 @@ rebooting or panicking. Due to this additional restrictions apply to these
 calls. At the moment they only require CAP_SYS_BOOT capability, but more can be
 added later.
 
+2.4.8 KF_RCU flag
+-----------------
+
+The KF_RCU flag is used for kfuncs which have a rcu ptr as its argument.
+When used together with KF_ACQUIRE, it indicates the kfunc should have a
+single argument which must be a trusted argument or a MEM_RCU pointer.
+The argument may have reference count of 0 and the kfunc must take this
+into consideration.
+
 2.5 Registering the kfuncs
 --------------------------
 
-- 
2.30.2


  parent reply	other threads:[~2022-12-03 18:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-03 18:45 [PATCH bpf-next v2 0/3] bpf: Handle MEM_RCU type properly Yonghong Song
2022-12-03 18:46 ` [PATCH bpf-next v2 1/3] " Yonghong Song
2022-12-03 18:46 ` [PATCH bpf-next v2 2/3] selftests/bpf: Fix rcu_read_lock test with new MEM_RCU semantics Yonghong Song
2022-12-03 18:46 ` Yonghong Song [this message]
2022-12-04 21:00 ` [PATCH bpf-next v2 0/3] bpf: Handle MEM_RCU type properly patchwork-bot+netdevbpf

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=20221203184613.478967-1-yhs@fb.com \
    --to=yhs@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    /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 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.