diff options
author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2018-07-12 13:27:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-29 03:08:51 -0700 |
commit | 28ca9ed1c95547daee49749287393ef6e540dbaa (patch) | |
tree | c1f54e7216c0fcfcd360baabf7baf77116b6bcb0 /arch/x86/xen | |
parent | bd1468048aa3e2af865da92990539946d4483989 (diff) | |
download | linux-stable-28ca9ed1c95547daee49749287393ef6e540dbaa.tar.gz linux-stable-28ca9ed1c95547daee49749287393ef6e540dbaa.tar.bz2 linux-stable-28ca9ed1c95547daee49749287393ef6e540dbaa.zip |
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>
Diffstat (limited to 'arch/x86/xen')
-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 724a08740a04..9c7358110d32 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(); |