From: Jeff Barnes <jeffbarnes@linux.microsoft.com>
To: linux-trace-kernel@vger.kernel.org
Cc: mhiramat@kernel.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com
Subject: [PATCH v2 0/2] tracing/user_events: Share tracing state between existing threads
Date: Mon, 5 Oct 2026 10:39:42 -0400 [thread overview]
Message-ID: <20261005143944.752112-1-jeffbarnes@linux.microsoft.com> (raw)
In-Reply-To: <20261002153934.798176-1-jeffbarnes@linux.microsoft.com>
Hi,
This series fixes user_events registration from threads that already share
an address space before the first user_events registration.
The first patch adds regression coverage. The second ensures that
pre-existing threads sharing the same mm_struct also share the same
user_event_mm instead of independently creating wrappers with separate
enabler lists.
With the fix, a second registration using the same enable address and bit
is correctly rejected with EADDRINUSE.
The series was rebased onto Linux 7.3-rc6. The complete user_events ABI
selftest suite passes under virtme-ng:
PASSED: 7 / 7 tests passed.
Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0
Changes in v2:
- Remove the unreachable second-registration cleanup assertion reported by
Sashiko. ASSERT_EQ(-1, registration.second_ret) aborts on mismatch, so
the subsequent if (!registration.second_ret) condition could never
execute.
- Remove the now-unused second_unreg_ret field while retaining cleanup
when the second registration unexpectedly succeeds.
- Remove the redundant first-registration cleanup guard.
- Use the natural alignment of the __u32 enable word and correct
continuation indentation.
- Rebase onto Linux 7.3-rc6.
Both patches pass scripts/checkpatch.pl --strict with 0 errors,
0 warnings, and 0 checks.
Jeff
Jeff Barnes (2):
selftests/user_events: Test registration from existing threads
tracing/user_events: Share tracing state between existing threads
kernel/trace/trace_events_user.c | 78 +++++++++--
.../testing/selftests/user_events/abi_test.c | 125 ++++++++++++++++++
2 files changed, 189 insertions(+), 14 deletions(-)
--
2.43.0
next prev parent reply other threads:[~2026-10-05 14:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 15:39 [PATCH 0/2] tracing/user_events: Share state between existing threads Jeff Barnes
2026-10-02 15:39 ` [PATCH 1/2] selftests/user_events: Test registration from " Jeff Barnes
2026-10-03 1:33 ` sashiko-bot
2026-10-02 15:39 ` [PATCH 2/2] tracing/user_events: Share tracing state between " Jeff Barnes
2026-10-05 14:39 ` Jeff Barnes [this message]
2026-10-05 14:39 ` [PATCH v2 1/2] selftests/user_events: Test registration from " Jeff Barnes
2026-10-05 14:39 ` [PATCH v2 2/2] tracing/user_events: Share tracing state between " Jeff Barnes
2026-10-06 16:47 ` [PATCH v2 0/3] tracing/user_events: Share state with " Jeff Barnes
2026-10-06 16:47 ` [PATCH v2 1/3] tracing/user_events: Serialize duplicate enabler lookup with event removal Jeff Barnes
2026-10-06 16:47 ` [PATCH v2 2/3] tracing/user_events: Share event state with existing threads Jeff Barnes
2026-10-06 16:47 ` [PATCH v2 3/3] selftests/user_events: Test registration from " Jeff Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261005143944.752112-1-jeffbarnes@linux.microsoft.com \
--to=jeffbarnes@linux.microsoft.com \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.