Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697513 > unrolled thread

perf: bug in rdpmc/mmap accounting after exec

Started byVince Weaver <vincent.weaver@maine.edu>
First post2017-07-26 21:40 +0200
Last post2017-07-26 21:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  perf: bug in rdpmc/mmap accounting after exec Vince Weaver <vincent.weaver@maine.edu> - 2017-07-26 21:40 +0200

#1697513 — perf: bug in rdpmc/mmap accounting after exec

FromVince Weaver <vincent.weaver@maine.edu>
Date2017-07-26 21:40 +0200
Subjectperf: bug in rdpmc/mmap accounting after exec
Message-ID<u7Ak2-4uD-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web