Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Andrey Ryabinin
On 04/17/2015 04:51 PM, Steven Rostedt wrote: > On Fri, 17 Apr 2015 09:29:02 -0400 > Steven Rostedt wrote: > >> On Fri, 17 Apr 2015 10:44:42 +0300 >> Andrey Ryabinin wrote: >> >> >>> And kasan is not needed to debug this further. >>> Just stick WARN_ON(ptr > call->print_fmt +

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Steven Rostedt
On Fri, 17 Apr 2015 09:29:02 -0400 Steven Rostedt wrote: > On Fri, 17 Apr 2015 10:44:42 +0300 > Andrey Ryabinin wrote: > > > > And kasan is not needed to debug this further. > > Just stick WARN_ON(ptr > call->print_fmt + strlen(call->print_fmt)) into > > the 'for' loop in

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Steven Rostedt
On Fri, 17 Apr 2015 10:44:42 +0300 Andrey Ryabinin wrote: > And kasan is not needed to debug this further. > Just stick WARN_ON(ptr > call->print_fmt + strlen(call->print_fmt)) into the > 'for' loop in update_event_printk(). Thanks, although I think I found the bug with just inspection. I

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Andrey Ryabinin
On 04/17/2015 06:59 AM, Sasha Levin wrote: > On 04/16/2015 11:21 PM, Steven Rostedt wrote: >> On Wed, 15 Apr 2015 20:58:31 -0400 >> Sasha Levin wrote: >> On 04/15/2015 10:05 AM, Steven Rostedt wrote: >> On Wed, 15 Apr 2015 09:22:37 -0400 >> Sasha Levin wrote: >> Hey

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Andrey Ryabinin
On 04/17/2015 06:59 AM, Sasha Levin wrote: On 04/16/2015 11:21 PM, Steven Rostedt wrote: On Wed, 15 Apr 2015 20:58:31 -0400 Sasha Levin sasha.le...@oracle.com wrote: On 04/15/2015 10:05 AM, Steven Rostedt wrote: On Wed, 15 Apr 2015 09:22:37 -0400 Sasha Levin sasha.le...@oracle.com wrote:

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Steven Rostedt
On Fri, 17 Apr 2015 10:44:42 +0300 Andrey Ryabinin a.ryabi...@samsung.com wrote: And kasan is not needed to debug this further. Just stick WARN_ON(ptr call-print_fmt + strlen(call-print_fmt)) into the 'for' loop in update_event_printk(). Thanks, although I think I found the bug with just

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Steven Rostedt
On Fri, 17 Apr 2015 09:29:02 -0400 Steven Rostedt rost...@goodmis.org wrote: On Fri, 17 Apr 2015 10:44:42 +0300 Andrey Ryabinin a.ryabi...@samsung.com wrote: And kasan is not needed to debug this further. Just stick WARN_ON(ptr call-print_fmt + strlen(call-print_fmt)) into the

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-17 Thread Andrey Ryabinin
On 04/17/2015 04:51 PM, Steven Rostedt wrote: On Fri, 17 Apr 2015 09:29:02 -0400 Steven Rostedt rost...@goodmis.org wrote: On Fri, 17 Apr 2015 10:44:42 +0300 Andrey Ryabinin a.ryabi...@samsung.com wrote: And kasan is not needed to debug this further. Just stick WARN_ON(ptr

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-16 Thread Sasha Levin
On 04/16/2015 11:21 PM, Steven Rostedt wrote: > On Wed, 15 Apr 2015 20:58:31 -0400 > Sasha Levin wrote: > >> > On 04/15/2015 10:05 AM, Steven Rostedt wrote: >>> > > On Wed, 15 Apr 2015 09:22:37 -0400 >>> > > Sasha Levin wrote: >>> > > > >> Hey Steven, > >> > >> I'm seeing the

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-16 Thread Steven Rostedt
On Wed, 15 Apr 2015 20:58:31 -0400 Sasha Levin wrote: > On 04/15/2015 10:05 AM, Steven Rostedt wrote: > > On Wed, 15 Apr 2015 09:22:37 -0400 > > Sasha Levin wrote: > > > >> Hey Steven, > >> > >> I'm seeing the following when booting: > >> > >> [ 10.678876] BUG: KASan: out of bounds access in

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-16 Thread Steven Rostedt
On Wed, 15 Apr 2015 20:58:31 -0400 Sasha Levin sasha.le...@oracle.com wrote: On 04/15/2015 10:05 AM, Steven Rostedt wrote: On Wed, 15 Apr 2015 09:22:37 -0400 Sasha Levin sasha.le...@oracle.com wrote: Hey Steven, I'm seeing the following when booting: [ 10.678876] BUG: KASan:

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-16 Thread Sasha Levin
On 04/16/2015 11:21 PM, Steven Rostedt wrote: On Wed, 15 Apr 2015 20:58:31 -0400 Sasha Levin sasha.le...@oracle.com wrote: On 04/15/2015 10:05 AM, Steven Rostedt wrote: On Wed, 15 Apr 2015 09:22:37 -0400 Sasha Levin sasha.le...@oracle.com wrote: Hey Steven, I'm seeing the

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-15 Thread Sasha Levin
On 04/15/2015 10:05 AM, Steven Rostedt wrote: > On Wed, 15 Apr 2015 09:22:37 -0400 > Sasha Levin wrote: > >> Hey Steven, >> >> I'm seeing the following when booting: >> >> [ 10.678876] BUG: KASan: out of bounds access in >> trace_event_enum_update+0xb1d/0xb70 at addr a6c4dc68 > >

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-15 Thread Steven Rostedt
On Wed, 15 Apr 2015 09:22:37 -0400 Sasha Levin wrote: > Hey Steven, > > I'm seeing the following when booting: > > [ 10.678876] BUG: KASan: out of bounds access in > trace_event_enum_update+0xb1d/0xb70 at addr a6c4dc68 Thanks for the report. Mind sending me over your config, and

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-15 Thread Sasha Levin
On 04/02/2015 09:38 PM, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > Several tracepoints use the helper functions __print_symbolic() or > __print_flags() and pass in enums that do the mapping between the > binary data stored and the value to print. This works well for reading >

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-15 Thread Sasha Levin
On 04/02/2015 09:38 PM, Steven Rostedt wrote: From: Steven Rostedt (Red Hat) rost...@goodmis.org Several tracepoints use the helper functions __print_symbolic() or __print_flags() and pass in enums that do the mapping between the binary data stored and the value to print. This works well for

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-15 Thread Steven Rostedt
On Wed, 15 Apr 2015 09:22:37 -0400 Sasha Levin sasha.le...@oracle.com wrote: Hey Steven, I'm seeing the following when booting: [ 10.678876] BUG: KASan: out of bounds access in trace_event_enum_update+0xb1d/0xb70 at addr a6c4dc68 Thanks for the report. Mind sending me over

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-15 Thread Sasha Levin
On 04/15/2015 10:05 AM, Steven Rostedt wrote: On Wed, 15 Apr 2015 09:22:37 -0400 Sasha Levin sasha.le...@oracle.com wrote: Hey Steven, I'm seeing the following when booting: [ 10.678876] BUG: KASan: out of bounds access in trace_event_enum_update+0xb1d/0xb70 at addr a6c4dc68

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-07 Thread Steven Rostedt
On Tue, 7 Apr 2015 23:16:02 +0900 Namhyung Kim wrote: > > Thanks for reviewing. > > OK. You can add my Acked-by if you like.. Cool, I will. Thanks! -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-07 Thread Namhyung Kim
Hi Steve, On Mon, Apr 06, 2015 at 07:52:37AM -0400, Steven Rostedt wrote: > On Mon, 6 Apr 2015 13:54:33 +0900 > Namhyung Kim wrote: > > > > > + if (isalpha(*ptr) || *ptr == '_') { > > > + if (strncmp(map->enum_string, ptr, len) == 0 && > > > +

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-07 Thread Namhyung Kim
Hi Steve, On Mon, Apr 06, 2015 at 07:52:37AM -0400, Steven Rostedt wrote: On Mon, 6 Apr 2015 13:54:33 +0900 Namhyung Kim namhy...@kernel.org wrote: + if (isalpha(*ptr) || *ptr == '_') { + if (strncmp(map-enum_string, ptr, len) == 0 +

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-07 Thread Steven Rostedt
On Tue, 7 Apr 2015 23:16:02 +0900 Namhyung Kim namhy...@kernel.org wrote: Thanks for reviewing. OK. You can add my Acked-by if you like.. Cool, I will. Thanks! -- Steve -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-06 Thread Steven Rostedt
On Mon, 6 Apr 2015 13:54:33 +0900 Namhyung Kim wrote: > > + if (isalpha(*ptr) || *ptr == '_') { > > + if (strncmp(map->enum_string, ptr, len) == 0 && > > + !isalnum(ptr[len]) && ptr[len] != '_') { > > + ptr =

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-06 Thread Steven Rostedt
On Mon, 6 Apr 2015 13:54:33 +0900 Namhyung Kim namhy...@kernel.org wrote: + if (isalpha(*ptr) || *ptr == '_') { + if (strncmp(map-enum_string, ptr, len) == 0 + !isalnum(ptr[len]) ptr[len] != '_') { + ptr =

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-05 Thread Namhyung Kim
Hi Steve, On Thu, Apr 02, 2015 at 09:38:09PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > Several tracepoints use the helper functions __print_symbolic() or > __print_flags() and pass in enums that do the mapping between the > binary data stored and the value to print.

Re: [PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-05 Thread Namhyung Kim
Hi Steve, On Thu, Apr 02, 2015 at 09:38:09PM -0400, Steven Rostedt wrote: From: Steven Rostedt (Red Hat) rost...@goodmis.org Several tracepoints use the helper functions __print_symbolic() or __print_flags() and pass in enums that do the mapping between the binary data stored and the value

[PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-02 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" Several tracepoints use the helper functions __print_symbolic() or __print_flags() and pass in enums that do the mapping between the binary data stored and the value to print. This works well for reading the ASCII trace files, but when the data is read via

[PATCH 07/18 v3] tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values

2015-04-02 Thread Steven Rostedt
From: Steven Rostedt (Red Hat) rost...@goodmis.org Several tracepoints use the helper functions __print_symbolic() or __print_flags() and pass in enums that do the mapping between the binary data stored and the value to print. This works well for reading the ASCII trace files, but when the data