From: Jeremy Linton <jeremy.linton@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, rostedt@goodmis.org,
mingo@redhat.com, rusty@rustcorp.com.au, jeyu@redhat.com,
kirill.shutemov@linux.intel.com, christoffer.dall@linaro.org,
marc.zyngier@arm.com, jcm@jonmasters.org
Subject: [PATCH 00/12] trace: add the ability to parse sizeof()
Date: Wed, 31 May 2017 16:56:41 -0500 [thread overview]
Message-ID: <20170531215653.3240-1-jeremy.linton@arm.com> (raw)
There are a few cases of sizeof() embedded in TRACE_EVENT()
macros. That is a problem because the sizeof(structure) gets
passed to userspace which doesn't know how to decode the
size of kernel data structures. This is a similar problem
to enums which were being passed in their symbolic form to
userspace.
Rather than recreating much of that infrastructure lets
simply extend it, and append additional symbols into the
enum_map that can translate string sizeof() calls into
values. Of course that means that much of the infrastructure
is now poorly named so we go through and replace instances
describing "enum" with "eval" to indicate a generic C
expression to numerical evaluation routine.
Jeremy Linton (12):
trace: rename kernel enum section to eval
trace: rename trace_enum_map to trace_eval_map
trace: rename struct module entry for trace enums
trace: rename trace enum data structures in trace.c
trace: rename trace_enum_mutex to trace_eval_mutex
trace: rename trace.c enum functions
trace: rename enum_map functions
tracing: Rename enum_replace to eval_replace
tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their
values
tracing: Update sample file to describe the new macro
tracing: Add TRACE_DEFINE_SIZEOF() macros
tracing: Rename update the enum_map file
arch/arm64/kvm/trace.h | 2 +
include/asm-generic/vmlinux.lds.h | 6 +-
include/linux/module.h | 4 +-
include/linux/tracepoint.h | 7 +-
include/trace/events/xen.h | 13 +-
include/trace/trace_events.h | 26 +++-
kernel/module.c | 6 +-
kernel/trace/Kconfig | 22 ++--
kernel/trace/trace.c | 194 ++++++++++++++---------------
kernel/trace/trace.h | 4 +-
kernel/trace/trace_events.c | 24 ++--
samples/trace_events/trace-events-sample.h | 7 ++
12 files changed, 175 insertions(+), 140 deletions(-)
--
2.9.4
next reply other threads:[~2017-05-31 21:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 21:56 Jeremy Linton [this message]
2017-05-31 21:56 ` [PATCH 01/12] trace: rename kernel enum section to eval Jeremy Linton
2017-05-31 21:56 ` [PATCH 02/12] trace: rename trace_enum_map to trace_eval_map Jeremy Linton
2017-05-31 21:56 ` [PATCH 03/12] trace: rename struct module entry for trace enums Jeremy Linton
2017-05-31 21:56 ` [PATCH 04/12] trace: rename trace enum data structures in trace.c Jeremy Linton
2017-05-31 21:56 ` [PATCH 05/12] trace: rename trace_enum_mutex to trace_eval_mutex Jeremy Linton
2017-05-31 21:56 ` [PATCH 06/12] trace: rename trace.c enum functions Jeremy Linton
2017-05-31 21:56 ` [PATCH 07/12] trace: rename enum_map functions Jeremy Linton
2017-05-31 21:56 ` [PATCH 08/12] tracing: Rename enum_replace to eval_replace Jeremy Linton
2017-05-31 21:56 ` [PATCH 09/12] tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values Jeremy Linton
2017-05-31 21:56 ` [PATCH 10/12] tracing: Update sample file to describe the new macro Jeremy Linton
2017-06-13 21:07 ` Steven Rostedt
2017-05-31 21:56 ` [PATCH 11/12] tracing: Add TRACE_DEFINE_SIZEOF() macros Jeremy Linton
2017-05-31 21:56 ` [PATCH 12/12] tracing: Rename update the enum_map file Jeremy Linton
2017-06-13 21:12 ` Steven Rostedt
2017-06-13 21:21 ` Jeremy Linton
2017-06-14 17:06 ` Steven Rostedt
2017-06-14 18:43 ` Jeremy Linton
2017-06-01 1:11 ` [PATCH 00/12] trace: add the ability to parse sizeof() 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=20170531215653.3240-1-jeremy.linton@arm.com \
--to=jeremy.linton@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=jcm@jonmasters.org \
--cc=jeyu@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
/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®