Skip to content

Commit e341c7e

Browse files
committed
Merge: bpf, xdp: update to 6.3
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2583 Rebase bpf and xdp to 6.3. Bugzilla: https://bugzilla.redhat.com/2178930 Signed-off-by: Viktor Malik <vmalik@redhat.com> Approved-by: Rafael Aquini <aquini@redhat.com> Approved-by: Artem Savkov <asavkov@redhat.com> Approved-by: Jason Wang <jasowang@redhat.com> Approved-by: Jiri Benc <jbenc@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: Baoquan He <5820488-baoquan_he@users.noreply.gitlab.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents e23754e + 9195494 commit e341c7e

File tree

413 files changed

+15912
-4319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+15912
-4319
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@
555555
Format: <string>
556556
nosocket -- Disable socket memory accounting.
557557
nokmem -- Disable kernel memory accounting.
558+
nobpf -- Disable BPF memory accounting.
558559

559560
checkreqprot [SELINUX] Set initial checkreqprot flag value.
560561
Format: { "0" | "1" }

Documentation/bpf/bpf_design_QA.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ data structures and compile with kernel internal headers. Both of these
208208
kernel internals are subject to change and can break with newer kernels
209209
such that the program needs to be adapted accordingly.
210210

211+
New BPF functionality is generally added through the use of kfuncs instead of
212+
new helpers. Kfuncs are not considered part of the stable API, and have their own
213+
lifecycle expectations as described in :ref:`BPF_kfunc_lifecycle_expectations`.
214+
211215
Q: Are tracepoints part of the stable ABI?
212216
------------------------------------------
213217
A: NO. Tracepoints are tied to internal implementation details hence they are
@@ -236,8 +240,8 @@ A: NO. Classic BPF programs are converted into extend BPF instructions.
236240

237241
Q: Can BPF call arbitrary kernel functions?
238242
-------------------------------------------
239-
A: NO. BPF programs can only call a set of helper functions which
240-
is defined for every program type.
243+
A: NO. BPF programs can only call specific functions exposed as BPF helpers or
244+
kfuncs. The set of available functions is defined for every program type.
241245

242246
Q: Can BPF overwrite arbitrary kernel memory?
243247
---------------------------------------------
@@ -263,7 +267,12 @@ Q: New functionality via kernel modules?
263267
Q: Can BPF functionality such as new program or map types, new
264268
helpers, etc be added out of kernel module code?
265269

266-
A: NO.
270+
A: Yes, through kfuncs and kptrs
271+
272+
The core BPF functionality such as program types, maps and helpers cannot be
273+
added to by modules. However, modules can expose functionality to BPF programs
274+
by exporting kfuncs (which may return pointers to module-internal data
275+
structures as kptrs).
267276

268277
Q: Directly calling kernel function is an ABI?
269278
----------------------------------------------
@@ -278,7 +287,8 @@ kernel functions have already been used by other kernel tcp
278287
cc (congestion-control) implementations. If any of these kernel
279288
functions has changed, both the in-tree and out-of-tree kernel tcp cc
280289
implementations have to be changed. The same goes for the bpf
281-
programs and they have to be adjusted accordingly.
290+
programs and they have to be adjusted accordingly. See
291+
:ref:`BPF_kfunc_lifecycle_expectations` for details.
282292

283293
Q: Attaching to arbitrary kernel functions is an ABI?
284294
-----------------------------------------------------
@@ -340,6 +350,7 @@ compatibility for these features?
340350

341351
A: NO.
342352

343-
Unlike map value types, there are no stability guarantees for this case. The
344-
whole API to work with allocated objects and any support for special fields
345-
inside them is unstable (since it is exposed through kfuncs).
353+
Unlike map value types, the API to work with allocated objects and any support
354+
for special fields inside them is exposed through kfuncs, and thus has the same
355+
lifecycle expectations as the kfuncs themselves. See
356+
:ref:`BPF_kfunc_lifecycle_expectations` for details.

Documentation/bpf/bpf_devel_QA.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ workflows related to reporting bugs, submitting patches, and queueing
77
patches for stable kernels.
88

99
For general information about submitting patches, please refer to
10-
`Documentation/process/`_. This document only describes additional specifics
11-
related to BPF.
10+
Documentation/process/submitting-patches.rst. This document only describes
11+
additional specifics related to BPF.
1212

1313
.. contents::
1414
:local:
@@ -461,15 +461,15 @@ needed::
461461

462462
$ sudo make run_tests
463463

464-
See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
465-
document for further documentation.
464+
See :doc:`kernel selftest documentation </dev-tools/kselftest>`
465+
for details.
466466

467467
To maximize the number of tests passing, the .config of the kernel
468468
under test should match the config file fragment in
469469
tools/testing/selftests/bpf as closely as possible.
470470

471471
Finally to ensure support for latest BPF Type Format features -
472-
discussed in `Documentation/bpf/btf.rst`_ - pahole version 1.16
472+
discussed in Documentation/bpf/btf.rst - pahole version 1.16
473473
is required for kernels built with CONFIG_DEBUG_INFO_BTF=y.
474474
pahole is delivered in the dwarves package or can be built
475475
from source at
@@ -684,12 +684,8 @@ when:
684684

685685

686686
.. Links
687-
.. _Documentation/process/: https://www.kernel.org/doc/html/latest/process/
688687
.. _netdev-FAQ: ../networking/netdev-FAQ.rst
689688
.. _selftests:
690689
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/bpf/
691-
.. _Documentation/dev-tools/kselftest.rst:
692-
https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
693-
.. _Documentation/bpf/btf.rst: btf.rst
694690

695691
Happy BPF hacking!

0 commit comments

Comments
 (0)