Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654746

Re: [PATCH 00/12] trace: add the ability to parse sizeof()

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH 00/12] trace: add the ability to parse sizeof()
Date 2017-06-01 03:20 +0200
Message-ID <tNmWl-4gd-3@gated-at.bofh.it> (permalink)
References <tNjON-28K-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Jeremy,

I'm currently at the Open Source Summit in Tokyo. It may be a while
before I get to look more at this. If I get time during my travels,
I may get to it sooner, otherwise it may be a week or so.

-- Steve

On Wed, 31 May 2017 16:56:41 -0500
Jeremy Linton <jeremy.linton@arm.com> wrote:

> 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(-)
> 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 00/12] trace: add the ability to parse sizeof() Jeremy Linton <jeremy.linton@arm.com> - 2017-06-01 00:00 +0200
  [PATCH 07/12] trace: rename enum_map functions Jeremy Linton <jeremy.linton@arm.com> - 2017-06-01 00:00 +0200
  [PATCH 09/12] tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values Jeremy Linton <jeremy.linton@arm.com> - 2017-06-01 00:00 +0200
  [PATCH 06/12] trace: rename trace.c enum functions Jeremy Linton <jeremy.linton@arm.com> - 2017-06-01 00:00 +0200
  [PATCH 03/12] trace: rename struct module entry for trace enums Jeremy Linton <jeremy.linton@arm.com> - 2017-06-01 00:00 +0200
  [PATCH 11/12] tracing: Add TRACE_DEFINE_SIZEOF() macros Jeremy Linton <jeremy.linton@arm.com> - 2017-06-01 00:00 +0200
  Re: [PATCH 00/12] trace: add the ability to parse sizeof() Steven Rostedt <rostedt@goodmis.org> - 2017-06-01 03:20 +0200

csiph-web