Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp610864pxb; Tue, 5 Apr 2022 15:54:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfXF5ZQsRJsmntlo9y2KDYh4Fj6TygWtUHqMf20y4u4xWhSTsqgyqzMcfbNbKCkJPRXwZz X-Received: by 2002:a05:6602:14cb:b0:646:3b7d:6aee with SMTP id b11-20020a05660214cb00b006463b7d6aeemr2849489iow.178.1649199290159; Tue, 05 Apr 2022 15:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649199290; cv=none; d=google.com; s=arc-20160816; b=y35ZXqGN/tDoIrZAAIVh7jYs1OpLv4dtzouWP8rtMZeu5fGJv9UlZ5TO2IwzkUQbfY c84TMChb40G4bGhzhne2xz7sioCafohS35dS5s2iua37/BeioHVkfUlZrKYIgR4myQM0 XruLS4K8jGNdAknWQI2UpBrLoeZu/+1GEWB+tVklPUOSRVCYGI7nGFEPLSAiChUm7dfZ u8lUt+AbNuLcWiuVDNmDdDXCC/jYlYrKxw5/bvvRIlRCWf5gjc9eK+Md6CzbPuTg+sBf 7zMz/Pnf/zg5T6y4mGzwGRTeLcuq4ejdokAW+FOaeXKJ1zmvzIZahAXdeHoYmbrQRZ3p PJkw== 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=6efbqEzoJpNgTY92IJM1EbSpku5AC12dd4MR8wLOxo0=; b=vAiJP/IxJpVmE8O8gDtHZKgcg9dtmnqkn1z3H4XGP/p/IuYaZc7lre6ov5iVUxGRNF /VCIxEXUGaE5wJ7EEBuS6aaU08wJZGzG8j0atxSK36RqOjNV0SDd+0NkKz92kLyOXG9m kWTy/kJ1Ky0QwPpK76Kcn7ydBqGiIF5Zd2/E1gr64v3kWcEiAKeqAb2QBMfafeKLtlXg A1h6RwND9EBRdn18+tb5Z8eHZ2kAnqP9DTbJlmXDRnws2Wd50JYW71Y7aaO9C+W/NDsB Y5lqNIQeeMK26rcvHZzJvCm9o9QqkJPHiD6dSnHG1QeFnxeYMt9d1wqWWX/tFrmnwjbL jtug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1kVxWtZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g12-20020a92d7cc000000b002c7c7bfb6a3si5233994ilq.65.2022.04.05.15.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:54:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1kVxWtZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6DF15162193; Tue, 5 Apr 2022 15:36:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382473AbiDEMP3 (ORCPT + 99 others); Tue, 5 Apr 2022 08:15:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244852AbiDEIwn (ORCPT ); Tue, 5 Apr 2022 04:52:43 -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 8D3BD237D1; Tue, 5 Apr 2022 01:44:51 -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 2B9326117A; Tue, 5 Apr 2022 08:44:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ECC9C385A0; Tue, 5 Apr 2022 08:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148290; bh=NvH7Cwwc01Bg0PNrrgFX0NR/Yp4IwfHNtTfRuL0jc18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1kVxWtZ/74dD455HFaV3YATJtfFAVOc+odFhYPo0PvCs6pBJ2Y3Ks17jh0vlH3QvF PMNl8CKt5xjeDZfjjvQ/49zRQZIil/WAC1m0poXY+H8T3SvrlkYe67M/sVOjGBgf1o BDgqmXl4sUEvE7Uj9CZ3Q7B8CGjwsIgVQH8+tYT0= 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 5.16 0265/1017] perf/x86/intel/pt: Fix address filter config for 32-bit kernel Date: Tue, 5 Apr 2022 09:19:38 +0200 Message-Id: <20220405070402.129431092@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 2d33bba9a144..215aed65e978 100644 --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@ -472,7 +472,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