lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Apr 2009 11:40:26 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Tom Zanussi <tzanussi@...il.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/events: make struct trace_entry->type to be int
	type


* Li Zefan <lizf@...fujitsu.com> wrote:

> Frederic Weisbecker wrote:
> > On Wed, Apr 22, 2009 at 04:53:34PM +0800, Li Zefan wrote:
> >> struct trace_entry->type is unsigned char, while trace event's id is
> >> int type, thus for a event with id >= 256, it's entry->type is cast
> >> to (id % 256), and then we can't see the trace output of this event.
> >>
> >>  # insmod trace-events-sample.ko
> >>  # echo foo_bar > /mnt/tracing/set_event
> >>  # cat /debug/tracing/events/trace-events-sample/foo_bar/id
> >>  256
> >>  # cat /mnt/tracing/trace_pipe
> >>            <...>-3548  [001]   215.091142: Unknown type 0
> >>            <...>-3548  [001]   216.089207: Unknown type 0
> >>            <...>-3548  [001]   217.087271: Unknown type 0
> >>            <...>-3548  [001]   218.085332: Unknown type 0
> >>
> >> [ Impact: fix output for trace events with id >= 256 ]
> >>
> >> Signed-off-by: Li Zefan <lizf@...fujitsu.com>
> > 
> > 
> > Indeed, now with the trace_events, we are approaching this possible
> > overflow and the type is indeed an int:
> > 
> > struct trace_event *ftrace_find_event(int type)
> > 
> > Curious: does it only happen with the trace-event-sample?
> > I doubt we already reached this threshold of event number.
> > But anyway, it's a good thing.
> > 
> 
> I guess we haven't reached this limit, at least for mainline. :)
> 
> And the biggest id is 48 in my config.

I think we'll hit 256 pretty soon :) Applied, thanks guys!

Btw., has anyone thought about a .config option that turns every 
dprintk into a tracepoint, enumerated in /debug/tracing/events/ 
nicely (grouped by subsystems) and toggle-able?

( They cannot have 'format' and 'filter' files [at least yet] - but 
  integrating them into the existing tracing facilities makes sense 
  nevertheless - they are often used as subsystem tracepoints. 
  Allowing them to be captured via the tracing facilities would make 
  their usage a lot more flexible. )

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ