From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C417FC0650E for ; Wed, 3 Jul 2019 18:18:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EB3F2064A for ; Wed, 3 Jul 2019 18:18:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ssWV9ssH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EB3F2064A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3vA6Emo2bkNSyOYohQC+quHCjEuzAPe5ieiJjt7r80Q=; b=ssWV9ssH/HE0lK +PwVkBEZZQRfkC0s0mb2CtrUKaK36G5DfFEn7c6nsbX7KgiQy+//hhN1ztbJal5+NHjiO43zHnWDS AxVmqPZAhG+TMdIYhQEbV02QVy5fnYTmyjqpKUakKWlz53P/JEEE07iG+S40y8KpSvTsoJcdMMLEK 7ZME7Vj9qrvDIbu7fy/HdMpYjiLd7muvZCbOiFifftZ+6X6zo1+FC75lInbYl82FLy5yuXz8FeCPj eiVkhCAx6pzXMUs22TW1zL5MKX3VE7brqAldeW6W6+gY0bppwUx5emglGxUOy2enkPwUC5SbhQMn+ cVslcmlZ3gTUtw4fwe/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hijpq-0006IS-2v; Wed, 03 Jul 2019 18:18:26 +0000 Received: from [177.195.209.182] (helo=quaco.ghostprotocols.net) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hijpm-0006IA-8T; Wed, 03 Jul 2019 18:18:23 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A69A741153; Wed, 3 Jul 2019 15:18:15 -0300 (-03) Date: Wed, 3 Jul 2019 15:18:15 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Subject: Re: [PATCH v1 00/11] perf: Fix errors detected by Smatch Message-ID: <20190703181815.GB10740@kernel.org> References: <20190702103420.27540-1-leo.yan@linaro.org> <20190702110743.GA12694@krava> <20190703014808.GC6852@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190703014808.GC6852@leoy-ThinkPad-X240s> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.11.3 (2019-02-01) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Song Liu , Peter Zijlstra , Rasmus Villemoes , linux-kernel@vger.kernel.org, Jin Yao , Jiri Olsa , Andi Kleen , Eric Saint-Etienne , Konstantin Khlebnikov , Ingo Molnar , Suzuki K Poulose , Alexios Zavras , Davidlohr Bueso , Namhyung Kim , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Mathieu Poirier , Thomas Richter , Adrian Hunter , Alexander Shishkin , "David S. Miller" , Changbin Du , Alexey Budankov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Wed, Jul 03, 2019 at 09:48:08AM +0800, Leo Yan escreveu: > On Tue, Jul 02, 2019 at 01:07:43PM +0200, Jiri Olsa wrote: > > On Tue, Jul 02, 2019 at 06:34:09PM +0800, Leo Yan wrote: > > > When I used static checker Smatch for perf building, the main target is > > > to check if there have any potential issues in Arm cs-etm code. So > > > finally I get many reporting for errors/warnings. > > > > > > I used below command for using static checker with perf building: > > > > > > # make VF=1 CORESIGHT=1 -C tools/perf/ \ > > > CHECK="/root/Work/smatch/smatch --full-path" \ > > > CC=/root/Work/smatch/cgcc | tee smatch_reports.txt > > > > > > I reviewed the errors one by one, if I understood some of these errors > > > so changed the code as I can, this patch set is the working result; but > > > still leave some errors due to I don't know what's the best way to fix > > > it. There also have many inconsistent indenting warnings. So I firstly > > > send out this patch set and let's see what's the feedback from public > > > reviewing. > > > > > > Leo Yan (11): > > > perf report: Smatch: Fix potential NULL pointer dereference > > > perf stat: Smatch: Fix use-after-freed pointer > > > perf top: Smatch: Fix potential NULL pointer dereference > > > perf annotate: Smatch: Fix dereferencing freed memory > > > perf trace: Smatch: Fix potential NULL pointer dereference > > > perf hists: Smatch: Fix potential NULL pointer dereference > > > perf map: Smatch: Fix potential NULL pointer dereference > > > perf session: Smatch: Fix potential NULL pointer dereference > > > perf intel-bts: Smatch: Fix potential NULL pointer dereference > > > perf intel-pt: Smatch: Fix potential NULL pointer dereference > > > perf cs-etm: Smatch: Fix potential NULL pointer dereference > > > > from quick look it all looks good to me, nice tool ;-) > > > > Acked-by: Jiri Olsa > > Thanks for reviewing, Jiri. > > @Arnaldo, Just want to check, will you firstly pick up 01~05, 07, > 08/11 patches if you think they are okay? Or you want to wait me to > spin new patch set with all patches after I gather all comments? I'm picking up the uncontrovertial, will push to my perf/core branch, continue from there, please. - Arnaldo > Thanks, > Leo Yan > > > > tools/perf/builtin-report.c | 4 ++-- > > > tools/perf/builtin-stat.c | 2 +- > > > tools/perf/builtin-top.c | 8 ++++++-- > > > tools/perf/builtin-trace.c | 5 +++-- > > > tools/perf/ui/browsers/hists.c | 13 +++++++++---- > > > tools/perf/util/annotate.c | 6 ++---- > > > tools/perf/util/cs-etm.c | 2 +- > > > tools/perf/util/intel-bts.c | 5 ++--- > > > tools/perf/util/intel-pt.c | 5 ++--- > > > tools/perf/util/map.c | 7 +++++-- > > > tools/perf/util/session.c | 3 +++ > > > 11 files changed, 36 insertions(+), 24 deletions(-) > > > > > > -- > > > 2.17.1 > > > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel