Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2465009iog; Sun, 19 Jun 2022 18:59:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vqOvdU+BGhDwBXGoJaKGIBi2UTU/9e0QABaf5ZCFBmUadVN9EJwmO7UL7wrwRqNkksMy1z X-Received: by 2002:a63:4854:0:b0:3fd:696e:b48f with SMTP id x20-20020a634854000000b003fd696eb48fmr19712707pgk.281.1655690343922; Sun, 19 Jun 2022 18:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655690343; cv=none; d=google.com; s=arc-20160816; b=wa82UhfKRnPaNRqr99mtpE3RfPu/xJuC0uuNCss+EQNLm2HyUQG/nBbkFiKoCZYVjb MufeKR+2DZ8kgpwpUJwAL2JBybO8ZPOnvGG1Nk3ZdfSUyiHjfkyzkjXUTkbB+evva+ln WB7hBrm/Ygm0WEqMIhhZmNdBCOafvqxtrwo2ws96OEJiTnmlgQjyT/Z+c2MkhZ95a2oR MN6oqXfVBo7pGG5vbQA4oSaiGPURKNkcIxcQeH1Okjs/l6Olepj/+bQ8939111gTH1Uk 5sd/2Zw4oEWgSLWA+Pzc2qs7l1fd2G+y8jWpmZ/Gt5IkSBTYlavv3iKwtZZQCnwH7hS1 +2Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TuxIGco71jaVaJIEuquq4AaCuR5x1f2GY72Xc62P4Vw=; b=cJeOJbrE2Z2b23gYfgme4hAQFcKeiL1tbyhZJyEQpGeV0c0wyaGp8AhUjVNC8pjLEl 4rMTHpQUaqOsw7LZctuvMvHozAfJbBeJqSc2Eo1FSM4RIqixNx+4h50mBrizbRRYqBqy W7WuinYWtaZuIkRgUvn7rF8IBR9aO0a/MCSUWuJJVxGbwT90S7RcPD9G8fCDTPu9vyq5 EJWUG5HcTsdPfqVOfryJmwv8L0y98ac0TdVptdEnDcclmYsxkG3/AI57AKsALzAvCZoY /pJbgnLqo59XanfCB+BHTKWzRyqXMRRH2af715yU8dJDV15IhVnJ8qYp0KZCUc3GZs49 lahg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=cwdVLDae; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a63ce0b000000b0040503f6fc58si13358770pgf.292.2022.06.19.18.58.52; Sun, 19 Jun 2022 18:59:03 -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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=cwdVLDae; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237372AbiFTBDl (ORCPT + 99 others); Sun, 19 Jun 2022 21:03:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238056AbiFTBDi (ORCPT ); Sun, 19 Jun 2022 21:03:38 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 902315FC3 for ; Sun, 19 Jun 2022 18:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1655687016; x=1687223016; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=TuxIGco71jaVaJIEuquq4AaCuR5x1f2GY72Xc62P4Vw=; b=cwdVLDae/Yr+8lUkYl8S+0avr58Iei8GVEKrCBDahQ3MRa5BVB/W5LBL a4/9VXX5PMfnQ0jCD+/+SvRWpHDrHk51x6tcpcVY7qcQRunmSH8oNDmFi psSGLr3jhSYnC/CPoTt/QYZ3fuv+jZHIgvsoelbBuxn7Z5x8hXKT7CaPj Q=; Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-02.qualcomm.com with ESMTP; 19 Jun 2022 18:03:35 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-SD-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 18:03:35 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sun, 19 Jun 2022 18:03:35 -0700 Received: from [10.253.79.24] (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sun, 19 Jun 2022 18:03:33 -0700 Message-ID: Date: Mon, 20 Jun 2022 09:03:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v5 1/3] tracing: eprobe: remove duplicate is_good_name() operation Content-Language: en-US To: Steven Rostedt CC: Masami Hiramatsu , Tom Zanussi , Ingo Molnar , References: <1655168698-19898-1-git-send-email-quic_linyyuan@quicinc.com> <1655168698-19898-2-git-send-email-quic_linyyuan@quicinc.com> <20220617214942.1dbfb55b@gandalf.local.home> From: Linyu Yuan In-Reply-To: <20220617214942.1dbfb55b@gandalf.local.home> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 hi tom, On 6/18/2022 9:49 AM, Steven Rostedt wrote: > 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 > i reply his mail in V4 https://lore.kernel.org/lkml/d14f0409-351f-873e-b7ca-82ff444bf809@quicinc.com/, form my view, i think it is safe, in !event case Tom mentioned, we will generate event from SYSTEM.EVENT which is verified by traceprobe_parse_event_name(). Tom, could you review it again ? >> 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);