From: Arjan van de Ven Date: Tue, 21 Jul 2009 07:55:05 +0000 (-0700) Subject: perf: Fix stack data leak X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c9f73a3dd27e03411f18a58c0814d51392d2b17a;p=linux-beck.git 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 Signed-off-by: Peter Zijlstra --- diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index 5c6fae4f43d8..ff854fd89a81 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c @@ -2666,6 +2666,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)