mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
A mirror of the official Linux kernel repository just in case
cbeaad9028
Quentin Monnet says: ==================== Hi, This set adds a new command to bpftool in order to dump a list of eBPF-related parameters for the system (or for a specific network device) to the console. Once again, this is based on a suggestion from Daniel. At this time, output includes: - Availability of bpf() system call - Availability of bpf() system call for unprivileged users - JIT status (enabled or not, with or without debugging traces) - JIT hardening status - JIT kallsyms exports status - Global memory limit for JIT compiler for unprivileged users - Status of kernel compilation options related to BPF features - Availability of known eBPF program types - Availability of known eBPF map types - Availability of known eBPF helper functions There are three different ways to dump this information at this time: - Plain output dumps probe results in plain text. It is the most flexible options for providing descriptive output to the user, but should not be relied upon for parsing the output. - JSON output is supported. - A third mode, available through the "macros" keyword appended to the command line, dumps some of those parameters (not all) as a series of "#define" directives, that can be included into a C header file for example. Probes for supported program and map types, and supported helpers, are directly added to libbpf, so that other applications (or selftests) can reuse them as necessary. If the user does not have root privileges (or more precisely, the CAP_SYS_ADMIN capability) detection will be erroneous for most parameters. Therefore, forbid non-root users to run the command. v5: - Move exported symbols to a new LIBBPF_0.0.2 section in libbpf.map (patches 4 to 6). - Minor fixes on patches 3 and 4. v4: - Probe bpf_jit_limit parameter (patch 2). - Probe some additional kernel config options (patch 3). - Minor fixes on patch 6. v3: - Do not probe kernel version in bpftool (just retrieve it to probe support for kprobes in libbpf). - Change the way results for helper support is displayed: now one list of compatible helpers for each program type (and C-style output gets a HAVE_PROG_TYPE_HELPER(prog_type, helper) macro to help with tests. See patches 6, 7. - Address other comments from feedback from v2 (please refer to individual patches' history). v2 (please also refer to individual patches' history): - Move probes for prog/map types, helpers, from bpftool to libbpf. - Move C-style output as a separate patch, and restrict it to a subset of collected information (bpf() availability, prog/map types, helpers). - Now probe helpers with all supported program types, and display a list of compatible program types (as supported on the system) for each helper. - NOT addressed: grouping compilation options for kernel into subsections (patch 3) (I don't see an easy way of grouping them at the moment, please see also the discussion on v1 thread). ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org> |
||
---|---|---|
arch | ||
block | ||
certs | ||
crypto | ||
Documentation | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
LICENSES | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.