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.
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
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
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
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
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.
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
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
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 ++-
..
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
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
&
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
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 ++
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
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
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
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
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
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
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
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
() 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
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,
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
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
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
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_
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
> > >
> > >
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
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
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
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/
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
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
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
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
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 =
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
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
> 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
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
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
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
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
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
() 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
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
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
63 matches
Mail list logo