lkml.org 
[lkml]   [2017]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectperf: bug in rdpmc/mmap accounting after exec
Hello

so one last bug found by the PAPI testsuite.

This one involves the rdpmc auto-disable on last unmap of an event
feature.

Failing test case:

fd=perf_event_open();
addr=mmap(fd);
exec() // without closing or unmapping the event
fd=perf_event_open();
addr=mmap(fd);
rdpmc() // GPFs due to rdpmc being disabled

I won't pretend to be able to follow the rdpmc disabling code, but if I
add some printks it looks like
current->mm->context.perf_rdpmc_allowed
isn't properly being reset on exec?

In fact, current->mm->context.perf_rdpmc_allowed goes negative which seems
like it shouldn't happen?

Anyway, a test case for this can be found in the perf_event_tests,
tests/rdpmc/rdpmc_exec_papi

Vince

\
 
 \ /
  Last update: 2017-07-26 21:40    [W:0.072 / U:3.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site