linux-stable/tools
Yonghong Song 8482941f09 bpf: Add bpf_send_signal_thread() helper
Commit 8b401f9ed2 ("bpf: implement bpf_send_signal() helper")
added helper bpf_send_signal() which permits bpf program to
send a signal to the current process. The signal may be
delivered to any threads in the process.

We found a use case where sending the signal to the current
thread is more preferable.
  - A bpf program will collect the stack trace and then
    send signal to the user application.
  - The user application will add some thread specific
    information to the just collected stack trace for
    later analysis.

If bpf_send_signal() is used, user application will need
to check whether the thread receiving the signal matches
the thread collecting the stack by checking thread id.
If not, it will need to send signal to another thread
through pthread_kill().

This patch proposed a new helper bpf_send_signal_thread(),
which sends the signal to the thread corresponding to
the current kernel task. This way, user space is guaranteed that
bpf_program execution context and user space signal handling
context are the same thread.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115035002.602336-1-yhs@fb.com
2020-01-15 11:44:51 -08:00
..
accounting
arch tools arch x86: Sync asm/cpufeatures.h with the kernel sources 2019-12-02 15:20:05 -03:00
bpf selftests/bpf: Build runqslower from selftests 2020-01-14 09:23:12 -08:00
build perf tools: Allow to link with libbpf dynamicaly 2019-11-26 11:17:45 -03:00
cgroup
debugging
firewire
firmware
gpio tools: gpio: Correctly add make dependencies for gpio_utils 2019-11-13 13:46:04 +01:00
hv tools: hv: add vmbus testing tool 2019-11-21 20:10:44 -05:00
iio tools: iio: Correctly add make dependency for iio_utils 2019-11-10 17:11:06 +00:00
include bpf: Add bpf_send_signal_thread() helper 2020-01-15 11:44:51 -08:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Clean up bpf_helper_defs.h generation output 2020-01-13 17:48:13 -08:00
memory-model tools/memory-model/Documentation: Add plain accesses and data races to explanation.txt 2019-10-05 11:59:44 -07:00
nfsd
objtool Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-11-26 15:04:47 -08:00
pci tools: PCI: Fix fd leakage 2019-10-29 12:04:18 +00:00
pcmcia
perf perf vendor events s390: Remove name from L1D_RO_EXCL_WRITES description 2019-12-16 13:40:26 -03:00
power platform-drivers-x86 for v5.5-1 2019-12-01 18:24:25 -08:00
scripts
spi
testing selftests/bpf: Build runqslower from selftests 2020-01-14 09:23:12 -08:00
thermal/tmon
time
usb usbip: tools: fix fd leakage in the function of read_attr_usbip_status 2019-11-07 11:25:01 +01:00
virtio tools/virtio: xen stub 2019-10-13 09:38:27 -04:00
vm
wmi
Makefile