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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A45DAC54FD0 for ; Mon, 27 Apr 2020 08:16:42 +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 5239A2051A for ; Mon, 27 Apr 2020 08:16:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZCbicOKZ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VlofaGkR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5239A2051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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=h1/0/dxaMB5Doq0HzeXrnzV1n2f/miV155WZq17R0+g=; b=ZCbicOKZxrpLXm xmtPsBq+Hw3jGSyO7P2Oj9kwilDTsHz9Rt2DMeo3EFQUWnDQ2rqaZaUBDhBD9CFNGEmAQ0xMUBuYz 9lSjcOCzthVEm62CXKW1/WE28iD9Qcb4sigLugQ3L+e02SwMV6soqiqQcVP+u0YoNHAP2O5lCJVbQ 7zHkdo6GAULA58kFxhB1GigWs+8v2R1zjLvlEhW/mo/k+pFEUqq4MJlf/Wnp5rER2XokVfSlRBoHO MGC+7gZV6dHiIiBbtnCliDCUgIRgL3hAOYNsoG5P4JLPJqHA5dBXGJwK1ZzWEWLxnWZEIXwM8zxqN zPUBg8ks/KwUM9INa0QQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jSywT-00023Q-9c; Mon, 27 Apr 2020 08:16:41 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jSywQ-00022Y-1j for linux-arm-kernel@lists.infradead.org; Mon, 27 Apr 2020 08:16:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587975395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CrUCqEccXog6ceJqozxwcXd9+SC0GQqpdsx1sfvo64g=; b=VlofaGkRZwzAhc78aQl9GTdxG2oGzglOD8DDPnrYTivdx2XhG9jjoghm/uxEKNG5xRMG6p htokC4fCVcisgsId0zsCi7/qJS8Ikg1XJpFUtogYmNeqyy3/VH0F563onmvvb4VSQ36jKK Rk+SOYVm0sf0x2THKfzJw3PxggzSJbg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-96OCTOndNQy3OiO-jA86qg-1; Mon, 27 Apr 2020 04:16:32 -0400 X-MC-Unique: 96OCTOndNQy3OiO-jA86qg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 647908015CE; Mon, 27 Apr 2020 08:16:30 +0000 (UTC) Received: from krava (unknown [10.40.195.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E219D5D9DA; Mon, 27 Apr 2020 08:16:26 +0000 (UTC) Date: Mon, 27 Apr 2020 10:16:24 +0200 From: Jiri Olsa To: John Garry Subject: Re: [RFC PATCH v2 01/13] perf parse-events: Fix comparison of evsel and leader pmu name Message-ID: <20200427081624.GA1431639@krava> References: <1587120084-18990-1-git-send-email-john.garry@huawei.com> <1587120084-18990-2-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1587120084-18990-2-git-send-email-john.garry@huawei.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200427_011638_166376_FD5C1904 X-CRM114-Status: GOOD ( 17.12 ) 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: mark.rutland@arm.com, irogers@google.com, ak@linux.intel.com, qiangqing.zhang@nxp.com, peterz@infradead.org, robin.murphy@arm.com, linuxarm@huawei.com, acme@kernel.org, linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com, alexander.shishkin@linux.intel.com, mingo@redhat.com, namhyung@kernel.org, will@kernel.org, linux-arm-kernel@lists.infradead.org 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 On Fri, Apr 17, 2020 at 06:41:12PM +0800, John Garry wrote: > Since we now strdup() the pmu name for the event selector, use strcmp() > instead of pointer equality for comparison. > > Fixes: d4953f7ef1a2 ("perf parse-events: Fix 3 use after frees found with clang ASANutil/parse-events.c") > Signed-off-by: John Garry I don't ee this change in your branch: private-topic-perf-5.6-sys-pmu-events-v2-upstream do you have some updated tree? thanks, jirka > --- > > I am not 100% sure that this is the right fix.... > > tools/perf/util/parse-events.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c > index 10107747b361..90ddade1ba23 100644 > --- a/tools/perf/util/parse-events.c > +++ b/tools/perf/util/parse-events.c > @@ -1629,7 +1629,7 @@ parse_events__set_leader_for_uncore_aliase(char *name, struct list_head *list, > * event. That can be used to distinguish the leader from > * other members, even they have the same event name. > */ > - if ((leader != evsel) && (leader->pmu_name == evsel->pmu_name)) { > + if ((leader != evsel) && !strcmp(leader->pmu_name, evsel->pmu_name)) { > is_leader = false; > continue; > } > -- > 2.16.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel