linux/include/uapi
Beau Belgrave 2fc3d0ac09 tracing/user_events: Allow events to persist for perfmon_capable users
[ Upstream commit 5dbd04eddb ]

There are several scenarios that have come up where having a user_event
persist even if the process that registered it exits. The main one is
having a daemon create events on bootup that shouldn't get deleted if
the daemon has to exit or reload. Another is within OpenTelemetry
exporters, they wish to potentially check if a user_event exists on the
system to determine if exporting the data out should occur. The
user_event in this case must exist even in the absence of the owning
process running (such as the above daemon case).

Expose the previously internal flag USER_EVENT_REG_PERSIST to user
processes. Upon register or delete of events with this flag, ensure the
user is perfmon_capable to prevent random user processes with access to
tracefs from creating events that persist after exit.

Link: https://lkml.kernel.org/r/20230912180704.1284-2-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Stable-dep-of: bd125a0840 ("tracing/user_events: Fix non-spaced field matching")
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-06-12 11:12:11 +02:00
..
asm-generic Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
drm drm/nouveau: exec: fix ioctl kernel-doc warning 2023-10-12 19:49:56 +02:00
linux tracing/user_events: Allow events to persist for perfmon_capable users 2024-06-12 11:12:11 +02:00
misc habanalabs/uapi: move uapi file to drm 2023-01-26 10:56:23 +02:00
mtd This pull request contains updates for UBI and UBIFS 2022-10-14 18:23:23 -07:00
rdma RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters 2024-06-12 11:12:10 +02:00
scsi scsi: mpi3mr: Avoid memcpy field-spanning write WARNING 2024-05-17 12:02:11 +02:00
sound ASoC: SOF: topology: Add a token for dropping widget name in kcontrol name 2023-08-15 13:25:56 +01:00
video License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
xen xen: irqfd: Use _IOW instead of the internal _IOC() macro 2023-11-20 11:59:12 +01:00
Kbuild kbuild: re-implement Makefile.headersinst without recursion 2019-06-15 19:57:02 +09:00