All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] perf: Drop leaked kernel samples
@ 2018-06-15 10:03 Jin Yao
  2018-06-15  3:35 ` Kyle Huey
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Jin Yao @ 2018-06-15 10:03 UTC (permalink / raw)
  To: acme, jolsa, peterz, mingo, alexander.shishkin, me
  Cc: Linux-kernel, vincent.weaver, will.deacon, eranian, namhyung, ak,
	kan.liang, yao.jin, Jin Yao

On workloads that do a lot of kernel entry/exits we see kernel
samples, even though :u is specified. This is due to skid existing.

This might be a security issue because it can leak kernel addresses even
though kernel sampling support is disabled.

One patch "perf/core: Drop kernel samples even though :u is specified"
was posted in last year but it was reverted because it introduced a
regression issue that broke the rr-project.

Now this patch set uses sysctl to control the dropping of leaked
kernel samples.

/sys/devices/cpu/perf_allow_sample_leakage:

0 - default, drop the leaked kernel samples.
1 - don't drop the leaked kernel samples.

For rr it can write 1 to /sys/devices/cpu/perf_allow_sample_leakage to
keep original system behavior.

Jin Yao (2):
  perf/core: Use sysctl to turn on/off dropping leaked kernel samples
  perf Documentation: Introduce the sysctl perf_allow_sample_leakage

 kernel/events/core.c                     | 58 ++++++++++++++++++++++++++++++++
 tools/perf/Documentation/perf-record.txt | 14 ++++++++
 2 files changed, 72 insertions(+)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2018-06-19 16:50 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-15 10:03 [PATCH v1 0/2] perf: Drop leaked kernel samples Jin Yao
2018-06-15  3:35 ` Kyle Huey
2018-06-15  5:11   ` Jin, Yao
2018-06-15 17:16     ` Kyle Huey
2018-06-15 17:34       ` Robert O'Callahan
2018-06-16  0:50         ` Jin, Yao
2018-06-16  0:56           ` Kyle Huey
2018-06-16  1:18             ` Jin, Yao
2018-06-15  7:45 ` Peter Zijlstra
2018-06-15  8:01   ` Jin, Yao
2018-06-15  8:12     ` Peter Zijlstra
2018-06-15  8:24       ` Jin, Yao
2018-06-15 16:54       ` Stephane Eranian
2018-06-15 10:03 ` [PATCH v1 1/2] perf/core: Use sysctl to turn on/off dropping " Jin Yao
2018-06-15  5:59   ` Stephane Eranian
2018-06-15  7:15     ` Jin, Yao
2018-06-19 16:50       ` Stephane Eranian
2018-06-15  6:02   ` Stephane Eranian
2018-06-15  8:16     ` Peter Zijlstra
2018-06-15 13:31       ` Liang, Kan
2018-06-18 10:41         ` Peter Zijlstra
2018-06-15 11:36   ` Mark Rutland
2018-06-16  1:27     ` Linus Torvalds
2018-06-18 10:51       ` Peter Zijlstra
2018-06-18  6:55     ` Jin, Yao
2018-06-18 10:45       ` Peter Zijlstra
2018-06-19  1:39         ` Jin, Yao
2018-06-19  6:01           ` Mark Rutland
2018-06-15 10:03 ` [PATCH v1 2/2] perf Documentation: Introduce the sysctl perf_allow_sample_leakage Jin Yao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.