Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2914341pxb; Mon, 18 Apr 2022 10:56:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAI5+GWFyc3X22Zmu4p838imuHsRrZjY8x3kf2P7cFUYAWM765s9C6RgjtcogOxwLI5tFb X-Received: by 2002:a17:902:7404:b0:158:bff8:aa13 with SMTP id g4-20020a170902740400b00158bff8aa13mr11936276pll.133.1650304603828; Mon, 18 Apr 2022 10:56:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650304603; cv=none; d=google.com; s=arc-20160816; b=SZRlLDAc6pMjDVA97UicBewjORUpaTH41xtSM3S3W1vPHrguAFE/T4xy6rjardNqu9 ouB+cB44g9w6kyDJi1ZLpeT4ilqzrkqNjQP7DffSK9rJ+40Lw0H4vmNLev/Qt7e8kzri 3swyr7UCP1tly+WBS5jr4rEe8s0bcYTd4POUqfrq4OF6K7Z7pON64+INDzchg0h61LtG nkzrKsRCtB353bVdAYsaF5tsZxOazHrHW/xZMd2i3JF6wfRVAtEi3/Pu3rzQNANwk4G5 esT4gtcVQkNQCRCjII/LKMefOgAkOuoMVF3uBVHP8P4nf4Gl6P+UzQRTkWcg1lQ4V+5i ++vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y+jt2n9SFvomgzuZkxVx7+ZujAQ5nLVsX1iDc9e9Kc4=; b=vIEWHhQiTDFOIwjBVY+vKjg3uWTc2mZWb/hG6jsMTOc+t4ycGBdwv+SzcTIG3R84ue nMeWmWTPr8wiBOsoQ7VJDGPTERwchhJWSPEzWKd9gV0kr41ZKmzpaR1h6UoKypHu4+gf U+SlnDMAZ0aMKuDny7zFpTzd9Gr9akuN2WXNRmj6xUKv/YNZyDfL1oKsQqrFQXHfqVV6 jk5YTP5fWRkq8l0F8mLO0fPNb/xDom1EX+Jzsyj5UkK0dai5ZGr51pTja75oXz1n6v4q gn2fCt/7SPIVdWtBjZn/kaP2LznZm3WZKP6xb5czOO24YqR5DYJURdcFbthURbr/lzz8 h/+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LgA22JAR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a170903010a00b00153b2d16560si3300445plc.360.2022.04.18.10.56.27; Mon, 18 Apr 2022 10:56:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LgA22JAR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243418AbiDRNkN (ORCPT + 99 others); Mon, 18 Apr 2022 09:40:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241228AbiDRNLf (ORCPT ); Mon, 18 Apr 2022 09:11:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 575532D1EB; Mon, 18 Apr 2022 05:50:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 682346124E; Mon, 18 Apr 2022 12:50:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73A3AC385A1; Mon, 18 Apr 2022 12:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286236; bh=1cn7iqV1/VA5auhQIF5ZOU3vvMVP3+j/fH3lSoEABec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LgA22JARBjXL4GzVGdrxoefHUzNoHlNh+SdhtLVxmYOA68yahCFCTie30WqoMkLDj 1broqMuob38STX2vmNRw1VZHISkhaHS7ZWA6BgWUz4r56koxR50o4IqtLR0OIleUCM ErKzSY7ln4j60/mRTi7l7ixB8BksG2jo10UnRtDQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , "Peter Zijlstra (Intel)" , Sasha Levin Subject: [PATCH 4.14 070/284] perf/x86/intel/pt: Fix address filter config for 32-bit kernel Date: Mon, 18 Apr 2022 14:10:51 +0200 Message-Id: <20220418121212.679319544@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter [ Upstream commit e5524bf1047eb3b3f3f33b5f59897ba67b3ade87 ] Change from shifting 'unsigned long' to 'u64' to prevent the config bits being lost on a 32-bit kernel. Fixes: eadf48cab4b6b0 ("perf/x86/intel/pt: Add support for address range filtering in PT") Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20220131072453.2839535-5-adrian.hunter@intel.com Signed-off-by: Sasha Levin --- arch/x86/events/intel/pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 990ca9614b23..ad273bba5126 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@ -460,7 +460,7 @@ static u64 pt_config_filters(struct perf_event *event) pt->filters.filter[range].msr_b = filter->msr_b; } - rtit_ctl |= filter->config << pt_address_ranges[range].reg_off; + rtit_ctl |= (u64)filter->config << pt_address_ranges[range].reg_off; } return rtit_ctl; -- 2.34.1