Re: perf: fuzzer causes stack going in wrong direction warnings

From: Josh Poimboeuf
Date: Thu May 10 2018 - 19:17:00 EST


On Thu, May 10, 2018 at 03:48:41PM +0200, Peter Zijlstra wrote:
> On Sun, May 06, 2018 at 06:49:35PM -0500, Josh Poimboeuf wrote:
>
> > Deja vu. Most of these are related to perf PEBS, similar to the
> > following issue:
> >
> > b8000586c90b ("perf/x86/intel: Cure bogus unwind from PEBS entries")
> >
> > This is basically the ORC version of that. setup_pebs_sample_data() is
> > assembling a franken-pt_regs which ORC isn't happy about. RIP is
> > inconsistent with some of the other registers (like RSP and RBP).
> >
> > Peter, any ideas?
>
> Urgh..
>
> Something like so perhaps? It's a bit of a hack, but I couldn't quickly
> think of something nicer.

I had to convert perf_callchain() to a global function to get it to
compile, but it does seem to fix the issue.

--
Josh