From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>,
Daniel Borkmann <daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Silvan Jegen <s.jegen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Walter Harms <wharms-fPG8STNUNVg@public.gmane.org>
Subject: Re: Draft 3 of bpf(2) man page for review
Date: Thu, 23 Jul 2015 11:58:01 +0200 [thread overview]
Message-ID: <55B0BAA9.4020106@gmail.com> (raw)
In-Reply-To: <55B01535.4080809-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
On 07/23/2015 12:12 AM, Alexei Starovoitov wrote:
> On 7/22/15 1:10 PM, Michael Kerrisk (man-pages) wrote:
>> BPF maps are a generic data structure for storage of different
>> data types. A user process can create multiple maps (with
>> key/value-pairs being opaque bytes of data) and access them via
>> file descriptors. Differnt eBPF programs can access the same
>> maps in parallel. It's up to the user process and eBPF program
>> to decide what they store inside maps.
>
> typo in 'Different'
Fixed.
>> eBPF program types
>> By picking prog_type, the program author selects a set of helper
>> functions that can be called from the eBPF program and the corre‐
>> sponding format of struct bpf_context (which is the data blob
>> passed into the eBPF program as the first argument). For exam‐
>> ple, programs loaded with a prog_type of
>> BPF_PROG_TYPE_SOCKET_FILTER may call the bpf_map_lookup_elem()
>> helper, whereas some other program types may not be able to
>> employ this helper. The set of functions available to eBPF pro‐
>> grams of a given type may increase in the future.
>
> overall it's all correct, but today bpf_map_lookup_elem() is allowed
> for all program types. May be change that to:
> "BPF_PROG_TYPE_KPROBE may call the bpf_probe_read() helper"
> since only type_kprobe programs can call it.
> type_sockets/type_sched_* cannot.
Changed, as you suggest.
>> The bpf_context argument is a pointer to a struct sk_buff.
>> Programs cannot access the fields of sk_buff directly.
>
> Probably drop last sentence and replace 'sk_buff' with '__sk_buff'
> in the first? Or for the first version we can drop both sentences.
I did the former.
> The rest looks great. Thank you much!
Thanks,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-07-23 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 18:43 Draft 3 of bpf(2) man page for review Michael Kerrisk (man-pages)
[not found] ` <55AFE46F.3090800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-22 19:22 ` Alexei Starovoitov
[not found] ` <55AFED75.2030208-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-07-22 20:10 ` Michael Kerrisk (man-pages)
[not found] ` <55AFF8BF.3050204-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-22 22:12 ` Alexei Starovoitov
[not found] ` <55B01535.4080809-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-07-23 9:58 ` Michael Kerrisk (man-pages) [this message]
2015-07-23 9:31 ` Daniel Borkmann
[not found] ` <55B0B461.1020201-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-07-23 11:23 ` Michael Kerrisk (man-pages)
[not found] ` <55B0CECA.2010105-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-23 12:47 ` Daniel Borkmann
[not found] ` <55B0E252.2010207-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-07-23 13:36 ` Michael Kerrisk (man-pages)
[not found] ` <55B0EDD7.8020407-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-23 13:39 ` Daniel Borkmann
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=55B0BAA9.4020106@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org \
--cc=daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=s.jegen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=wharms-fPG8STNUNVg@public.gmane.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;
as well as URLs for NNTP newsgroup(s).