提交 c9f73a3d 编写于 作者: A Arjan van de Ven 提交者: Peter Zijlstra

perf: Fix stack data leak

the "reserved" field was not initialized to zero, resulting in 4 bytes
of stack data leaking to userspace....
Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
上级 9b7019ae
...@@ -2666,6 +2666,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi, ...@@ -2666,6 +2666,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
header.size += sizeof(cpu_entry); header.size += sizeof(cpu_entry);
cpu_entry.cpu = raw_smp_processor_id(); cpu_entry.cpu = raw_smp_processor_id();
cpu_entry.reserved = 0;
} }
if (sample_type & PERF_SAMPLE_PERIOD) if (sample_type & PERF_SAMPLE_PERIOD)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册