Re: perf,ftrace: fuzzer triggers warning in trace_events_filter code

From: Steven Rostedt
Date: Fri Jun 12 2015 - 21:29:55 EST


On Fri, 12 Jun 2015 21:15:10 -0400 (EDT)
Vince Weaver <vincent.weaver@xxxxxxxxx> wrote:

> On Fri, 12 Jun 2015, Steven Rostedt wrote:
>
> > On Fri, 12 Jun 2015 17:18:22 -0400 (EDT)
> > Vince Weaver <vincent.weaver@xxxxxxxxx> wrote:
> >
> > >
> > > So I've modified my fuzzer to try to exercise the
> > > PERF_EVENT_IOC_SET_FILTER ioctl() and it is starting to turn up some
> > > warnings.
> >
> > Is there any way to know what the filter string you used that generated
> > this?
>
> Various seem to trigger it. One example is
>
> ext4:ext4_truncate_exit
> (((dev<=913)blocks==916)common_type&756)
>

Thanks, OK, I know what the issue is. I'm also thinking the solution
may simply be removing that WARN_ON(). But I'll look at it a little
deeper before deciding that.

The WARN_ON() simply detected an anomaly, but nothing breaks when that
anomaly occurs. Well, I don't see anything breaking, it just expected
that we couldn't get to this path, but now we know we can. Thus the
solution is to remove the WARN_ON() or detect the bad filter before
getting there.

-- Steve
--
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/