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>
Subject: [for-linus][PATCH 0/5] tracing: Some more fixes for 6.5
Date: Wed, 12 Jul 2023 17:50:44 -0400 [thread overview]
Message-ID: <20230712215044.496021196@goodmis.org> (raw)
Tracing fixes for 6.5:
- Update to fix of prototypes (my merge of Arnd's patch caused another
warning).
- Add selftest to struct sizes for user events
- Quiet false positive of FORTIFY_SOURCE
Due to backward compatibilty, the structure used to save stack traces
in the kernel had a fixed size of 8. This structure is exported to
user space via the tracing format file. A change was made to allow
more than 8 functions to be recorded, and user space now uses the
size field to know how many functions are actually in the stack.
But the structure still has size of 8 (even though it points into
the ring buffer that has the required amount allocated to hold a
full stack. This was fine until the fortifier noticed that the
memcpy(&entry->caller, stack, size) was greater than the 8 functions
and would complain at runtime about it. Hide this by using a pointer
to the stack location on the ring buffer instead of using the address
of the entry structure caller field.
- Fix a deadloop in reading trace_pipe that was caused by a mismatch
between ring_buffer_empty() returning false which then asked to
read the data, but the read code uses rb_num_of_entries() that
returned zero, and causing a infinite "retry".
- Fix a warning caused by not using all pages allocated to store
ftrace functions, where this can happen if the linker inserts a bunch of
"NULL" entries, causing the accounting of how many pages needed
to be off.
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/urgent
Head SHA1: bec3c25c247c4f88a33d79675a09e1644c9a3114
Arnd Bergmann (1):
tracing: arm64: Avoid missing-prototype warnings
Beau Belgrave (1):
selftests/user_events: Test struct size match cases
Steven Rostedt (Google) (1):
tracing: Stop FORTIFY_SOURCE complaining about stack trace caller
Zheng Yejian (2):
ring-buffer: Fix deadloop issue on reading trace_pipe
ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
----
arch/arm64/include/asm/ftrace.h | 4 +++
arch/arm64/include/asm/syscall.h | 3 ++
arch/arm64/kernel/syscall.c | 3 --
include/linux/ftrace.h | 9 ++++++
kernel/trace/fgraph.c | 1 +
kernel/trace/ftrace.c | 45 ++++++++++++++++++--------
kernel/trace/ftrace_internal.h | 5 +--
kernel/trace/ring_buffer.c | 24 ++++++++------
kernel/trace/trace.c | 21 ++++++++++--
kernel/trace/trace_kprobe_selftest.c | 3 ++
tools/testing/selftests/user_events/dyn_test.c | 12 +++++++
11 files changed, 100 insertions(+), 30 deletions(-)
next reply other threads:[~2023-07-12 22:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 21:50 Steven Rostedt [this message]
2023-07-12 21:50 ` [for-linus][PATCH 1/5] selftests/user_events: Test struct size match cases Steven Rostedt
2023-07-12 21:50 ` [for-linus][PATCH 2/5] tracing: arm64: Avoid missing-prototype warnings Steven Rostedt
2023-07-12 21:50 ` [for-linus][PATCH 3/5] ring-buffer: Fix deadloop issue on reading trace_pipe Steven Rostedt
2023-07-12 21:50 ` [for-linus][PATCH 4/5] ftrace: Fix possible warning on checking all pages used in ftrace_process_locs() Steven Rostedt
2023-07-12 21:50 ` [for-linus][PATCH 5/5] tracing: Stop FORTIFY_SOURCE complaining about stack trace caller 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=20230712215044.496021196@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.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.