Received: by 10.192.165.156 with SMTP id m28csp245633imm; Tue, 17 Apr 2018 09:26:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ywJmCkrDuekiFUhS5LWDgYqnauEaEImCbm+n+15WHxA8jTuCCH6o3/4Z1P0O3Kx2PndOG X-Received: by 10.98.60.154 with SMTP id b26mr2591601pfk.3.1523982375761; Tue, 17 Apr 2018 09:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523982375; cv=none; d=google.com; s=arc-20160816; b=k8yCat9cq4Yrf6x+tj50jC8/oYS1U9agDz6rHiQnGWZMY/Zes3UnY7HYYL15rJaX/E r6WZ7h+c3tNyXmzvV9iFpUKa63frz1AVvGrYn1vB+w6RNWHPKAOwVI9xULyh+2mKww3H DklqqJoXhTZcoLOflunPCW0hI4hAuCIhnZHypZZLeEYiMx8qqTcxXM8VrQ6uJPm55f9T IA2hYSsd3lqBKEHqzisRzhfBIB6Ijg/re6KwRjc+WCLGf+7l8Z8f7l9HbbLWlKEQLt2z v1/wxhw32nubX2I6qJ0AINkh0KSZwsrAc4LRTiFgINU8p4xZK+mhpEXpUEV/rjFnvq2E g2fw== 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=dwfUNtzUCe+YoZPckliXQAO6GF20+Hhq5D/wP8Gn8kQ=; b=E6CllSoiMMyk/K15h/wibBgt3ymo++FKY6H1Foq6eebavMZnt5VAI4ppyu4Vcx6Zf5 bj8K8yCh6ZT8/nqGReCZFVIeaDo3EwiHfZt6bUsVXKGicIljy82eahMNvEB2eu02rjQR RrawXYMAq9l9PDprCo7WhLiYmpvN5wLBM0uEX917zmAw50+OG0WmA17DDaVm0xdvdyxB sB9SVaDyt+YKIflv4ivwpLjp1SA5tXVrvITEBjI1eWzau90ZYBMi5ZAte40mZhxrVBAu PjoMzCFNI43Hlk1yGLBv6CEDWPXNRI8PvwEdlUDF0cHtkmi/wjwbkMfwp8ALR/IEcffY Lf8A== 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 a1si4963347pgq.594.2018.04.17.09.26.01; Tue, 17 Apr 2018 09:26:15 -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 S1755609AbeDQQJT (ORCPT + 99 others); Tue, 17 Apr 2018 12:09:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36018 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755306AbeDQQJQ (ORCPT ); Tue, 17 Apr 2018 12:09:16 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 44109BC4; Tue, 17 Apr 2018 16:09:14 +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.9 06/66] perf intel-pt: Fix error recovery from missing TIP packet Date: Tue, 17 Apr 2018 17:58:39 +0200 Message-Id: <20180417155646.123818842@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155645.868055442@linuxfoundation.org> References: <20180417155645.868055442@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit 1c196a6c771c47a2faa63d38d913e03284f73a16 upstream. When a TIP packet is expected but there is a different packet, it is an error. However the unexpected packet might be something important like a TSC packet, so after the error, it is necessary to continue from there, rather than the next packet. That is achieved by setting pkt_step to zero. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-4-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-decoder.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c @@ -1522,6 +1522,7 @@ static int intel_pt_walk_fup_tip(struct case INTEL_PT_PSBEND: intel_pt_log("ERROR: Missing TIP after FUP\n"); decoder->pkt_state = INTEL_PT_STATE_ERR3; + decoder->pkt_step = 0; return -ENOENT; case INTEL_PT_OVF: