summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2009-07-21 00:55:05 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-22 09:29:52 -0700
commit0dc3d523e8bc4718e0be2e4a742367d6e4be77cd (patch)
treefca11240e17b99220f83c16ca79eabe6688be7a3 /kernel
parent61fe087059614226978f4d7bb36da26cb2d28f9f (diff)
downloadtalos-obmc-linux-0dc3d523e8bc4718e0be2e4a742367d6e4be77cd.tar.gz
talos-obmc-linux-0dc3d523e8bc4718e0be2e4a742367d6e4be77cd.zip
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: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_counter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index a641eb753b8c..7bc888dfd06a 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -2665,6 +2665,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
header.size += sizeof(cpu_entry);
cpu_entry.cpu = raw_smp_processor_id();
+ cpu_entry.reserved = 0;
}
if (sample_type & PERF_SAMPLE_PERIOD)
OpenPOWER on IntegriCloud