summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>2018-07-12 20:27:00 +0300
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2018-09-19 18:26:53 +0300
commit70513d58751d7c6c1a0133557b13089b9f2e3e66 (patch)
treeab0fe365cafdec4186d75dbee621a3dc156fa717 /arch
parent58a57569904039d9ac38c0ff2a88396a43899689 (diff)
downloadlinux-70513d58751d7c6c1a0133557b13089b9f2e3e66.tar.xz
xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
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
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/pmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c
index 7d00d4ad44d4..95997e6c0696 100644
--- a/arch/x86/xen/pmu.c
+++ b/arch/x86/xen/pmu.c
@@ -478,7 +478,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();