linux-stable/Documentation
Benjamin Tissoires 4b9a3f49f0 HID: bpf: rework how programs are attached and stored in the kernel
Previously, HID-BPF was relying on a bpf tracing program to be notified
when a program was released from userspace. This is error prone, as
LLVM sometimes inline the function and sometimes not.

So instead of messing up with the bpf prog ref count, we can use the
bpf_link concept which actually matches exactly what we want:
- a bpf_link represents the fact that a given program is attached to a
  given HID device
- as long as the bpf_link has fd opened (either by the userspace program
  still being around or by pinning the bpf object in the bpffs), the
  program stays attached to the HID device
- once every user has closed the fd, we get called by
  hid_bpf_link_release() that we no longer have any users, and we can
  disconnect the program to the device in 2 passes: first atomically clear
  the bit saying that the link is active, and then calling release_work in
  a scheduled work item.

This solves entirely the problems of BPF tracing not showing up and is
definitely cleaner.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2023-01-18 22:08:38 +01:00
..
ABI memory tier, sysfs: rename attribute "nodes" to "nodelist" 2022-10-28 13:37:22 -07:00
accounting filemap: make the accounting of thrashing more consistent 2022-09-26 19:46:06 -07:00
admin-guide media: vivid.rst: loop_video is set on the capture devnode 2022-10-25 16:43:54 +01:00
arc
arm EFI updates for v6.1 2022-10-09 08:56:54 -07:00
arm64 ARM: 2022-11-06 10:46:59 -08:00
block Documentation: document ublk user recovery feature 2022-10-18 05:12:26 -07:00
bpf Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
cdrom
core-api overflow: Fix kern-doc markup for functions 2022-10-25 14:57:42 -07:00
cpu-freq
crypto
dev-tools linux-kselftest-kunit-6.1-rc1-2 2022-10-12 15:01:58 -07:00
devicetree Including fixes from netfilter, wifi, can and bpf. 2022-11-10 17:31:15 -08:00
doc-guide Rust introduction for v6.1-rc1 2022-10-03 16:39:37 -07:00
driver-api Documentation: devres: add missing I2C helper 2022-11-02 21:16:38 +01:00
fault-injection docs: notifier-error-inject: Correct test's name 2022-10-07 10:32:16 -06:00
fb Documentation: fb: udlfb: clean up text and formatting 2022-09-27 13:21:44 -06:00
features
filesystems A handful of relatively simple documentation fixes, plus a set of patches 2022-10-13 10:58:32 -07:00
firmware-guide Merge branches 'acpi-misc', 'acpi-tools' and 'acpi-docs' 2022-10-03 20:03:49 +02:00
firmware_class
fpga
gpu Immutable backlight-detect-refactor branch between acpi, drm-* and pdx86 2022-09-14 12:27:10 +01:00
hid HID: bpf: rework how programs are attached and stored in the kernel 2023-01-18 22:08:38 +01:00
hwmon hwmon: (corsair-psu) Add USB id of the new HX1500i psu 2022-10-22 06:59:12 -07:00
i2c docs: i2c: slave-interface: return errno when handle I2C_SLAVE_WRITE_REQUESTED 2022-09-28 21:41:59 +02:00
ia64
iio docs: iio: add documentation for BNO055 driver 2022-09-21 18:42:56 +01:00
images
infiniband
input Merge branch 'next' into for-linus 2022-10-09 22:30:23 -07:00
isdn
kbuild Documentation: kbuild: Add description of git for reproducible builds 2022-10-28 00:16:29 +09:00
kernel-hacking Documentation: Fix spelling mistake in hacking.rst 2022-10-24 11:27:51 -06:00
leds
litmus-tests
livepatch
locking Remove duplicate words inside documentation 2022-09-27 13:21:43 -06:00
loongarch
m68k
maintainer
mhi
mips
misc-devices
mm A handful of relatively simple documentation fixes, plus a set of patches 2022-10-13 10:58:32 -07:00
netlabel
networking Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
peci
power
powerpc powerpc/64s: update cpu selection options 2022-09-28 19:22:10 +10:00
process Four small fixes for the docs tree. 2022-11-01 15:11:42 -07:00
RCU There's not a huge amount of activity in the docs tree this time around, 2022-10-03 10:23:32 -07:00
riscv doc: RISC-V: Document that misaligned accesses are supported 2022-10-12 08:58:10 -07:00
rust x86: enable initial Rust support 2022-09-28 09:02:45 +02:00
s390 vfio/mdev: embedd struct mdev_parent in the parent data structure 2022-10-04 12:06:58 -06:00
scheduler docs: scheduler: Update new path for the sysctl knobs 2022-09-27 13:21:42 -06:00
scsi
security landlock: Fix documentation style 2022-09-29 18:43:04 +02:00
sh
sound
sparc
sphinx
sphinx-static
spi
staging docs: put atomic*.txt and memory-barriers.txt into the core-api book 2022-09-29 12:55:06 -06:00
target
timers
tools A handful of relatively simple documentation fixes, plus a set of patches 2022-10-13 10:58:32 -07:00
trace tracing/histogram: Update document for KEYS_MAX size 2022-10-18 15:41:56 -06:00
translations docs/process/howto: Replace C89 with C11 2022-10-24 11:27:51 -06:00
usb
userspace-api media fixes for v6.1-rc2 2022-10-22 15:30:15 -07:00
virt ARM: 2022-10-11 20:07:44 -07:00
w1 Documentation: W1: minor typo corrections 2022-09-27 13:21:44 -06:00
watchdog
x86 - Get rid of a single ksize() usage 2022-10-04 10:12:08 -07:00
xtensa
.gitignore
arch.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py There's not a huge amount of activity in the docs tree this time around, 2022-10-03 10:23:32 -07:00
docutils.conf
dontdiff
index.rst Rust introduction for v6.1-rc1 2022-10-03 16:39:37 -07:00
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst docs: Rewrite the front page 2022-09-29 12:55:06 -06:00