BPF List
 help / color / mirror / Atom feed
From: Kui-Feng Lee <thinker.li@gmail.com>
To: bpf@vger.kernel.org, ast@kernel.org, martin.lau@linux.dev,
	song@kernel.org, kernel-team@meta.com, andrii@kernel.org
Cc: sinquersw@gmail.com, kuifeng@meta.com,
	Kui-Feng Lee <thinker.li@gmail.com>
Subject: [RFC bpf-next 4/5] libbpf: define __kptr_user.
Date: Wed,  7 Aug 2024 16:57:54 -0700	[thread overview]
Message-ID: <20240807235755.1435806-5-thinker.li@gmail.com> (raw)
In-Reply-To: <20240807235755.1435806-1-thinker.li@gmail.com>

Make __kptr_user available to BPF programs to enable them to define user
kptrs.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
---
 tools/lib/bpf/bpf_helpers.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index 305c62817dd3..8f7fb00b90e3 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -185,6 +185,7 @@ enum libbpf_tristate {
 #define __kptr_untrusted __attribute__((btf_type_tag("kptr_untrusted")))
 #define __kptr __attribute__((btf_type_tag("kptr")))
 #define __percpu_kptr __attribute__((btf_type_tag("percpu_kptr")))
+#define __kptr_user __attribute__((btf_type_tag("kptr_user")))
 
 #if defined (__clang__)
 #define bpf_ksym_exists(sym) ({						\
-- 
2.34.1


  parent reply	other threads:[~2024-08-07 23:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 23:57 [RFC bpf-next 0/5] Share user memory to BPF program through task storage map Kui-Feng Lee
2024-08-07 23:57 ` [RFC bpf-next 1/5] bpf: Parse and support "kptr_user" tag Kui-Feng Lee
2024-08-07 23:57 ` [RFC bpf-next 2/5] bpf: Handle BPF_KPTR_USER in verifier Kui-Feng Lee
2024-08-12 16:48   ` Alexei Starovoitov
2024-08-13 16:52     ` Kui-Feng Lee
2024-08-13 19:35       ` Alexei Starovoitov
2024-08-13 23:13         ` Kui-Feng Lee
2024-08-07 23:57 ` [RFC bpf-next 3/5] bpf: pin, translate, and unpin __kptr_user from syscalls Kui-Feng Lee
2024-08-08  0:05   ` Kui-Feng Lee
2024-08-08  0:39   ` Kui-Feng Lee
2024-08-12 16:00   ` Kui-Feng Lee
2024-08-12 16:45   ` Alexei Starovoitov
2024-08-12 17:24     ` Kui-Feng Lee
2024-08-12 17:36       ` Alexei Starovoitov
2024-08-12 17:51         ` Kui-Feng Lee
2024-08-07 23:57 ` Kui-Feng Lee [this message]
2024-08-07 23:57 ` [RFC bpf-next 5/5] selftests/bpf: test __kptr_user on the value of a task storage map Kui-Feng Lee
2024-08-12 16:58   ` Alexei Starovoitov
2024-08-12 17:15     ` Kui-Feng Lee
2024-08-12 17:31       ` Alexei Starovoitov
2024-08-12 18:10         ` Kui-Feng Lee

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=20240807235755.1435806-5-thinker.li@gmail.com \
    --to=thinker.li@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuifeng@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=sinquersw@gmail.com \
    --cc=song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox