Skip to content

Commit

Permalink
xen/x86/vpmu: Zero struct pt_regs before calling into sample handling…
Browse files Browse the repository at this point in the history
… code

Otherwise we may leak kernel stack for events that sample user
registers.

Reported-by: Mark Rutland <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Signed-off-by: Boris Ostrovsky <[email protected]>
Cc: [email protected]
  • Loading branch information
Boris Ostrovsky committed Sep 19, 2018
1 parent 58a5756 commit 70513d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/xen/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 70513d5

Please sign in to comment.