Re: [PATCH] markers: fix unchecked format

From: Ingo Molnar
Date: Thu Oct 09 2008 - 10:05:41 EST



* Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx> wrote:

> * Lai Jiangshan (laijs@xxxxxxxxxxxxxx) wrote:
> >
> > No.
> >
> > 1)
> > In current code, when the second, third... probe is registered
> > with the same marker name, its format is not checked.
> >
> > marker_probe_register("marker_name", "field1 %s", XXX);
> > marker_probe_register("marker_name", "field1 %d", XXX);
> >
> > the second call, "field1 %d" is not check for ever.
> > and this probe may cause kernel core-dump.
> >
> > because these two probes share the same marker_entry, and
> > we do not check the format when they are being shared.
> >
> > if several probes share the same marker_entry we should
> > make sure all these probes's format are the same.
> >
>
> Yep, you are right. Thanks for the explanation.
>
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>

applied to tip/tracing/markers, thanks!

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