TencentOS-kernel/include
KP Singh 05b3cda0f2 bpf: Allow local storage to be used from LSM programs
[upstream commit 30897832d8b97e93833fb52c0a02951db3692ed2]

Adds support for both bpf_{sk, inode}_storage_{get, delete} to be used
in LSM programs. These helpers are not used for tracing programs
(currently) as their usage is tied to the life-cycle of the object and
should only be used where the owning object won't be freed (when the
owning object is passed as an argument to the LSM hook). Thus, they
are safer to use in LSM hooks than tracing. Usage of local storage in
tracing programs will probably follow a per function based whitelist
approach.

Since the UAPI helper signature for bpf_sk_storage expect a bpf_sock,
it, leads to a compilation warning for LSM programs, it's also updated
to accept a void * pointer instead.

Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200825182919.1118197-7-kpsingh@chromium.org
2022-08-30 11:33:29 +08:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-04-12 12:53:31 +08:00
asm-generic bpf: Add BTF_ID_LIST/BTF_ID/BTF_ID_UNUSED macros 2022-08-30 11:33:27 +08:00
clocksource Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-20 16:07:23 +08:00
drm iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header 2021-03-16 16:41:21 +08:00
dt-bindings Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
keys KEYS: Don't write out to userspace while holding key semaphore 2021-03-16 16:26:42 +08:00
kvm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
linux bpf: Implement bpf_local_storage for inodes 2022-08-30 11:33:29 +08:00
math-emu Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
media media: rc: compile rc-cec.c into rc-core 2021-04-12 12:53:01 +08:00
misc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
net bpf: Allow local storage to be used from LSM programs 2022-08-30 11:33:29 +08:00
pcmcia Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ras Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rdma RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() 2021-03-16 16:38:49 +08:00
scsi kabi: reserve space for kabi 2021-06-23 07:24:18 +00:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2021-03-16 16:35:56 +08:00
sound ALSA: hda: intel-nhlt: verify config type 2021-04-12 12:52:52 +08:00
target scsi: target: core: Add cmd length set before cmd complete 2021-04-12 12:53:04 +08:00
trace writeback: Drop I_DIRTY_TIME_EXPIRE 2021-04-12 12:51:42 +08:00
uapi bpf: Allow local storage to be used from LSM programs 2022-08-30 11:33:29 +08:00
vdso Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
video Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xen Xen/gntdev: correct error checking in gntdev_map_grant_pages() 2021-04-12 12:52:07 +08:00