Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-05 Thread Krister Johansen
On Wed, Jan 04, 2017 at 12:37:39AM -0800, Krister Johansen wrote: > On Mon, Jan 02, 2017 at 09:30:33PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Jan 02, 2017 at 04:39:04PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Mon, Jan 02, 2017 at 02:36:57PM -0300, Arnaldo Carvalho de Melo >

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-04 Thread Krister Johansen
On Mon, Jan 02, 2017 at 09:30:33PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Jan 02, 2017 at 04:39:04PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Jan 02, 2017 at 02:36:57PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Mon, Jan 02, 2017 at 02:35:30PM -0300, Arnaldo Carvalho

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-02 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 02, 2017 at 04:39:04PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jan 02, 2017 at 02:36:57PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Jan 02, 2017 at 02:35:30PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Mon, Jan 02, 2017 at 12:15:14PM -0300, Arnaldo Carval

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-02 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 02, 2017 at 02:36:57PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jan 02, 2017 at 02:35:30PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Jan 02, 2017 at 12:15:14PM -0300, Arnaldo Carvalho de Melo escreveu: > { > zfree(&iter->priv); > iter->he = NULL;

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-02 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 02, 2017 at 02:35:30PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jan 02, 2017 at 12:15:14PM -0300, Arnaldo Carvalho de Melo escreveu: > > Tried it again with what is in Linus' tree + your patch and got the same > > problem: > > > > [acme@jouet linux]$ git remote -v | grep tor

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-02 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 02, 2017 at 12:15:14PM -0300, Arnaldo Carvalho de Melo escreveu: > Tried it again with what is in Linus' tree + your patch and got the same > problem: > > [acme@jouet linux]$ git remote -v | grep torvalds.*fetch > torvalds > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2017-01-02 Thread Arnaldo Carvalho de Melo
Em Wed, Dec 28, 2016 at 05:39:47PM -0800, Krister Johansen escreveu: > On Tue, Nov 22, 2016 at 04:01:06PM -0300, Arnaldo Carvalho de Melo wrote: > > #include "evlist.h" > > @@ -979,6 +980,7 @@ iter_finish_cumulative_entry(struct hist_entry_iter > > *iter, > > { > > zfree(&iter->priv); > >

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2016-12-28 Thread Krister Johansen
On Tue, Nov 22, 2016 at 04:01:06PM -0300, Arnaldo Carvalho de Melo wrote: > Sorry for the overly long delay, trying it now after fixing up a > conflict with a recent patchkit (branch stuff) I tested it by running > 'perf top -g' and I'm getting some assertion bugs: > > > # perf top -g >

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2016-12-01 Thread Krister Johansen
Hey Arnaldo, On Tue, Nov 22, 2016 at 04:01:06PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Nov 10, 2016 at 04:40:46PM -0800, Krister Johansen escreveu: > > Thanks. As part of processing this did you run into any problems? > > Would you like me to rebase against the latest perf/core and re-s

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2016-11-22 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 10, 2016 at 04:40:46PM -0800, Krister Johansen escreveu: > On Wed, Oct 26, 2016 at 11:44:53AM -0200, Arnaldo Carvalho de Melo wrote: > > Em Tue, Oct 25, 2016 at 05:20:10PM -0700, Krister Johansen escreveu: > > > On Tue, Oct 11, 2016 at 02:28:39AM -0700, Krister Johansen wrote: > > > > I

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2016-11-10 Thread Krister Johansen
On Wed, Oct 26, 2016 at 11:44:53AM -0200, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 25, 2016 at 05:20:10PM -0700, Krister Johansen escreveu: > > On Tue, Oct 11, 2016 at 02:28:39AM -0700, Krister Johansen wrote: > > > If dso__load_kcore frees all of the existing maps, but one has already > > > b

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2016-10-26 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 25, 2016 at 05:20:10PM -0700, Krister Johansen escreveu: > On Tue, Oct 11, 2016 at 02:28:39AM -0700, Krister Johansen wrote: > > If dso__load_kcore frees all of the existing maps, but one has already > > been attached to a callchain cursor node, then we can get a SIGSEGV in > > any func

Re: [PATCH v2 perf/core] perf script: fix a use after free crash.

2016-10-25 Thread Krister Johansen
On Tue, Oct 11, 2016 at 02:28:39AM -0700, Krister Johansen wrote: > If dso__load_kcore frees all of the existing maps, but one has already > been attached to a callchain cursor node, then we can get a SIGSEGV in > any function that happens to try to use this invalid cursor. Use the > existing map

[PATCH v2 perf/core] perf script: fix a use after free crash.

2016-10-11 Thread Krister Johansen
If dso__load_kcore frees all of the existing maps, but one has already been attached to a callchain cursor node, then we can get a SIGSEGV in any function that happens to try to use this invalid cursor. Use the existing map refcount mechanism to forestall cleanup of a map until the cursor iterates