Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2996469imm; Sun, 1 Jul 2018 09:59:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfuUrqYnB1TNSjcHiHG1j/q01DxyBc5EoegaOtfG228uEfDldbk9CfNyKR1GuUtsW2wFKht X-Received: by 2002:a17:902:59da:: with SMTP id d26-v6mr15338684plj.42.1530464351324; Sun, 01 Jul 2018 09:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530464351; cv=none; d=google.com; s=arc-20160816; b=BhzFGLjlwnDlqYHmeWtbYHGgK2mzot/plRTwS4tWM90NkVlum4+n8MD2G1hZ33ZJbk xvOXl93/wmQmQfJ7FfITVoItFjv3QFEvs1De8FosZ0FPtpFDDBCQzD1dt27a0+zUYZT2 nTHRXUW036Iufa335JYZPhPmJF0d3Ve/CFjLKbVm4HQHVB4t1+JKE2RlaIqnuqECayRD 2QCb9VQ7h52ULCG96+u5YzmPmaHdw/YlYLykgcjYrCq52weX59zucPs6psuyUUS4XrF5 7PtGDPS2WWM+FnHUdxU35anxmLE8meeL41fdgVJv2GShhxVg8KY899ofco0NbTJqxKo4 aZYg== 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=D/O+DJ0MOp6EbUt73ZzLQpMbQydGBpUEEmJYGNoWR8U=; b=QJITvAWP38oKrO3/jc5LYrPMgUkprwFAcf7i7/fBXhzfOT+sNMxdWKq2q/Dvy4y3rt plYt6KNi4RIzHWKgnOj1w4m5F7ganfGTj1j7UjUXLNwdFVwB/KiIFCKjbuUFSmF1P0Qx /jRP9UpD1t0mwwNWHoum05CGayHdvz8niKtO2nFv0pm18JE9h6wTaSq2XStHmpP05kHA EtwCBmTLrg+lW3M+yBV0JaDu1PFC8RCcCaFCzNHbfMMHJPN7jGoA6t+WUObbyMQwkZqj aOzO0H1Z5ipjLjcx8OWlV4iXIzS3ia84fUnvFlAZEkp9aqofLzBr8zSUthfj4+Q6Fyp0 1MPg== 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 r3-v6si12603687pgo.606.2018.07.01.09.58.57; Sun, 01 Jul 2018 09:59:11 -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 S933970AbeGAQ5o (ORCPT + 99 others); Sun, 1 Jul 2018 12:57:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38042 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032080AbeGAQo1 (ORCPT ); Sun, 1 Jul 2018 12:44:27 -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 1132092B; Sun, 1 Jul 2018 16:44:26 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 4.17 172/220] perf intel-pt: Fix packet decoding of CYC packets Date: Sun, 1 Jul 2018 18:23:16 +0200 Message-Id: <20180701160915.430855405@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@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.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit 621a5a327c1e36ffd7bb567f44a559f64f76358f upstream. Use a 64-bit type so that the cycle count is not limited to 32-bits. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1528371002-8862-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c @@ -366,7 +366,7 @@ static int intel_pt_get_cyc(unsigned int if (len < offs) return INTEL_PT_NEED_MORE_BYTES; byte = buf[offs++]; - payload |= (byte >> 1) << shift; + payload |= ((uint64_t)byte >> 1) << shift; } packet->type = INTEL_PT_CYC;