Merge remote-tracking branch 'sm8350/lineage-20' into lineage-23.0

* sm8350/lineage-20: (841 commits)
  UPSTREAM: fs: prevent out-of-bounds array speculation when closing a file descriptor
  UPSTREAM: file: let pick_file() tell caller it's done
  BACKPORT: rcu-tasks: Add a grace-period start time for throttling and debug
  BACKPORT: maccess: rename probe_user_{read,write} to copy_{from,to}_user_nofault
  BACKPORT: powerpc: use probe_user_read() and probe_user_write()
  BACKPORT: maccess: rename probe_kernel_address to get_kernel_nofault
  BACKPORT: tracing/kprobes: handle mixed kernel/userspace probes better
  BACKPORT: maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault
  UPSTREAM: maccess: unexport probe_kernel_write()
  UPSTREAM: maccess: return -ERANGE when probe_kernel_read() fails
  UPSTREAM: maccess: allow architectures to provide kernel probing directly
  BACKPORT: maccess: remove strncpy_from_unsafe
  UPSTREAM: bpf:bpf_seq_printf(): handle potentially unsafe format string better
  UPSTREAM: bpf: Use strncpy_from_unsafe_strict() in bpf_seq_printf() helper
  UPSTREAM: bpf: handle the compat string in bpf_trace_copy_string better
  UPSTREAM: bpf: factor out a bpf_trace_copy_string helper
  BACKPORT: maccess: always use strict semantics for probe_kernel_read
  UPSTREAM: maccess: unify the probe kernel arch hooks
  UPSTREAM: maccess: remove probe_read_common and probe_write_common
  UPSTREAM: maccess: remove duplicate kerneldoc comments
  ...

Change-Id: I22cf7d6fb34826727904effb4f012b0ef459149d
This commit is contained in:
Michael Bestas 2026-01-20 20:47:39 +02:00
commit 2eb0f824a1
No known key found for this signature in database
529 changed files with 40893 additions and 9494 deletions

View file

@ -320,6 +320,11 @@ may be interested in:
of eBPF maps are used with a given helper function.
* *kernel/bpf/* directory contains other files in which additional helpers are
defined (for cgroups, sockmaps, etc.).
* The bpftool utility can be used to probe the availability of helper functions
on the system (as well as supported program and map types, and a number of
other parameters). To do so, run **bpftool feature probe** (see
**bpftool-feature**\ (8) for details). Add the **unprivileged** keyword to
list features available to unprivileged users.
Compatibility between helper functions and program types can generally be found
in the files where helper functions are defined. Look for the **struct
@ -340,6 +345,7 @@ SEE ALSO
========
**bpf**\ (2),
**bpftool**\ (8),
**cgroups**\ (7),
**ip**\ (8),
**perf_event_open**\ (2),
@ -400,6 +406,7 @@ class PrinterHelpers(Printer):
type_fwds = [
'struct bpf_fib_lookup',
'struct bpf_sk_lookup',
'struct bpf_perf_event_data',
'struct bpf_perf_event_value',
'struct bpf_sock',
@ -415,10 +422,19 @@ class PrinterHelpers(Printer):
'struct sk_reuseport_md',
'struct sockaddr',
'struct tcphdr',
'struct seq_file',
'struct tcp6_sock',
'struct tcp_sock',
'struct tcp_timewait_sock',
'struct tcp_request_sock',
'struct udp6_sock',
'struct task_struct',
'struct __sk_buff',
'struct sk_msg_md',
'struct xdp_md',
'struct path',
'struct btf_ptr',
]
known_types = {
'...',
@ -437,6 +453,9 @@ class PrinterHelpers(Printer):
'struct bpf_fib_lookup',
'struct bpf_perf_event_data',
'struct bpf_perf_event_value',
'struct bpf_pidns_info',
'struct bpf_redir_neigh',
'struct bpf_sk_lookup',
'struct bpf_sock',
'struct bpf_sock_addr',
'struct bpf_sock_ops',
@ -450,6 +469,15 @@ class PrinterHelpers(Printer):
'struct sk_reuseport_md',
'struct sockaddr',
'struct tcphdr',
'struct seq_file',
'struct tcp6_sock',
'struct tcp_sock',
'struct tcp_timewait_sock',
'struct tcp_request_sock',
'struct udp6_sock',
'struct task_struct',
'struct path',
'struct btf_ptr',
}
mapped_types = {
'u8': '__u8',
@ -467,6 +495,11 @@ class PrinterHelpers(Printer):
'struct sk_msg_buff': 'struct sk_msg_md',
'struct xdp_buff': 'struct xdp_md',
}
# Helpers overloaded for different context types.
overloaded_helpers = [
'bpf_get_socket_cookie',
'bpf_sk_assign',
]
def print_header(self):
header = '''\
@ -523,7 +556,7 @@ class PrinterHelpers(Printer):
for i, a in enumerate(proto['args']):
t = a['type']
n = a['name']
if proto['name'] == 'bpf_get_socket_cookie' and i == 0:
if proto['name'] in self.overloaded_helpers and i == 0:
t = 'void'
n = 'ctx'
one_arg = '{}{}'.format(comma, self.map_type(t))

View file

@ -440,6 +440,12 @@ fi
vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
# fill in BTF IDs
if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
info BTFIDS vmlinux
${RESOLVE_BTFIDS} vmlinux
fi
if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
info SORTEX vmlinux
sortextable vmlinux