Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2536977iog; Sun, 26 Jun 2022 19:22:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujuH5WAG7aIhn1hEQNagjoDwlhKMdKj4STMNxZF7tA6PHnPwg93UN4jQZz5Uf1LbFWMEdO X-Received: by 2002:a17:906:a24b:b0:726:a7d2:922e with SMTP id bi11-20020a170906a24b00b00726a7d2922emr2006780ejb.183.1656296524660; Sun, 26 Jun 2022 19:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656296524; cv=none; d=google.com; s=arc-20160816; b=fg9isXm5qRciycNjhalZoscZhhr02q4A7546jEhKN9Akgci0bIerSqaML3qizwtlhV SMnR9VDVlvAWEz5F41FJUdc9hrMg8SxLy+bshx3AmCYlkge+68XT/DqRXrWPnjVK5dZG RMUGNjHHYRQJvfUsMWAI+kRd4x6zbjj0/1aiAmBFd8NfWRDYd+FaJjWC0EeSyibgDWGD iBmGrxYuF/xQg+j/XJmnUx7iZNK3Ig8R7ZkXMbAnE1z9vONGv+wzRiuKc73pri5fC/eU iLTAmTDALaXZdlSIFei6qiAuk3Ku6ZuM6W4o1sli/gBLRi5q2PFQzpes/jN20I4BWEgm X1tg== 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=ZOADVSvFWlwcn3svA+sGnjWnP7wCG1eDr3oTRjD+tgg=; b=DoBbIjApeyBohl3gSms/JlAL1Y3kLVFSFAuTCe2AWDLlwLdiJnU6u7nw2O+Ade0Kpi BaqAPAMNGBXDveUEOiASHNFtfhKcq4yVrXEvByuAvl914ad+tT9Ie1kL/ARbnYZvxFje dXStUm3Kg3/nooEDuSHAyfNwlZsRmTXy5L8tkO7daBj0VQm8YIR8Bwi4epzD8/GnPFXy rNT8EAwU7FZFl5wwQlmfc++IQ757V6J2M5iLLAvlbB2+W3q97ejwFBlZ5ZBWdY5xYqiY CfF0IRWlRtS5+ysyMOGa8Ds1eHHPOxzWbhKY8dM+ruVTjXOYDqAWauadIWmEx2PpqpRn D8Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=Txj7pRDM; 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 hv13-20020a17090760cd00b00718c7b4cc15si11769207ejc.103.2022.06.26.19.21.40; Sun, 26 Jun 2022 19:22:04 -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=Txj7pRDM; 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 S231561AbiF0CT2 (ORCPT + 99 others); Sun, 26 Jun 2022 22:19:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbiF0CTY (ORCPT ); Sun, 26 Jun 2022 22:19:24 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE142B8E for ; Sun, 26 Jun 2022 19:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656296363; x=1687832363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZOADVSvFWlwcn3svA+sGnjWnP7wCG1eDr3oTRjD+tgg=; b=Txj7pRDMEKMJH47EDpjKBHXs4s9ugWAHrxDECaHx1pV5sYBYF+0VuIp9 Un0znsB0BxoN7vIixETsBLrsn3drtgHLX56buYbuyNqPzx1Rohq2ocH10 A2Ey/QGASVqbDb6w9bTquqF0Yvo7MER7eMOFaFr8l157FGhSX8haNtt1Z s=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 26 Jun 2022 19:19:23 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2022 19:19:23 -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, 26 Jun 2022 19:19:22 -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; Sun, 26 Jun 2022 19:19:21 -0700 From: Linyu Yuan To: Steven Rostedt , Masami Hiramatsu , Tom Zanussi CC: , Linyu Yuan Subject: [PATCH v7 2/4] tracing: eprobe: remove duplicate is_good_name() operation Date: Mon, 27 Jun 2022 10:19:06 +0800 Message-ID: <1656296348-16111-3-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1656296348-16111-1-git-send-email-quic_linyyuan@quicinc.com> References: <1656296348-16111-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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 traceprobe_parse_event_name() already validate SYSTEM 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 v6: keep is_good_name() check for group and event name add trace_probe_log_set_index(1) to report correct error message. v7: move trace_probe_log_set_index() to seprate patch#1 kernel/trace/trace_eprobe.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c index b805b57..8979cb9e 100644 --- a/kernel/trace/trace_eprobe.c +++ b/kernel/trace/trace_eprobe.c @@ -887,8 +887,6 @@ static int __trace_eprobe_create(int argc, const char *argv[]) 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