lkml.org 
[lkml]   [2019]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: System crash with perf_fuzzer (kernel: 5.0.0-rc3)
On Wed, Jan 30, 2019 at 12:39:47PM -0800, Andi Kleen wrote:
> Jiri Olsa <jolsa@redhat.com> writes:
> >
> > the patch adds check_eriod pmu callback.. I need to check if there's
> > better way to do this, but so far it fixes the crash for me
> >
> > if you guys could check this patch, that'd be great
>
> There's already a limit_period callback, perhaps that could
> be extended. But ok, can do it this way too.

right, we call it within x86_perf_event_set_period to limit
the period, but I guess we should include this check after
changing the period:

if (event->attr.sample_period && x86_pmu.limit_period) {
if (x86_pmu.limit_period(event, event->attr.sample_period) >
event->attr.sample_period)
return -EINVAL;
}

>
> I suspect there are some other cases that need this callback, not
> just BTS, e.g. the checks in hsw_hw_config

ok, the sample_period values for checkpointed events,
we should check for this as well.. I'll add that

jirka

\
 
 \ /
  Last update: 2019-01-31 00:13    [W:0.114 / U:69.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site