Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp468915ybi; Fri, 26 Jul 2019 12:56:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgDJE+47KW85wOeMjQ6TvTuZOO+lsYXEaRjfnG8jXizX8xwE8CJ5GJ5zw9e7fEpz1+IYjf X-Received: by 2002:a17:90a:6546:: with SMTP id f6mr53504401pjs.11.1564170992645; Fri, 26 Jul 2019 12:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564170992; cv=none; d=google.com; s=arc-20160816; b=Xa/JDE/BE/BhBqyC6AolecCNgASH8149Ovn5+Ge/3jPks126YCnhlAtLqqZPbMO8Pr fWV2y4M1dxzXtBXoYlBdF5E3X6KMrSHfwgxk32PJokMRaN/5Kd4j6W13QPdZM0RBEPq2 hKx0r2Z2Hjfh4gwbYK7ePJ6xvvAWWpJsZ+HE21oI09tXVhhxE0BeQtjj2Nnw6iyBW6gm Gi+Pt6mb77q3epHa0Kt/DHwuDvfadQ4Vd7826b/00MivsZUtYn8/blgxZHPcOKf0xqFv 0JKuyqzhghmgbnQylrsBBBjjy1NDGII0Reyawbj+9ZeqiIthduLRSqvhNUGfh11Glef5 Mcpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=gX3Eb+Fjvx8r5No+CO4k0lYtNXprjjGKTOuHlUYQHqU=; b=sEX1Vpy93GrnRxXViAQ5Ca2Z4ms11xOKnnHdBFHG/3vJ314EWqkZUvIOkeYpfz0kyI LExphnuW/3/KhCjeu7WMs4j0bBBXeHSrVJ8DxuM7QuBybLk9aRAGgIJstNNvVgKPzegc 1WiNHIB7OJJTQv5OTk7oPV2CV0UfwHOjcM3oOPxxMuVnpoK6vKiv/MpZXVymTRdIaLJD iJB+y0KV7lTVhTJYQRYXs/z0l8O/w9VlOmb7F8a04NBxNxjE5rp+QjdTmEmCBrU44v5W yVC36Xx4B7SDEsrk8NKKUtGDOjaYBemx9uU1xzYCUCEAL5QC4uagP6doNnb3sTOOYvKM hz2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Z/5A5PY7"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si21532017plo.159.2019.07.26.12.56.17; Fri, 26 Jul 2019 12:56:32 -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=@gmail.com header.s=20161025 header.b="Z/5A5PY7"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388471AbfGZTKl (ORCPT + 99 others); Fri, 26 Jul 2019 15:10:41 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:39854 "EHLO mail-qt1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbfGZTKl (ORCPT ); Fri, 26 Jul 2019 15:10:41 -0400 Received: by mail-qt1-f173.google.com with SMTP id l9so53635317qtu.6 for ; Fri, 26 Jul 2019 12:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gX3Eb+Fjvx8r5No+CO4k0lYtNXprjjGKTOuHlUYQHqU=; b=Z/5A5PY7jKNpx8muq/lBXWCc/tBIo+d73kBSLnbN1AtOx94n69lUZZJmwNDVOMUqtO 7CJsl7KfqmBqVVBsdnXHTUJ/zKzLkkHbMkn56EH5ANHwjwucJ7GeSfRvQ1Brd1nuoCX9 MohYl6xeOveKsfmuY/xFNai6AnVodsRXUgCCfHrQyloPmvnuTHr4SIO+whYeHBG0wPGX U3RF8/hVVEABrImG3jd1Tb5qLnQv4zuOclzlum7o1MHz6hQeC41hScHwmqeJHOj5h4fq GpWOQvyImtpZRwwnIiAbsFAprlQbwZOzQ0OREzNlhK0+oM10LyjzYKgl49HhgON5ojeO DULA== 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:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gX3Eb+Fjvx8r5No+CO4k0lYtNXprjjGKTOuHlUYQHqU=; b=E9JKVJ+YfjMIjARwS3A20jRubg54Xb8SA+BDU6aJn/vAFx2RvL3HWfB/LX/G8SiJNq VWS7/tyVdWb6CnLWvadJn5QQR9qz6csMGm8KilTqk1ixz9FxC2YG4JrvMwiUloXK011J PH0RbUwkO9rSFK+IieDUzWoX9dSUOY3yxvavXXL9Xf6f7XAwuY8BWAJ7ZAiGrWrAwxhV wWKGOrbdZzPkGQNgxduk02MqUQvjB6Tbxb9Ob+vzgcldoQlJB4ucbrKj9mVMlE74m6ZJ hHQjfX0aeJVU/eGXhz4MR7AGKdbxicWVo5sjoSsXhLTLev0ucDdwih5OO+LfHBCib6ME lQUA== X-Gm-Message-State: APjAAAVRSSc1V8Lkg36aDDagvltp8pLz0m1kMOYPAfXLt2HlYXQRFyH4 /XsJtCzN981D8ssJQv8lyVo= X-Received: by 2002:ac8:374b:: with SMTP id p11mr66461662qtb.316.1564168240415; Fri, 26 Jul 2019 12:10:40 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.35.50]) by smtp.gmail.com with ESMTPSA id p59sm25060392qtd.75.2019.07.26.12.10.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 26 Jul 2019 12:10:39 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id B95BC40340; Fri, 26 Jul 2019 16:10:37 -0300 (-03) Date: Fri, 26 Jul 2019 16:10:37 -0300 To: Vince Weaver Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim Subject: Re: [patch] perf report segfault with 0-sized strings Message-ID: <20190726191037.GE20482@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 25, 2019 at 03:04:32PM -0400, Vince Weaver escreveu: > > probably all perf_header_strings are affected by this. The fuzzer just > tripped up cmdline now, which needs this fix. I think we have to catch this earlier, i.e. when processing each feature, lemme check... - Arnaldo > Signed-off-by: Vince Weaver > > diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c > index c24db7f4909c..631aa1911f3a 100644 > --- a/tools/perf/util/header.c > +++ b/tools/perf/util/header.c > @@ -1427,6 +1430,8 @@ static void print_cmdline(struct feat_fd *ff, FILE *fp) > > fprintf(fp, "# cmdline : "); > > + if (ff->ph->env.cmdline_argv==NULL) return; > + > for (i = 0; i < nr; i++) { > char *argv_i = strdup(ff->ph->env.cmdline_argv[i]); > if (!argv_i) { -- - Arnaldo