diff options
author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2018-07-12 20:27:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-29 13:07:32 +0300 |
commit | ecde7ed3e8fa97747864cd0611827ddd3ecebd9c (patch) | |
tree | b3bc988f129347dd32a39e6e96a22b999b996d3a | |
parent | 29a6193c0d74390c004808441061ac1812cf6f51 (diff) | |
download | linux-ecde7ed3e8fa97747864cd0611827ddd3ecebd9c.tar.xz |
xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
commit 70513d58751d7c6c1a0133557b13089b9f2e3e66 upstream.
Otherwise we may leak kernel stack for events that sample user
registers.
Reported-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/xen/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c index b9fc52556bcc..0b29a43e09c8 100644 --- a/arch/x86/xen/pmu.c +++ b/arch/x86/xen/pmu.c @@ -477,7 +477,7 @@ static void xen_convert_regs(const struct xen_pmu_regs *xen_regs, irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id) { int err, ret = IRQ_NONE; - struct pt_regs regs; + struct pt_regs regs = {0}; const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); uint8_t xenpmu_flags = get_xenpmu_flags(); |