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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FEF4C43334 for ; Sat, 18 Jun 2022 01:49:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383496AbiFRBtu (ORCPT ); Fri, 17 Jun 2022 21:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236052AbiFRBtt (ORCPT ); Fri, 17 Jun 2022 21:49:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB7766CA6 for ; Fri, 17 Jun 2022 18:49:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D23AEB82C0B for ; Sat, 18 Jun 2022 01:49:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC361C3411B; Sat, 18 Jun 2022 01:49:43 +0000 (UTC) Date: Fri, 17 Jun 2022 21:49:42 -0400 From: Steven Rostedt To: Linyu Yuan Cc: Masami Hiramatsu , Tom Zanussi , Ingo Molnar , Subject: Re: [PATCH v5 1/3] tracing: eprobe: remove duplicate is_good_name() operation Message-ID: <20220617214942.1dbfb55b@gandalf.local.home> In-Reply-To: <1655168698-19898-2-git-send-email-quic_linyyuan@quicinc.com> References: <1655168698-19898-1-git-send-email-quic_linyyuan@quicinc.com> <1655168698-19898-2-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jun 2022 09:04:56 +0800 Linyu Yuan wrote: > traceprobe_parse_event_name() already validate group and event name, > there is no need to call is_good_name() after it. > > Acked-by: Masami Hiramatsu (Google) > Signed-off-by: Linyu Yuan > --- > v2: drop v1 change as it is NACK. > add it to remove duplicate is_good_name(). > v3: move it as first patch. > v4: no change > v5: add Acked-by tag > > kernel/trace/trace_eprobe.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c > index 7d44785..17d64e3 100644 > --- a/kernel/trace/trace_eprobe.c > +++ b/kernel/trace/trace_eprobe.c > @@ -878,16 +878,12 @@ static int __trace_eprobe_create(int argc, const char *argv[]) > sanitize_event_name(buf1); > event = buf1; > } > - if (!is_good_name(event) || !is_good_name(group)) > - goto parse_error; > Tom replied that the above may be an issue. You ignored his response. -- Steve > sys_event = argv[1]; > ret = traceprobe_parse_event_name(&sys_event, &sys_name, buf2, > sys_event - argv[1]); > if (ret || !sys_name) > goto parse_error; > - if (!is_good_name(sys_event) || !is_good_name(sys_name)) > - goto parse_error; > > mutex_lock(&event_mutex); > event_call = find_and_get_event(sys_name, sys_event);