linux-stable/samples
Daniel T. Lee 5062a0af2b samples/bpf: fix broken map lookup probe
[ Upstream commit d93a7cf6ca ]

In the commit 7c4cd051ad ("bpf: Fix syscall's stackmap lookup
potential deadlock"), a potential deadlock issue was addressed, which
resulted in *_map_lookup_elem not triggering BPF programs.
(prior to lookup, bpf_disable_instrumentation() is used)

To resolve the broken map lookup probe using "htab_map_lookup_elem",
this commit introduces an alternative approach. Instead, it utilize
"bpf_map_copy_value" and apply a filter specifically for the hash table
with map_type.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Fixes: 7c4cd051ad ("bpf: Fix syscall's stackmap lookup potential deadlock")
Link: https://lore.kernel.org/r/20230818090119.477441-8-danieltimlee@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:48:06 +02:00
..
acrn virt: acrn: Replace obsolete memalign() with posix_memalign() 2023-04-20 14:20:51 +02:00
auxdisplay
binderfs
bpf samples/bpf: fix broken map lookup probe 2023-09-13 09:48:06 +02:00
configfs
connector
coresight
fanotify
fprobe fprobe: Skip exit_handler if entry_handler returns !0 2023-03-28 18:52:22 -04:00
ftrace samples: ftrace: Save required argument registers in sample trampolines 2023-07-23 13:54:09 +02:00
hid samples/hid: Fix spelling mistake "wihout" -> "without" 2022-11-21 22:11:52 +01:00
hidraw
hw_breakpoint
kdb
kfifo
kmemleak kmemleak-test: fix kmemleak_test.c build logic 2023-04-18 16:29:47 -07:00
kobject samples/kobject: make kobj_type structure constant 2023-02-08 13:34:41 +01:00
kprobes samples/kprobes: Add LoongArch support 2023-02-25 22:12:17 +08:00
landlock samples/landlock: Document best-effort approach for LANDLOCK_ACCESS_FS_REFER 2022-11-07 20:49:50 +01:00
livepatch livepatch: Reorder to use before freeing a pointer 2022-03-23 13:51:11 +01:00
mei
nitro_enclaves
pidfd
pktgen samples: pktgen: Use "grep -E" instead of "egrep" 2022-11-22 13:23:48 +01:00
qmi soc: qcom: qmi: use const for struct qmi_elem_info 2022-08-29 17:33:01 -05:00
rpmsg
rust samples: rust: print: Add sample code for Arc printing 2023-04-10 05:05:43 +02:00
seccomp
timers
trace_events tracing: Fix cpumask() example typo 2022-12-14 11:17:55 -05:00
trace_printk
uhid
user_events tracing/user_events: Use write ABI in example 2023-03-29 06:52:09 -04:00
v4l treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vfio-mdev Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
vfs
watch_queue
watchdog
Kconfig - Nick Piggin's "shoot lazy tlbs" series, to improve the peformance of 2023-04-27 19:42:02 -07:00
Makefile kmemleak-test: fix kmemleak_test.c build logic 2023-04-18 16:29:47 -07:00