Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp968423iog; Fri, 17 Jun 2022 19:12:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uFeoWeFN8DvOkobup6ig7YzTuRTYvzO9TjYtHKLpl+N2HvUH+Fqg7GTGzmQDBe0rWdTf18 X-Received: by 2002:a05:6a00:2490:b0:51b:f709:ebbc with SMTP id c16-20020a056a00249000b0051bf709ebbcmr12852730pfv.43.1655518374460; Fri, 17 Jun 2022 19:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655518374; cv=none; d=google.com; s=arc-20160816; b=LTZLSOfmfvderRlF1LfdWqWQcR6nW1xkAVfaPN7ta93i/rPSxCCsogit+XKDsPRdz7 LU/o863MAdzZm2LI60/h7FgSfHfSQWgswj2YsMAdmb/V0qz6HpDaDKAH8sBdOVkKaVNW eVv2l35aRYyJqbAIpSNACEo9Ic66SGReOmOtzt0+sM/g4vhNuzKLtfIcReBznRYqL093 i7hdc3Qs9qdUG9GUOO6LfQelJBRvI3kU+Fpk81O7axBANZMcLij2/miEJz4fCHWQgm7D 5bazCnUk9Nb2X0kCVSc7YDFOC9LSkgarzQsWoM9GseBj6QNFgfpqvG9AN9zEKgfXqFnC YNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=VQD4TX4zEArbCMwvz1OWgq+/MgLdGPZggaIrHQS57Xc=; b=ilIioPfotS16NwI9x7fh5dtEGqb8tTUdyeVTuOGb6AFg8r6RlVTHsb04vkM6hMRb6V CNS8KpNruxA9Rq9xqFeCegII9u4HrI3IbugLn2VqH7jIWrxDH1GtvdrBFFcixlaIjshZ 5Uywf5xTiaDw0ITDO0s4kEiHGIg0uOoTYmsoOptRnfQ8yTE4G4V9wigDDisEv18XPcCv dIjmurmrzUpBSC3kSwZD8sdjzmKkbgMGNEX4zwGnqq+y86H90/J75I5kH6n7fqRT8KBk eTlXezS1YiN7hW9TKOrNZ7qrlAYQhJykPNC26WD8bhHfo6BZN6psbelGgrukobJf1ltl ViDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a056a00248a00b0050dfc410ab6si7634407pfv.142.2022.06.17.19.12.43; Fri, 17 Jun 2022 19:12:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383234AbiFRBtu (ORCPT + 99 others); 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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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);