Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5857429ioo; Wed, 1 Jun 2022 14:14:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2VX1akWjpmM9dAhb0mf2Ngqo1GojcovukvDs9GcjKEN6W+8GO8QcvvqLm3kb7oRpSUbY+ X-Received: by 2002:a17:90a:e7c5:b0:1e3:3cf1:6325 with SMTP id kb5-20020a17090ae7c500b001e33cf16325mr1384989pjb.178.1654118089154; Wed, 01 Jun 2022 14:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118089; cv=none; d=google.com; s=arc-20160816; b=I1pHRRGUjcQ8a8rrtpvnz3FmtGv1Z1WyKVBUIixGeW0rCWqRPDtRyWvKppPhVrSrm6 X+Z0d6rcNbAtlxUHSNAFfD4oJyKkour473uPm4eMIZHESjG+kEjmGB/jF1apujYOqElP gYKfOFjQ6/XWuO1iKxVJXzpktNvtGOEKmApC6ERUDlA2dqbG8Qf+No7QoCGW11S0pQ06 ashEw8hpZyQRMm5vgs8maN+nB6LY1FJZLgUgZcA9GqxL/yplyrpTQUIWV+y8z8MmEZk+ pz/sakrVGCNK+axlSXD3nmCMA2vyn3sg/S9p/sasucxlhkblMakUU/MsRibqQVG93MpB Or6w== 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:date:subject:cc:to:from :dkim-signature; bh=M4Rg0ZyyxbJnHEdsOkdSEJv83ADIxaBkmdXmyny7TJY=; b=G1atGgYF2QoAhBGYm8U5vOiWweWtlJGj2aDZhMXQwre4/7yL4f+fU/QWTIt8rV9VTW qKhWM3GDS0VsPSUQ0nM+S9Y+F1XcsW6qUy7lyZIPoag3Sea1ozKoYHME7MaFwpBe16Y4 kwVspJpgg5ZpdYOZPbW1iLUo0P8KteostPSKm4E1bvLkhJiuEU9Ll0gL3WrkqTVrmKGe rons6rteP5TwiKVkmzpvhpfTDSWBxNLG2bhxaDvwIc3RgSCsoPEBHIe8yP4az7ZNg6cy CmDCboCe3N7ilD8bmn9Rn4gXvvKNVljvPpQ4YveJ9QALNRXHEcEDhjqIZUw2x3PlFfXm tZcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="glsU/2q5"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j6-20020a17090a7e8600b001e09b7beb09si3181780pjl.49.2022.06.01.14.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:14:49 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="glsU/2q5"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B9482D898E; Wed, 1 Jun 2022 13:05:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244300AbiEaG3b (ORCPT + 99 others); Tue, 31 May 2022 02:29:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232025AbiEaG3W (ORCPT ); Tue, 31 May 2022 02:29:22 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F24D266ACA for ; Mon, 30 May 2022 23:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653978561; x=1685514561; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M4Rg0ZyyxbJnHEdsOkdSEJv83ADIxaBkmdXmyny7TJY=; b=glsU/2q5wwLwuXeQka8D0Ych2/AexG7+MLOV+d3m5b3CrHEBIIzhfg9e enz73PhCuYioR7NRfPKMH2Ee07OqlrHaukU3NKVugPUH8WEtXGMqyrvuM xTRaDCQOhq3iG1/vKaBlq7UiCYgpup9oHFLdS/lyoyO4v3eRXgfEuh84p I=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 30 May 2022 23:29:21 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 23:29:20 -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; Mon, 30 May 2022 23:29:19 -0700 Received: from linyyuan-gv.qualcomm.com (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; Mon, 30 May 2022 23:29:17 -0700 From: Linyu Yuan To: Steven Rostedt , Masami Hiramatsu , Tom Zanussi , Ingo Molnar CC: , Linyu Yuan Subject: [PATCH v3 1/3] tracing: eprobe: remove duplicate is_good_name() operation Date: Tue, 31 May 2022 14:29:10 +0800 Message-ID: <1653978552-18637-2-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1653978552-18637-1-git-send-email-quic_linyyuan@quicinc.com> References: <1653978552-18637-1-git-send-email-quic_linyyuan@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 traceprobe_parse_event_name() already validate group and event name, there is no need to call is_good_name() after it. 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. 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; 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); -- 2.7.4