From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Daniel Bristot de Oliveira <bristot@kernel.org>,
John Keeping <john@metanate.com>,
Tze-nan Wu <Tze-nan.Wu@mediatek.com>,
Zheng Yejian <zhengyejian1@huawei.com>
Subject: [for-linus][PATCH 0/6] tracing: Fixes for 6.3
Date: Mon, 03 Apr 2023 17:21:25 -0400 [thread overview]
Message-ID: <20230403212125.244064799@goodmis.org> (raw)
Tracing fixes for 6.3:
- Fix timerlat notification, as it was not triggering the
notify to users when a new max latency was hit.
- Do not trigger max latency if the tracing is off.
When tracing is off, the ring buffer is not updated, it
does not make sense to notify when there's a new max latency
detected by the tracer, as why that latency happened is not available.
The tracing logic still runs when the ring buffer is disabled, but
it should not be triggering notifications.
- Fix race on freeing the synthetic event "last_cmd" variable by
adding a mutex around it.
- Fix race between reader and writer of the ring buffer by adding
memory barriers. When the writer is still on the reader page
it must have its content visible on the buffer before it moves
the commit index that the reader uses to know how much content is
on the page.
- Make get_lock_parent_ip() always inlined, as it uses _THIS_IP_
and _RET_IP_, which gets broken if it is not inlined.
- Make __field(int, arr[5]) in a TRACE_EVENT() macro fail to build.
The field formats of trace events are calculated by using sizeof(type)
and other means by what is passed into the structure macros like
__field(). The __field() macro is only meant for atom types like
int, long, short, pointer, etc. It is not meant for arrays. But
the code will currently compile with arrays, but then the format
produced will be inaccurate, and user space parsing tools will break.
Two bugs have already been fixed, now add code that will make the
kernel fail to build if another trace event includes this buggy
field format.
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/urgent
Head SHA1: f82e7ca019dfad3b006fd3b772f7ac569672db55
Daniel Bristot de Oliveira (2):
tracing/timerlat: Notify new max thread latency
tracing/osnoise: Fix notify new tracing_max_latency
John Keeping (1):
ftrace: Mark get_lock_parent_ip() __always_inline
Steven Rostedt (Google) (1):
tracing: Error if a trace event has an array for a __field()
Tze-nan Wu (1):
tracing/synthetic: Fix races on freeing last_cmd
Zheng Yejian (1):
ring-buffer: Fix race while reader and writer are on the same page
----
include/linux/ftrace.h | 2 +-
include/trace/stages/stage5_get_offsets.h | 21 +++++++++++++++++----
kernel/trace/ring_buffer.c | 13 ++++++++++++-
kernel/trace/trace_events_synth.c | 19 +++++++++++++++----
kernel/trace/trace_osnoise.c | 4 +++-
5 files changed, 48 insertions(+), 11 deletions(-)
next reply other threads:[~2023-04-03 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 21:21 Steven Rostedt [this message]
2023-04-03 21:21 ` [for-linus][PATCH 1/6] tracing/synthetic: Fix races on freeing last_cmd Steven Rostedt
2023-04-03 21:21 ` [for-linus][PATCH 2/6] ring-buffer: Fix race while reader and writer are on the same page Steven Rostedt
2023-04-03 21:21 ` [for-linus][PATCH 3/6] ftrace: Mark get_lock_parent_ip() __always_inline Steven Rostedt
2023-04-03 21:21 ` [for-linus][PATCH 4/6] tracing/timerlat: Notify new max thread latency Steven Rostedt
2023-04-03 21:21 ` [for-linus][PATCH 5/6] tracing/osnoise: Fix notify new tracing_max_latency Steven Rostedt
2023-04-03 21:21 ` [for-linus][PATCH 6/6] tracing: Error if a trace event has an array for a __field() Steven Rostedt
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=20230403212125.244064799@goodmis.org \
--to=rostedt@goodmis.org \
--cc=Tze-nan.Wu@mediatek.com \
--cc=akpm@linux-foundation.org \
--cc=bristot@kernel.org \
--cc=john@metanate.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=zhengyejian1@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®