Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp816826ybx; Wed, 6 Nov 2019 08:51:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyXwkdaqZFnuk/Y4yHUaxMcbFcjjcbMFtWHcPVHZEeh45Tm2WyaTebtYk+IiDzXrfsPJtS/ X-Received: by 2002:aa7:cd54:: with SMTP id v20mr3781600edw.203.1573059074087; Wed, 06 Nov 2019 08:51:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573059074; cv=none; d=google.com; s=arc-20160816; b=Nf38IvnKyDmHEhU+q+Y+sUEFNAQrvm056j8DSybpTlHn4NEeB+opDMVC8O6iMN53xl TvUCGG8sI7OkOiMBzAgJsLLDhFkG4bgNUukv+PfpJ/QZX+ZApiqJ8rhNF4Qm18vX/GGa E1mBEWy+nRWXZ+XyK1nPqVgtNj8pFDnYzX1Wj4NMkbvKYq0z5LmvVHIM4bNdSLb3JSQP J4iZVyZYGJMuQfmVzkNIr0x3Qi94JzvsjgwYz9HzqYEJPdC4AXdzrTA4wKyLt70Bhk4Q OZb9G+5UHqRFgYeLMPWoPVnKtrWWaS2ynmPVq1nwSSjzQlSGEnjwYJf4y8HNS8kQdhcC 8rCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=bdpB6R5GwKSF5Yr/ZUcuAk2wXiWpnKiustIsH4amKd4=; b=M05rnLv+u+ZygPKA/TD11d+ssh1kGDD8JzbXjoe8nHrS1K1wnIlAV9a+nInIvRywl9 1SnTaISiXaZIddy1X31gyxh+UMUHd2wn6L+W1kiyLBiXVxy4GV5R8WrtoXtFaq/XdNpB nnx5vxTKiLO3olvSOlIyJq3fMzKtjVEXqMN6bFyssYbwl0LGNfnSdOZ+27864IDaFEi8 yIWZVcrZakrcio9nssXVgjhvtNJinhhO906wgaUuJmxQzvVaWlHew46l0Pj4tow+5m8o 1Xj8V68zNXamjg0xBtN/TxGeuRae/eE8ldrViGJfHEt5d5uGvS8n4ZWObjS3TR2BYI1z 2GNg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si13258729edj.414.2019.11.06.08.50.50; Wed, 06 Nov 2019 08:51:14 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732324AbfKFQuI (ORCPT + 99 others); Wed, 6 Nov 2019 11:50:08 -0500 Received: from mga11.intel.com ([192.55.52.93]:37943 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728832AbfKFQuI (ORCPT ); Wed, 6 Nov 2019 11:50:08 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 08:50:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,275,1569308400"; d="scan'208";a="214301961" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP; 06 Nov 2019 08:50:07 -0800 Received: from [10.251.82.133] (abudanko-mobl.ccr.corp.intel.com [10.251.82.133]) by linux.intel.com (Postfix) with ESMTP id 0EDA0580A3E; Wed, 6 Nov 2019 08:50:04 -0800 (PST) Subject: Re: [RFC] perf session: Fix compression processing To: Jiri Olsa , Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Namhyung Kim , Andi Kleen , linux-kernel References: <20191103222441.GE8251@krava> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Wed, 6 Nov 2019 19:50:03 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191103222441.GE8251@krava> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.11.2019 1:24, Jiri Olsa wrote: > hi, > I'm not sure I follow everything on compression, > so I might have missed something, but patch below > fixes the issue for me. > > jirka > > > --- > The compressed data processing occasionally fails with: > $ perf report --stdio -vv > decomp (B): 44519 to 163000 > decomp (B): 48119 to 174800 > decomp (B): 65527 to 131072 > fetch_mmaped_event: head=0x1ffe0 event->header_size=0x28, mmap_size=0x20000: fuzzed perf.data? > Error: > failed to process sample > ... > > It's caused by recent fuzzer fix that does not take into account > that compressed data do not need to by fully present in the buffer, > so it's ok to just return NULL and not to fail. > > Fixes: 57fc032ad643 ("perf session: Avoid infinite loop when seeing invalid header.size") > Link: http://lkml.kernel.org/n/tip-q1biqscs4stcmc9bs1iokfro@git.kernel.org > Signed-off-by: Jiri Olsa > --- > tools/perf/util/session.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) I am on vacations currently, getting back on Monday (11/11). Please expect delay in response. ~Alexey