linux/scripts
Quentin Monnet 56a092c895 bpf: add script and prepare bpf.h for new helpers documentation
Remove previous "overview" of eBPF helpers from user bpf.h header.
Replace it by a comment explaining how to process the new documentation
(to come in following patches) with a Python script to produce RST, then
man page documentation.

Also add the aforementioned Python script under scripts/. It is used to
process include/uapi/linux/bpf.h and to extract helper descriptions, to
turn it into a RST document that can further be processed with rst2man
to produce a man page. The script takes one "--filename <path/to/file>"
option. If the script is launched from scripts/ in the kernel root
directory, it should be able to find the location of the header to
parse, and "--filename <path/to/file>" is then optional. If it cannot
find the file, then the option becomes mandatory. RST-formatted
documentation is printed to standard output.

Typical workflow for producing the final man page would be:

    $ ./scripts/bpf_helpers_doc.py \
            --filename include/uapi/linux/bpf.h > /tmp/bpf-helpers.rst
    $ rst2man /tmp/bpf-helpers.rst > /tmp/bpf-helpers.7
    $ man /tmp/bpf-helpers.7

Note that the tool kernel-doc cannot be used to document eBPF helpers,
whose signatures are not available directly in the header files
(pre-processor directives are used to produce them at the beginning of
the compilation process).

v4:
- Also remove overviews for newly added bpf_xdp_adjust_tail() and
  bpf_skb_get_xfrm_state().
- Remove vague statement about what helpers are restricted to GPL
  programs in "LICENSE" section for man page footer.
- Replace license boilerplate with SPDX tag for Python script.

v3:
- Change license for man page.
- Remove "for safety reasons" from man page header text.
- Change "packets metadata" to "packets" in man page header text.
- Move and fix comment on helpers introducing no overhead.
- Remove "NOTES" section from man page footer.
- Add "LICENSE" section to man page footer.
- Edit description of file include/uapi/linux/bpf.h in man page footer.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-04-27 00:21:58 +02:00
..
basic kbuild: move include/config/ksym/* to include/ksym/* 2018-03-26 02:01:23 +09:00
coccinelle Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
dtc Kbuild updates for v4.17 (2nd) 2018-04-15 17:21:30 -07:00
gcc-plugins security: convert security hooks to use hlist 2018-03-31 13:18:27 +11:00
gdb
genksyms kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically 2018-04-07 19:04:02 +09:00
kconfig kconfig: extend output of 'listnewconfig' 2018-04-13 23:23:11 +09:00
ksymoops
mod mn10300: Remove the architecture 2018-03-09 23:19:56 +01:00
package kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg 2018-04-13 23:18:41 +09:00
selinux
tracing
.gitignore
adjust_autoksyms.sh Kbuild updates for v4.17 2018-04-03 15:51:22 -07:00
asn1_compiler.c kbuild: rename *-asn1.[ch] to *.asn1.[ch] 2018-04-07 19:04:02 +09:00
bloat-o-meter syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention 2018-04-09 16:47:28 +02:00
bootgraph.pl
bpf_helpers_doc.py bpf: add script and prepare bpf.h for new helpers documentation 2018-04-27 00:21:58 +02:00
check_00index.sh
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl checkpatch: whinge about bool bitfields 2018-04-11 10:28:36 -07:00
checkstack.pl scripts/checkstack.pl: remove blackfin support 2018-03-26 15:56:15 +02:00
checksyscalls.sh
checkversion.pl
clang-version.sh kbuild: add clang-version.sh 2018-03-26 02:01:18 +09:00
cleanfile
cleanpatch
coccicheck
config
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
decodecode
depmod.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line scripts/faddr2line: show the code context 2018-04-05 21:36:21 -07:00
file-size.sh kbuild: Use ls(1) instead of stat(1) to obtain file size 2018-03-26 02:01:24 +09:00
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_initramfs_list.sh kbuild: Improve portability of some sed invocations 2018-03-26 02:01:18 +09:00
get_dvb_firmware
get_maintainer.pl
gfp-translate
headerdep.pl
headers.sh
headers_check.pl
headers_install.sh kbuild: Improve portability of some sed invocations 2018-03-26 02:01:18 +09:00
insert-sys-cert.c
kallsyms.c arm64 updates for 4.17 2018-04-04 16:01:43 -07:00
Kbuild.include Kbuild: fix # escaping in .cmd files for future Make 2018-04-11 00:03:02 +09:00
kernel-doc docs: kernel-doc: fix parsing of arrays 2018-03-29 15:27:42 -06:00
ld-version.sh
leaking_addresses.pl leaking_addresses: check if file name contains address 2018-04-07 08:50:34 +10:00
Lindent
link-vmlinux.sh kbuild: Use ls(1) instead of stat(1) to obtain file size 2018-03-26 02:01:24 +09:00
Makefile
Makefile.asm-generic
Makefile.build kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers 2018-04-07 19:04:02 +09:00
Makefile.clean
Makefile.dtbinst
Makefile.extrawarn
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: use HOSTLDFLAGS for single .c executables 2018-04-07 19:04:02 +09:00
Makefile.kasan
Makefile.kcov
Makefile.lib kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers 2018-04-07 19:04:02 +09:00
Makefile.modbuiltin
Makefile.modinst
Makefile.modpost
Makefile.modsign
Makefile.ubsan
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
namespace.pl kbuild: rename built-in.o to built-in.a 2018-03-26 02:01:19 +09:00
objdiff
parse-maintainers.pl
patch-kernel
pnmtologo.c
profile2linkerlist.pl
prune-kernel
recordmcount.c Drop a bunch of metag references 2018-02-23 14:29:59 +00:00
recordmcount.h
recordmcount.pl RISC-V changes for 4.17 2018-04-04 16:43:47 -07:00
setlocalversion
show_delta
sign-file.c
sortextable.c
sortextable.h
spelling.txt
sphinx-pre-install
split-man.pl
stackdelta
stackusage
tags.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh