Re: [PATCH v2 1/2] tracing/user_events: Fix non-spaced field matching

2024-05-02 Thread Beau Belgrave
On Thu, May 02, 2024 at 05:16:34PM -0400, Steven Rostedt wrote: > On Tue, 23 Apr 2024 16:23:37 + > Beau Belgrave wrote: > > > When the ABI was updated to prevent same name w/different args, it > > missed an important corner case when fields don't end with a space.

[PATCH v2 1/2] tracing/user_events: Fix non-spaced field matching

2024-04-23 Thread Beau Belgrave
properly for matching. With this fix, the following are all treated as matching: u8 field1;u8 field2 u8 field1; u8 field2 u8 field1;\tu8 field2 u8 field1;\nu8 field2 Fixes: ba470eebc2f6 ("tracing/user_events: Prevent same name but different args event") Signed-off-by: Beau Belgrave --- ker

[PATCH v2 2/2] selftests/user_events: Add non-spacing separator check

2024-04-23 Thread Beau Belgrave
case to ensure it works going forward. Signed-off-by: Beau Belgrave --- tools/testing/selftests/user_events/ftrace_test.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/user_events/ftrace_test.c b/tools/testing/selftests/user_events/ftrace_test.c index

[PATCH v2 0/2] tracing/user_events: Fix non-spaced field matching

2024-04-23 Thread Beau Belgrave
matching: u8 field1;u8 field2 u8 field1; u8 field2 u8 field1;\tu8 field2 u8 field1;\nu8 field2 V2 changes: Renamed fix_semis_no_space() to insert_space_after_semis(). Have user_event_argv_split() return fast in no-split case. Pulled in Masami's shorter loop in insert_space_after_semis(). Be

Re: [PATCH 1/2] tracing/user_events: Fix non-spaced field matching

2024-04-22 Thread Beau Belgrave
On Sat, Apr 20, 2024 at 09:50:52PM +0900, Masami Hiramatsu wrote: > On Fri, 19 Apr 2024 14:13:34 -0700 > Beau Belgrave wrote: > > > On Fri, Apr 19, 2024 at 11:33:05AM +0900, Masami Hiramatsu wrote: > > > On Tue, 16 Apr 2024 22:41:01 + > > > Beau Belgrave wro

Re: [PATCH 1/2] tracing/user_events: Fix non-spaced field matching

2024-04-19 Thread Beau Belgrave
On Fri, Apr 19, 2024 at 11:33:05AM +0900, Masami Hiramatsu wrote: > On Tue, 16 Apr 2024 22:41:01 + > Beau Belgrave wrote: > > > When the ABI was updated to prevent same name w/different args, it > > missed an important corner case when fields don't end with a space.

[PATCH 2/2] selftests/user_events: Add non-spacing separator check

2024-04-16 Thread Beau Belgrave
case to ensure it works going forward. Signed-off-by: Beau Belgrave --- tools/testing/selftests/user_events/ftrace_test.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/user_events/ftrace_test.c b/tools/testing/selftests/user_events/ftrace_test.c index

[PATCH 1/2] tracing/user_events: Fix non-spaced field matching

2024-04-16 Thread Beau Belgrave
properly for matching. With this fix, the following are all treated as matching: u8 field1;u8 field2 u8 field1; u8 field2 u8 field1;\tu8 field2 u8 field1;\nu8 field2 Fixes: ba470eebc2f6 ("tracing/user_events: Prevent same name but different args event") Signed-off-by: Beau Belgrave --- ker

[PATCH 0/2] tracing/user_events: Fix non-spaced field matching

2024-04-16 Thread Beau Belgrave
matching: u8 field1;u8 field2 u8 field1; u8 field2 u8 field1;\tu8 field2 u8 field1;\nu8 field2 Beau Belgrave (2): tracing/user_events: Fix non-spaced field matching selftests/user_events: Add non-spacing separator check kernel/trace/trace_events_user.c | 88 ++- ..

Re: [RFC PATCH 0/4] perf: Correlating user process data to samples

2024-04-12 Thread Beau Belgrave
On Fri, Apr 12, 2024 at 09:12:45AM +0200, Peter Zijlstra wrote: > > On Fri, Apr 12, 2024 at 12:17:28AM +, Beau Belgrave wrote: > > > An idea flow would look like this: > > User Task Profile > > do_work(); sample() -> IP + No activit

Re: [RFC PATCH 0/4] perf: Correlating user process data to samples

2024-04-12 Thread Beau Belgrave
On Thu, Apr 11, 2024 at 09:52:22PM -0700, Ian Rogers wrote: > On Thu, Apr 11, 2024 at 5:17 PM Beau Belgrave > wrote: > > > > In the Open Telemetry profiling SIG [1], we are trying to find a way to > > grab a tracing association quickly on a per-sample basis. The team at &

[RFC PATCH 2/4] perf: Introduce PERF_SAMPLE_TLS_USER sample type

2024-04-11 Thread Beau Belgrave
that arch_perf_user_tls_pointer() utilizes to set TLS details of the address and size (for 32bit on 64bit compat cases). Link: https://opentelemetry.io/blog/2024/profiling/ Link: https://www.elastic.co/blog/continuous-profiling-distributed-tracing-correlation Signed-off-by: Beau Belgrave --- arch/Kconfig

[RFC PATCH 0/4] perf: Correlating user process data to samples

2024-04-11 Thread Beau Belgrave
win32/api/evntprov/nf-evntprov-eventactivityidcontrol Beau Belgrave (4): perf/core: Introduce perf_prepare_dump_data() perf: Introduce PERF_SAMPLE_TLS_USER sample type perf/core: Factor perf_output_sample_udump() perf/x86/core: Add tls dump support arch/Kconfig | 7 ++

[RFC PATCH 4/4] perf/x86/core: Add tls dump support

2024-04-11 Thread Beau Belgrave
and gsbase for 32-bit with appropriate size. Signed-off-by: Beau Belgrave --- arch/x86/Kconfig | 1 + arch/x86/events/core.c| 14 ++ arch/x86/include/asm/perf_event.h | 5 + 3 files changed, 20 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig

[RFC PATCH 3/4] perf/core: Factor perf_output_sample_udump()

2024-04-11 Thread Beau Belgrave
and tls sample dumps. The sp register is now fetched outside of this method and passed to it. This allows both stack and tls to utilize the same code. Signed-off-by: Beau Belgrave --- kernel/events/core.c | 68 +--- 1 file changed, 19 insertions(+), 49

[RFC PATCH 1/4] perf/core: Introduce perf_prepare_dump_data()

2024-04-11 Thread Beau Belgrave
preparing dump data. Signed-off-by: Beau Belgrave --- kernel/events/core.c | 79 ++-- 1 file changed, 47 insertions(+), 32 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 724e6d7e128f..07de5cc2aa25 100644 --- a/kernel/events/core.c

Re: Copying TLS/user register data per perf-sample?

2024-04-11 Thread Beau Belgrave
On Fri, Apr 12, 2024 at 12:55:19AM +0900, Masami Hiramatsu wrote: > On Wed, 10 Apr 2024 08:35:42 -0700 > Beau Belgrave wrote: > > > On Wed, Apr 10, 2024 at 10:06:28PM +0900, Masami Hiramatsu wrote: > > > On Thu, 4 Apr 2024 12:26:41 -0700 > > > Beau Belg

Re: Copying TLS/user register data per perf-sample?

2024-04-10 Thread Beau Belgrave
On Tue, Apr 09, 2024 at 04:32:46PM -0700, Namhyung Kim wrote: > Hello, > > On Thu, Apr 4, 2024 at 12:26 PM Beau Belgrave > wrote: > > > > Hello, > > > > I'm looking into the possibility of capturing user data that is pointed > > to by a user regis

Re: Copying TLS/user register data per perf-sample?

2024-04-10 Thread Beau Belgrave
On Wed, Apr 10, 2024 at 10:06:28PM +0900, Masami Hiramatsu wrote: > On Thu, 4 Apr 2024 12:26:41 -0700 > Beau Belgrave wrote: > > > Hello, > > > > I'm looking into the possibility of capturing user data that is pointed > > to by a user register (IE: fs/gs for T

Copying TLS/user register data per perf-sample?

2024-04-04 Thread Beau Belgrave
Hello, I'm looking into the possibility of capturing user data that is pointed to by a user register (IE: fs/gs for TLS on x86/64) for each sample via perf_events. I was hoping to find a way to do this similar to PERF_SAMPLE_STACK_USER. I think it could even use roughly the same ABI in the perf

[PATCH v4 4/4] tracing/user_events: Document multi-format flag

2024-02-21 Thread Beau Belgrave
deletion works in these cases and how to use /sys/kernel/tracing/dynamic_events for per-version deletion. Signed-off-by: Beau Belgrave --- Documentation/trace/user_events.rst | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/trace

[PATCH v4 1/4] tracing/user_events: Prepare find/delete for same name events

2024-02-21 Thread Beau Belgrave
() scenarios now that find_user_event() uses it directly. This makes the logic consistent accross several callsites. Signed-off-by: Beau Belgrave --- kernel/trace/trace_events_user.c | 107 +-- 1 file changed, 59 insertions(+), 48 deletions(-) diff --git a/kernel/trace

[PATCH v4 2/4] tracing/user_events: Introduce multi-format events

2024-02-21 Thread Beau Belgrave
leted. If per-version deletion is required, user programs should either not use persistent events or delete them via dynamic_events. Signed-off-by: Beau Belgrave --- include/uapi/linux/user_events.h | 6 +- kernel/trace/trace_events_user.c | 102 +++ 2 files changed,

[PATCH v4 3/4] selftests/user_events: Test multi-format events

2024-02-21 Thread Beau Belgrave
other and that name and arg matching still works if yet another register comes in with the same format as one of the two. Signed-off-by: Beau Belgrave --- .../testing/selftests/user_events/abi_test.c | 134 ++ 1 file changed, 134 insertions(+) diff --git a/tools/testing/selftests

[PATCH v4 0/4] tracing/user_events: Introduce multi-format events

2024-02-21 Thread Beau Belgrave
d conflict with system name formats. []'s are also special characters for bash. Updated self-test and docs to reflect the new suffix format. Updated docs to include a regex example to help guide recording programs find the correct event in ambiguous cases. Beau Belgrave (4): tracing/use

Re: [PATCH v3 1/4] tracing/user_events: Prepare find/delete for same name events

2024-02-21 Thread Beau Belgrave
On Wed, Feb 21, 2024 at 10:17:21AM -0500, Steven Rostedt wrote: > On Wed, 14 Feb 2024 17:50:43 + > Beau Belgrave wrote: > > So the patches look good, but since I gave you some updates, I'm now going > to go though "nits". Like grammar and such ;-) > Sure

Re: [PATCH v3 2/4] tracing/user_events: Introduce multi-format events

2024-02-21 Thread Beau Belgrave
On Wed, Feb 21, 2024 at 10:08:33AM -0500, Steven Rostedt wrote: > On Wed, 14 Feb 2024 17:50:44 + > Beau Belgrave wrote: > > > +static char *user_event_group_system_multi_name(void) > > +{ > > + char *system_name; > > + int len = sizeof(USER_EVENTS_MULTI_

Re: [PATCH v3 2/4] tracing/user_events: Introduce multi-format events

2024-02-21 Thread Beau Belgrave
On Wed, Feb 21, 2024 at 10:21:04AM -0500, Steven Rostedt wrote: > On Wed, 14 Feb 2024 17:50:44 + > Beau Belgrave wrote: > > > Currently user_events supports 1 event with the same name and must have > > the exact same format when referenced by multiple programs. This ope

[PATCH v3 4/4] tracing/user_events: Document multi-format flag

2024-02-14 Thread Beau Belgrave
deletion works in these cases and how to use /sys/kernel/tracing/dynamic_events for per-version deletion. Signed-off-by: Beau Belgrave --- Documentation/trace/user_events.rst | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/trace

[PATCH v3 1/4] tracing/user_events: Prepare find/delete for same name events

2024-02-14 Thread Beau Belgrave
that find_user_event() uses it directly. Signed-off-by: Beau Belgrave --- kernel/trace/trace_events_user.c | 107 +-- 1 file changed, 59 insertions(+), 48 deletions(-) diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c index 9365ce407426

[PATCH v3 2/4] tracing/user_events: Introduce multi-format events

2024-02-14 Thread Beau Belgrave
ttempted to be deleted. If per-version deletion is required, user programs should either not use persistent events or delete them via dynamic_events. Signed-off-by: Beau Belgrave --- include/uapi/linux/user_events.h | 6 +- kernel/trace/trace_events_user.c | 118 +++ 2

[PATCH v3 3/4] selftests/user_events: Test multi-format events

2024-02-14 Thread Beau Belgrave
other and that name and arg matching still works if yet another register comes in with the same format as one of the two. Signed-off-by: Beau Belgrave --- .../testing/selftests/user_events/abi_test.c | 134 ++ 1 file changed, 134 insertions(+) diff --git a/tools/testing/selftests

[PATCH v3 0/4] tracing/user_events: Introduce multi-format events

2024-02-14 Thread Beau Belgrave
guide recording programs find the correct event in ambiguous cases. Beau Belgrave (4): tracing/user_events: Prepare find/delete for same name events tracing/user_events: Introduce multi-format events selftests/user_events: Test multi-format events tracing/user_events: Document multi

[PATCH v2 3/4] selftests/user_events: Test multi-format events

2024-02-02 Thread Beau Belgrave
other and that name and arg matching still works if yet another register comes in with the same format as one of the two. Signed-off-by: Beau Belgrave --- .../testing/selftests/user_events/abi_test.c | 134 ++ 1 file changed, 134 insertions(+) diff --git a/tools/testing/selftests

[PATCH v2 2/4] tracing/user_events: Introduce multi-format events

2024-02-02 Thread Beau Belgrave
ttempted to be deleted. If per-version deletion is required, user programs should either not use persistent events or delete them via dynamic_events. Signed-off-by: Beau Belgrave --- include/uapi/linux/user_events.h | 6 +- kernel/trace/trace_events_user.c | 118 +++ 2

[PATCH v2 1/4] tracing/user_events: Prepare find/delete for same name events

2024-02-02 Thread Beau Belgrave
that find_user_event() uses it directly. Signed-off-by: Beau Belgrave --- kernel/trace/trace_events_user.c | 106 +-- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c index 9365ce407426

[PATCH v2 4/4] tracing/user_events: Document multi-format flag

2024-02-02 Thread Beau Belgrave
deletion works in these cases and how to use /sys/kernel/tracing/dynamic_events for per-version deletion. Signed-off-by: Beau Belgrave --- Documentation/trace/user_events.rst | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Documentation/trace

[PATCH v2 0/4] tracing/user_events: Introduce multi-format events

2024-02-02 Thread Beau Belgrave
rmats. []'s are also special characters for bash. Updated self-test and docs to reflect the new suffix format. Updated docs to include a regex example to help guide recording programs find the correct event in ambiguous cases. Beau Belgrave (4): tracing/user_events: Prepare find/delete for

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-30 Thread Beau Belgrave
On Tue, Jan 30, 2024 at 01:52:30PM -0500, Steven Rostedt wrote: > On Tue, 30 Jan 2024 10:05:15 -0800 > Beau Belgrave wrote: > > > On Mon, Jan 29, 2024 at 09:24:07PM -0500, Steven Rostedt wrote: > > > On Mon, 29 Jan 2024 09:29:07 -0800 > > > Beau Belgrave wro

Re: [PATCH 0/4] tracing/user_events: Introduce multi-format events

2024-01-30 Thread Beau Belgrave
On Tue, Jan 30, 2024 at 11:09:33AM +0900, Masami Hiramatsu wrote: > Hi Beau, > > On Tue, 23 Jan 2024 22:08:40 +0000 > Beau Belgrave wrote: > > > Currently user_events supports 1 event with the same name and must have > > the exact same format when referenced by mu

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-30 Thread Beau Belgrave
On Tue, Jan 30, 2024 at 11:12:22PM +0900, Masami Hiramatsu wrote: > On Mon, 29 Jan 2024 09:29:07 -0800 > Beau Belgrave wrote: > > > On Fri, Jan 26, 2024 at 03:04:45PM -0500, Steven Rostedt wrote: > > > On Fri, 26 Jan 2024 11:10:07 -0800 > > > Beau Belgrav

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-30 Thread Beau Belgrave
On Mon, Jan 29, 2024 at 09:24:07PM -0500, Steven Rostedt wrote: > On Mon, 29 Jan 2024 09:29:07 -0800 > Beau Belgrave wrote: > > > Thanks, yeah ideally we wouldn't use special characters. > > > > I'm not picky about this. However, I did want something that clearly

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-29 Thread Beau Belgrave
On Fri, Jan 26, 2024 at 03:04:45PM -0500, Steven Rostedt wrote: > On Fri, 26 Jan 2024 11:10:07 -0800 > Beau Belgrave wrote: > > > > OK, so the each different event has suffixed name. But this will > > > introduce non C-variable name. > > > > > >

Re: [PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-26 Thread Beau Belgrave
On Sat, Jan 27, 2024 at 12:01:04AM +0900, Masami Hiramatsu wrote: > On Tue, 23 Jan 2024 22:08:42 + > Beau Belgrave wrote: > > > Add a register_name (reg_name) to the user_event struct which allows for > > split naming of events. We now have the name that was used t

Re: [PATCH 0/4] tracing/user_events: Introduce multi-format events

2024-01-25 Thread Beau Belgrave
It appears to put an outdated coversheet onto this series. Below is the updated coversheet that reflects changes made: Currently user_events supports 1 event with the same name and must have the exact same format when referenced by multiple programs. This opens an opportunity for malicous or

Re: [PATCH 1/4] tracing/user_events: Prepare find/delete for same name events

2024-01-25 Thread Beau Belgrave
On Thu, Jan 25, 2024 at 09:59:03AM +0900, Masami Hiramatsu wrote: > On Tue, 23 Jan 2024 22:08:41 + > Beau Belgrave wrote: > > > The current code for finding and deleting events assumes that there will > > never be cases when user_events are registered with the same na

[PATCH 2/4] tracing/user_events: Introduce multi-format events

2024-01-23 Thread Beau Belgrave
delete them via dynamic_events. Signed-off-by: Beau Belgrave --- include/uapi/linux/user_events.h | 6 +- kernel/trace/trace_events_user.c | 118 +++ 2 files changed, 111 insertions(+), 13 deletions(-) diff --git a/include/uapi/linux/user_events.h b/include/

[PATCH 3/4] selftests/user_events: Test multi-format events

2024-01-23 Thread Beau Belgrave
other and that name and arg matching still works if yet another register comes in with the same format as one of the two. Signed-off-by: Beau Belgrave --- .../testing/selftests/user_events/abi_test.c | 134 ++ 1 file changed, 134 insertions(+) diff --git a/tools/testing/selftests

[PATCH 4/4] tracing/user_events: Document multi-format flag

2024-01-23 Thread Beau Belgrave
deletion works in these cases and how to use /sys/kernel/tracing/dynamic_events for per-version deletion. Signed-off-by: Beau Belgrave --- Documentation/trace/user_events.rst | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Documentation/trace

[PATCH 0/4] tracing/user_events: Introduce multi-format events

2024-01-23 Thread Beau Belgrave
ther not use persistent events or delete them via dynamic_events. Beau Belgrave (4): tracing/user_events: Prepare find/delete for same name events tracing/user_events: Introduce multi-format events selftests/user_events: Test multi-format events tracing/user_events: Document multi-for

[PATCH 1/4] tracing/user_events: Prepare find/delete for same name events

2024-01-23 Thread Beau Belgrave
that find_user_event() uses it directly. Signed-off-by: Beau Belgrave --- kernel/trace/trace_events_user.c | 106 +-- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c index 9365ce407426

Re: [PATCH] tracing user_events: Simplify user_event_parse_field() parsing

2024-01-08 Thread Beau Belgrave
On Mon, Jan 08, 2024 at 01:37:23PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of having a bunch of if statements with: > >len = str_has_prefix(field, "__data_loc unsigned "); >if (len) >goto skip_next; > >len =

[PATCH] eventfs: Fix events beyond NAME_MAX blocking tasks

2023-12-10 Thread Beau Belgrave
ace-kernel/20231208183601.ga46-be...@linux.microsoft.com/ Signed-off-by: Beau Belgrave --- Please note the fixes tag is the first add of simple_lookup logic, there have been other changes beyond that may be a better fit to targetting. fs/tracefs/event_inode.c | 4 1 file changed, 4 insertion

trace_event names with more than NAME_MAX chars

2023-12-08 Thread Beau Belgrave
While developing some unrelated features I happened to create a trace_event that was more than NAME_MAX (255) characters. When this happened the creation worked, but tracefs would hang any task that tried to list the directory of the trace_event or remove it. I followed the code down to the

Re: [PATCH] tracing: Have trace_event_file have ref counters

2023-10-31 Thread Beau Belgrave
> removed to prevent any more modifications to that event from happening, > even if there's still a reference to the event "file" descriptor. > > Link: > https://lore.kernel.org/linux-trace-kernel/2023103131.1e705...@gandalf.local.home/ > I ran this patch with your r

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-25 Thread Beau Belgrave
On Mon, Sep 25, 2023 at 09:53:16AM +0200, Clément Léger wrote: > > > On 22/09/2023 21:22, Beau Belgrave wrote: > > On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: > >> > >> > >> On 14/09/2023 19:29, Steven Rostedt wrote: > >&g

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-22 Thread Beau Belgrave
On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: > > > On 14/09/2023 19:29, Steven Rostedt wrote: > > On Thu, 14 Sep 2023 13:17:00 -0400 > > Steven Rostedt wrote: > > > >> Now lets look at big endian layout: > >> > >> uaddr = 0xbeef0004 > >> enabler = 1; > >> > >> memory at

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-22 Thread Beau Belgrave
On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: > > > On 14/09/2023 19:29, Steven Rostedt wrote: > > On Thu, 14 Sep 2023 13:17:00 -0400 > > Steven Rostedt wrote: > > > >> Now lets look at big endian layout: > >> > >> uaddr = 0xbeef0004 > >> enabler = 1; > >> > >> memory at

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Beau Belgrave
On Thu, Sep 14, 2023 at 03:11:02PM +0200, Clément Léger wrote: > enabler->uaddr can be aligned on 32 or 64 bits. If aligned on 32 bits, > this will result in a misaligned access on 64 bits architectures since > set_bit()/clear_bit() are expecting an unsigned long (aligned) pointer. > On

[PATCH v2 1/3] tracing/user_events: Allow events to persist for perfmon_capable users

2023-09-12 Thread Beau Belgrave
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. Signed-off-by: Beau Belgrave --- include/uapi/linux/user_events.h | 11 +- kernel/trace

[PATCH v2 0/3] tracing/user_events: Allow events to persist for perfmon_capable users

2023-09-12 Thread Beau Belgrave
() function to check access given the register flags. Ensure access check is done for dynamic_events when implicitly removing events, such as "echo 'u:test' > /sys/kernel/tracing/dynamic_events". Beau Belgrave (3): tracing/user_events: Allow events to persist for perfmon_capable user

[PATCH v2 3/3] tracing/user_events: Document persist event flags

2023-09-12 Thread Beau Belgrave
user_events. Add a section under registering for the currently supported flags (USER_EVENT_REG_PERSIST) and the required permissions. Add a note under deleting that deleting a persistent event also requires sufficient permission. Signed-off-by: Beau Belgrave --- Documentation/trace/user_events.rst | 21

[PATCH v2 2/3] selftests/user_events: Test persist flag cases

2023-09-12 Thread Beau Belgrave
other flag is invalid. Signed-off-by: Beau Belgrave --- .../testing/selftests/user_events/abi_test.c | 55 ++- .../testing/selftests/user_events/dyn_test.c | 54 +- 2 files changed, 107 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/user_events