Commit b94c2899 authored by Boris Ostrovsky's avatar Boris Ostrovsky Committed by Kleber Sacilotto de Souza

xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code

BugLink: https://bugs.launchpad.net/bugs/1798617

commit 70513d58 upstream.

Otherwise we may leak kernel stack for events that sample user
registers.
Reported-by: default avatarMark Rutland <mark.rutland@arm.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent f06f915b
...@@ -477,7 +477,7 @@ static void xen_convert_regs(const struct xen_pmu_regs *xen_regs, ...@@ -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) irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id)
{ {
int err, ret = IRQ_NONE; int err, ret = IRQ_NONE;
struct pt_regs regs; struct pt_regs regs = {0};
const struct xen_pmu_data *xenpmu_data = get_xenpmu_data(); const struct xen_pmu_data *xenpmu_data = get_xenpmu_data();
uint8_t xenpmu_flags = get_xenpmu_flags(); uint8_t xenpmu_flags = get_xenpmu_flags();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment