Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759938AbbEEQKP (ORCPT ); Tue, 5 May 2015 12:10:15 -0400 Received: from mail.kernel.org ([198.145.29.136]:35859 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2993383AbbEEP0i (ORCPT ); Tue, 5 May 2015 11:26:38 -0400 Date: Tue, 5 May 2015 12:26:32 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: Wang Nan , ast@plumgrid.com, davem@davemloft.net, mingo@redhat.com, a.p.zijlstra@chello.nl, jolsa@kernel.org, lizefan@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com, hekuang@huawei.com Subject: Re: [RFC PATCH 01/22] perf: probe: avoid segfault if passed with ''. Message-ID: <20150505152632.GU10475@kernel.org> References: <1430391165-30267-1-git-send-email-wangnan0@huawei.com> <1430391165-30267-2-git-send-email-wangnan0@huawei.com> <5548CF11.9000400@hitachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5548CF11.9000400@hitachi.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 36 Em Tue, May 05, 2015 at 11:09:21PM +0900, Masami Hiramatsu escreveu: > On 2015/04/30 19:52, Wang Nan wrote: > > Since parse_perf_probe_point() deals with a user passed argument, we > > should not assume it to be a valid string. > > > > Without this patch, if pass '' to perf probe, a segfault raises: > > > > $ perf probe -a '' > > Segmentation fault > > This patch checks argument of parse_perf_probe_point() before > > string processing. > > After this patch: > > $ perf probe -a '' > > > > usage: perf probe [] 'PROBEDEF' ['PROBEDEF' ...] > > or: perf probe [] --add 'PROBEDEF' [--add 'PROBEDEF' ...] > > ... > This looks OK to me. > Acked-by: Masami Hiramatsu > Could you split this as an independent bugfix with my ack? You mean split from this patchkit? I already did that, added it to my perf/urgent branch, where I'll add your acked-by as well, - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/