Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3711509ybi; Mon, 29 Jul 2019 11:13:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzR1HREBgWm5r4hz/0wl7aJ6A0S/ZqEyHSU5/neaertOD8Cd8PzaH6rlmZWJoV1EOXGr+N X-Received: by 2002:a17:902:8205:: with SMTP id x5mr113051839pln.279.1564424001538; Mon, 29 Jul 2019 11:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564424001; cv=none; d=google.com; s=arc-20160816; b=wN3WW66ol7daNXURg/1ivwS62T88+Vr6qqbntWxItArE7HLxJwa+AjsbQc4IxMGV2N 08V3Guw2FWR6OH+43C/1+ZMZj7gmjTq5kAc1AHN6A/qcAJYHuoKn22ixCvnH50ltexKW uH8owO56IUXAYpfVdBLDE0pEEGonO6OXn92v3FmSKxDgi2iwJrYM2BIWDuNhAsSpSFzE e6c4jEwW3IaOQpLwgdHZRkDkpQFjDQMKeYqXwhHCFoG/fM9WF7JMdSb481A+O7kZfQV6 esvHYK/lXli2FBMyvmke2u61d2SvpcHpN1yEPU+stDpeXcDEruVS0pTNpngYyQPXTkW8 JfaA== 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 :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=GGm6OI70suTpFjV7qqNRDI5ovSLydBxQ6ymCIyOGOuM=; b=qiCCDlQI2rzH8lFSH3RG8VH6xPdVjJyuRoQglk7dIQwDOHTWrDZoN9ngJKPPOzGESC oHE7saltAr6dkNURsyoCDkfslPSTgEfnddOdEIuacb+ZhQD2OIT7g+p2zuhJKDERFjtc 27xNJIVYIJ/lcej5EyUj87p6+0ya7WDxwY2UMJSJttXUXY17tF+W2I0n9SC5ve0WMr/W eUFQpe5hYPKdsAKhh+thu/gKLp6YNBKM5IDAgAsxI5TSbR09uyvuX0FMOSK/+n+kEhLS jScMzw2JDBMopAT2BiMga2Tixlv+IUKEn0x86diodUYK/4IprYsQZWvN6rt7FOYrODBJ O/rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maine.edu header.s=google header.b=XukWqnN+; 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 b7si28829915pfp.4.2019.07.29.11.13.06; Mon, 29 Jul 2019 11:13:21 -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; dkim=pass header.i=@maine.edu header.s=google header.b=XukWqnN+; 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 S2387632AbfG2PDg (ORCPT + 99 others); Mon, 29 Jul 2019 11:03:36 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:37222 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728494AbfG2PDg (ORCPT ); Mon, 29 Jul 2019 11:03:36 -0400 Received: by mail-qk1-f196.google.com with SMTP id d15so44325432qkl.4 for ; Mon, 29 Jul 2019 08:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maine.edu; s=google; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=GGm6OI70suTpFjV7qqNRDI5ovSLydBxQ6ymCIyOGOuM=; b=XukWqnN+f7ASzP5xRS7xN7QmRS+fXyMi9aH+eIpObdFSFmM2Gwij6HW9xnCcGW2VFJ 0YVbOT+7tMf7rh/VIU4tRsqaFhkPC087YYO46peiQmEZm7rEYjEsOKMMguuBrnskL2zs 97Nu8ezE53m/foi6CrL4xGRPzJXyMEJvZD3aw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=GGm6OI70suTpFjV7qqNRDI5ovSLydBxQ6ymCIyOGOuM=; b=ghIlV9ycyC32mLFPTVhtMCYnt5s9MVUMzPqSb6a46MH4dum3IjYXQb7EN0Kv4Sp9OZ FMMsxQihwOfmwwP7n4pbqYwgD/PJd6TpAMkbGgBMXoEhYM/v1gvyWrTZSJDvaVtzDY8a HZ3qxxns1JZjfh2CMK3fWm4C9kpTvohXNCuyHOiu0LGQX0I7AP0p6T4DB1kAMv1eZh0z 0i0xLpktg/kM1ywAc/I4YNFMKEL4b4YZcr7Y1D976eux3kezRSZerb7PoSdIEK9Kck5p 4fYMjH9aA+wxX7fb9zcMk8gxqplJ8e2KR53i+E+UXRUlMPm0sqy2Q8N05sjrW+iel2Wf coQw== X-Gm-Message-State: APjAAAWyyZUJ3PLEGVsMZ6Iikk2qT2AT2Q6x1ZsXMW2MHcyVrlkRz4cj Pj8brsGGFwimf456fEhqkUyPRseQfwc= X-Received: by 2002:a37:9d1:: with SMTP id 200mr71450094qkj.306.1564412615532; Mon, 29 Jul 2019 08:03:35 -0700 (PDT) Received: from macbook-air (weaver.eece.maine.edu. [130.111.218.23]) by smtp.gmail.com with ESMTPSA id u1sm34198651qth.21.2019.07.29.08.03.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 08:03:34 -0700 (PDT) From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Mon, 29 Jul 2019 11:03:26 -0400 (EDT) X-X-Sender: vince@macbook-air To: Arnaldo Carvalho de Melo cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim Subject: Re: perf: perf report stuck in an infinite loop In-Reply-To: <20190726211415.GE24867@kernel.org> Message-ID: References: <20190726211415.GE24867@kernel.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Jul 2019, Arnaldo Carvalho de Melo wrote: > Em Fri, Jul 26, 2019 at 04:46:51PM -0400, Vince Weaver escreveu: > > > > Currently the perf_data_fuzzer causes perf report to get stuck in an > > infinite loop. > > > > >From what I can tell, the issue happens in reader__process_events() > > when an event is mapped using mmap(), but when it goes to process the > > event finds out the internal event header has the size (invalidly) set to > > something much larger than the mmap buffer size. This means > > fetch_mmaped_event() fails, which gotos remap: which tries again with > > the exact same mmap size, and this will loop forever. > > > > I haven't been able to puzzle out how to fix this, but maybe you have a > > better feel for what's going on here. > > Perhaps the patch below? yes, with the patch you provided I can no longer trigger the infinite loop. Tested-by: Vince Weaver