Received: by 10.213.65.68 with SMTP id h4csp910671imn; Tue, 27 Mar 2018 11:02:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+2VeHt6GmO3IChp+f8mnVue+ypZqEKyesP/G7tGl41mTwtaEGgQzLibKREkyk9ul3dLTHq X-Received: by 2002:a17:902:6c0d:: with SMTP id q13-v6mr307570plk.350.1522173743297; Tue, 27 Mar 2018 11:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522173743; cv=none; d=google.com; s=arc-20160816; b=Kts7GA3yKwxVEVnlqLNwZvzVW7vgkZ30JHjsrTwqcQY1iaa9b9OJwZhYjyQbLr5vyT n6gXDrnJbl9+ctz989GYM6cVSHq3R4lA0zfaoudoX42hDauJhyrUQaxBUJFPtnK7UZPA qrHI7P1e9vO62+ZZ7eaVl9pJWwAilNBGascJrISusohTuJysKDqaqGzV99WY3M9X2zDR nHvMFk7xbxXHd3oPiAeQZr5hXmtAi04vVZZT2vPUo1QgagXBdjRU0i6Jp/AOOvCks2dG 21D+HLUlBaUBehcdOevFoHacMjT/TpiMc6OVAwizxUgvNIHw+QWAAG1y21WZbLte5pNb MDhw== 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=KcOw9m5Avfm7oj9UDcWave/xWNSpUpqrOy+VekaR7BM=; b=kHE9WRoD5wR++n9wxy9Y71v68q3FxZpY5P7uqttWMsGBwTk2IaF7w6mw0D/XxgaM7e hk6OxZczR4jf/cE0QahHtAUNUTmu5BOGYf65UaXaXiOq/ugzQXJILKQtYuH6PSV6BODE pQdwirSHvgOAJl40nEFzoRx40Jp2N2bjcKYXlnrxbz0zcYfb6A3sDbUx09ffMHqk9mu3 FIaYPQYc8UkR3KUd+ph81rS78lirhmaoFFUMzkSWveoOms4MzJTr+8IFeAcfqeKJqKW2 nbRcXXQZC4ThNT7V6vgapESulRPXjHPecVWFaFIi3it6uXbkMP3DFD+FiwftMD/BjFER eRJQ== 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 g3-v6si1542879plp.662.2018.03.27.11.02.08; Tue, 27 Mar 2018 11:02:23 -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 S1753312AbeC0R73 (ORCPT + 99 others); Tue, 27 Mar 2018 13:59:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41862 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753046AbeC0QaY (ORCPT ); Tue, 27 Mar 2018 12:30:24 -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 F259311B6; Tue, 27 Mar 2018 16:30:23 +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.4 39/43] perf/x86/intel: Dont accidentally clear high bits in bdw_limit_period() Date: Tue, 27 Mar 2018 18:27:43 +0200 Message-Id: <20180327162718.599122498@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162716.407986916@linuxfoundation.org> References: <20180327162716.407986916@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.4-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/kernel/cpu/perf_event_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kernel/cpu/perf_event_intel.c +++ b/arch/x86/kernel/cpu/perf_event_intel.c @@ -2716,7 +2716,7 @@ static unsigned bdw_limit_period(struct X86_CONFIG(.event=0xc0, .umask=0x01)) { if (left < 128) left = 128; - left &= ~0x3fu; + left &= ~0x3fULL; } return left; }