aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2015-08-07 11:39:07 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2015-08-07 11:39:07 +0200
commitaabe0499f3c837735a80f220201400dfde8b34e5 (patch)
tree4416d5c6e9ea97ddb84bc68aedad56610420f176
parent57f8da4c64370f233f6c11c5897895028d9e96e4 (diff)
downloadman-pages-aabe0499f3c837735a80f220201400dfde8b34e5.tar.gz
bpf.2: Minor tweaks after comments from Daniel Borkmann
Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/bpf.215
1 files changed, 9 insertions, 6 deletions
diff --git a/man2/bpf.2 b/man2/bpf.2
index c49cbb529d..93ff7ece29 100644
--- a/man2/bpf.2
+++ b/man2/bpf.2
@@ -67,8 +67,9 @@ This type of map stores file descriptors referring to other eBPF programs.
When a lookup in the map is performed, the program flow is
redirected in-place to the beginning of another eBPF program and does not
return back to the calling program.
-The level of nesting has a fixed limit of 32, so that infinite loops cannot
-be crafted.
+The level of nesting has a fixed limit of 32,
+.\" Defined by the kernel constant MAX_TAIL_CALL_CNT in include/linux/bpf.h
+so that infinite loops cannot be crafted.
At runtime, the program file descriptors stored in the map can be modified,
so program functionality can be altered based on specific requirements.
All programs referred to in a program-array map must
@@ -672,10 +673,12 @@ The invoked program will then reuse the same stack.
When a jump into the new program has been performed,
it won't return to the old program anymore.
-If no eBPF program is found at the given index of the program array,
-.\" FIXME The array does not contain eBPF programs, but rather file
-.\" descriptors. So, what does "no eBPF program is found" here
-.\" really mean?
+If no eBPF program is found at the given index of the program array
+(because the map slot doesn't contain a valid program file descriptor,
+the specified lookup index/key is out of bounds,
+or the limit of 32
+.\" MAX_TAIL_CALL_CNT
+nested calls has been exceed),
execution continues with the current eBPF program.
This can be used as a fall-through for default cases.