Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1775541imm; Thu, 27 Sep 2018 02:15:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV60GawDUru1QD/D8XFVj+vJqoru/0swvYFE9mBaoAg4UM81t5YLaLwiMLg9u+yQPH+NaafbW X-Received: by 2002:a17:902:506:: with SMTP id 6-v6mr10039256plf.132.1538039734635; Thu, 27 Sep 2018 02:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039734; cv=none; d=google.com; s=arc-20160816; b=r/88CAPUziQhx4H1skFVxLcpOI2ztw5qOVDXDiDxCWynZNScDfqJmnrWNNSlyBV2AE Q5WF2YRV6G/CH9dZ6M+F3NUKoZ/9fh6k0gsWa3c/xCafDDIzMoFF8esW8tNzY413eSTj bDEzz+nblo9hUH2pY9B1UmcrhJOjuOkIlMfz06qvSheAGYg06DNLRKMBL4aE48XaEbNz JWhp6d06iehkvo4oyw1Q0Se2e+y3VkdNtAYjmEagoP2jgd1Mad1N1p3DAbUEv1bWaqm7 RH3+C/IHH8qyqfqReM+dH1Yr41/X26jF2l9VEjekm37sWsUL5MXrzvDObfuk+ekFx+mS WQbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=pOM+D3+Ifm1g2RnIP1o50ce4LBOq8fi+fDcurUVayZg=; b=kpY3YWJrbXzqHu+vVK/HekbRXIxuPC8aWe0oEXf2R49ED+k+nj3ovnMhGSFIQn4SFt 7rK60Q8NGgsa9L1xCNpX1RwF2mWsXZiaDYE+mHV16kQk5JvUsqVPb7J6MrAqYkSsupJR fLokdUpcusQBbuEp1Xih1QkhFo6R8WeV4CSJ4D8C5dyUcrW8NLSB+chUWgmHImMdty19 RqHGhGAE6q1ltkUuUfe8NWtUa5VSSH8SkZx9WBMYXwthdo6lsaT6zPZqG8pLtyhbMXFQ j0gsc0Fev3Yz2sGumoFdxAHKgTkh5myLxLIiHCaCmR2xSmmvoCBIU6W3HnfZ44Z/jyP7 bxUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bf1-v6si1518378plb.279.2018.09.27.02.15.19; Thu, 27 Sep 2018 02:15:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728485AbeI0Pa0 (ORCPT + 99 others); Thu, 27 Sep 2018 11:30:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55422 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727613AbeI0Pa0 (ORCPT ); Thu, 27 Sep 2018 11:30:26 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7BC661120; Thu, 27 Sep 2018 09:13:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Juergen Gross , Boris Ostrovsky Subject: [PATCH 4.18 45/88] xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code Date: Thu, 27 Sep 2018 11:03:26 +0200 Message-Id: <20180927090306.277455173@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090300.631426620@linuxfoundation.org> References: <20180927090300.631426620@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Boris Ostrovsky commit 70513d58751d7c6c1a0133557b13089b9f2e3e66 upstream. Otherwise we may leak kernel stack for events that sample user registers. Reported-by: Mark Rutland Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/x86/xen/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/xen/pmu.c +++ b/arch/x86/xen/pmu.c @@ -478,7 +478,7 @@ static void xen_convert_regs(const struc 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();