Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752725AbbEDUz3 (ORCPT ); Mon, 4 May 2015 16:55:29 -0400 Received: from mail.kernel.org ([198.145.29.136]:36124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbbEDUy7 (ORCPT ); Mon, 4 May 2015 16:54:59 -0400 Date: Wed, 29 Apr 2015 19:23:33 -0300 From: Arnaldo Carvalho de Melo To: Wang Nan Cc: jolsa@kernel.org, dsahern@gmail.com, paulus@samba.org, a.p.zijlstra@chello.nl, lizefan@huawei.com, linux-kernel@vger.kernel.org, mingo@kernel.org Subject: Re: [PATCH] perf: probe: avoid segfault if passed with ''. Message-ID: <20150429222333.GE29633@kernel.org> References: <1430210769-94177-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430210769-94177-1-git-send-email-wangnan0@huawei.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: 869 Lines: 28 Em Tue, Apr 28, 2015 at 08:46:09AM +0000, Wang Nan escreveu: > 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' ...] > ... Thanks, applied to perf/urgent. - 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/