Received: by 10.213.65.68 with SMTP id h4csp875450imn; Tue, 27 Mar 2018 10:22:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx49vBPqbKtPwcAmiT3t+Nc9iuO6EziOyXLT2jiie88OBqwnb/s96oRngdlO+OwHMN3sa/ZEP X-Received: by 2002:a17:902:8c94:: with SMTP id t20-v6mr180075plo.95.1522171377788; Tue, 27 Mar 2018 10:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522171377; cv=none; d=google.com; s=arc-20160816; b=JsFl8EAuFaS/17hItVI1a4takZL2yDXNKTF1cX1FxFQ21qO//TrD6fC7VFrbCPOgnw KZhvl/Qknz+LxcBCdsVNI4o9RbfH2V3mqS04+Urrat8scb48SDcqQCnAHiVe2aR1bLhn 3oudpMW906mjaEhz18jkpFOYFZ2PzgavvzcEU0alJ6QfYC51K1Ed14WHZtNWlX3+wpdT VnyLi9zPk7ZUY6s5Wv1JPixVOISSglh/T00B4Fjtvg8ulfiTVfiJnLEHWdATgLD/82eZ 58zVc5e+eETY79G/eSamviXHtkdVOBbE3J4i5t7GCXRAwxMMl/WhqD+rHytYGXgnXMbM 2nwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=zQC3DgZTuseOwEM0ptofFcpoLuZRJkiOItxkpiAevgc=; b=tlm7+Q2bHdzWpUQCs3G/+tfI2+s3tj5IBIXqYNbYNouKiABxlEU0AI4Ogv9ENEY9LP pp7WYvSF8+AFmFYtcH8eZtyQ+Rr64Do4OV1zFgyuTMuWaKRqGGN8DdxzoRlEqe0VAZi4 yscTqndLAjUxQUGu6i4615yd8VxfE2XXklOV5DoteTogbVspZVgrxZdzYeDub6ZM5kb1 rO/rdRJVSiIv13PgY78HhuZqh87FGNy2dn4UPxyCCifAdow4d0vo2vtvxfEWOyL16cqF aplWGo90j1IQDIxmJIwu8aj6rIyS5ODY67gW2i1UwFPP0IJBQ84O8VU1kdqsEtI2stnV h2Tw== 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 128si1121205pgh.189.2018.03.27.10.22.43; Tue, 27 Mar 2018 10:22:57 -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 S1755065AbeC0Qhz (ORCPT + 99 others); Tue, 27 Mar 2018 12:37:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46478 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755012AbeC0Qhv (ORCPT ); Tue, 27 Mar 2018 12:37:51 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9FF2AFF0; Tue, 27 Mar 2018 16:37:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "Peter Zijlstra (Intel)" , Alexander Shishkin , Arnaldo Carvalho de Melo , "H. Peter Anvin" , Jiri Olsa , Kan Liang , Linus Torvalds , Sebastian Andrzej Siewior , Stephane Eranian , Thomas Gleixner , Vince Weaver , Ingo Molnar Subject: [PATCH 4.14 090/101] perf/x86/intel: Dont accidentally clear high bits in bdw_limit_period() Date: Tue, 27 Mar 2018 18:28:02 +0200 Message-Id: <20180327162755.564028966@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dan Carpenter commit e5ea9b54a055619160bbfe527ebb7d7191823d66 upstream. We intended to clear the lowest 6 bits but because of a type bug we clear the high 32 bits as well. Andi says that periods are rarely more than U32_MAX so this bug probably doesn't have a huge runtime impact. Signed-off-by: Dan Carpenter Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Fixes: 294fe0f52a44 ("perf/x86/intel: Add INST_RETIRED.ALL workarounds") Link: http://lkml.kernel.org/r/20180317115216.GB4035@mwanda Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/events/intel/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3194,7 +3194,7 @@ static unsigned bdw_limit_period(struct X86_CONFIG(.event=0xc0, .umask=0x01)) { if (left < 128) left = 128; - left &= ~0x3fu; + left &= ~0x3fULL; } return left; }