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

commit 70513d5 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>
  • Loading branch information
Boris Ostrovsky authored and gregkh committed Sep 29, 2018
1 parent 29a6193 commit ecde7ed
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 @@ -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();

Expand Down

0 comments on commit ecde7ed

Please sign in to comment.