Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp171949rdb; Wed, 1 Nov 2023 23:04:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFfcR2boS1m24ecY0jynl/JF9HZP3AxPt8pIGBCimiyYISXnzrvfrCqp9aX8WDFLHmFTWZ2 X-Received: by 2002:a17:902:d28b:b0:1cc:13d0:d515 with SMTP id t11-20020a170902d28b00b001cc13d0d515mr13231156plc.20.1698905074292; Wed, 01 Nov 2023 23:04:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698905074; cv=none; d=google.com; s=arc-20160816; b=CTflvu2dfsUcZ78sXmC4zwHeHBcSjgcbt+mDZohCArejGkSRNVdNl0ynI2vuWz051L rVHuwN9TpYezNVu3ThE287pL2++slX8dDr+0nNkZYm2Kaz5IlwDpAe2Zs9E1chjguwow qVAgBQo4jlLhB5F7+I7j+4/+r109BueQvwMj4LF3Y65Rx5iRbkxvQ4uNacj45aGO1FdH SEDNslqbwQgK0XKqFGch8O3NOkf6xhGrovJ+U/04n+BC/NX0rPZtCrnGmG/90W9rXW7j yALZINKs889nF3SaYN2ZvmhbLBg5WYZyPvlxu+0cdkEco4T60mWL7+8Co8ouMPf3gn65 v/iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=TWzjyTxfi1oGPf6UFUWG+CYv7rWk5JN1UFTZsVdCG0w=; fh=YS7LVJliQv6+bpyyI6Q2bM3VksGYSAHC8XiDmg0FE/0=; b=hVOOUtGKclib1Jr+7fl8Pw2ztZeNIo7NUDzU6Yg51si0yXe/4TOwUGbcm2BJ0Y4ghB dgwF/wdT3KIQXskaNkdmVVF0wFU5fhz6Hs1r+XkO04miRT60YnMX7GKzUeINq2zExA3Q vciDwjqZY6PKZWmJZHFRv2/Ky5/9Hw/E0vvB+9i0BBRvAmLDUziEOcv7UEJ+G1lxh6z5 14U+SRZoxzIvi73PyqAz9sTmhrXuFZ7XaTfL/bj0KDQoM7Z8UydYSdUMI9jY4ipkJxNB tCcqAxYwoFbmJ3ZrYGrZI4/s9tfcaWsCRhjNm3f0Pf8tpNh+/FIsMXZ6O5M8tCCeS8N5 cNdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id e3-20020a170902744300b001bb20380bf9si4451391plt.545.2023.11.01.23.04.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 23:04:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1F57D802AA21; Wed, 1 Nov 2023 23:04:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231673AbjKBGEV convert rfc822-to-8bit (ORCPT + 99 others); Thu, 2 Nov 2023 02:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjKBGET (ORCPT ); Thu, 2 Nov 2023 02:04:19 -0400 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE58BD for ; Wed, 1 Nov 2023 23:04:13 -0700 (PDT) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-28023eadc70so600182a91.2 for ; Wed, 01 Nov 2023 23:04:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698905053; x=1699509853; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N9JmNRCSMX3cxhvTtJqtyhnY7GO8nXDu3IZHQQ4SY6Q=; b=RqERb01vxxCQgsKTbHqTt9pK51tYaNUhA+3JTcfAu62bc3ORCDBkYFFf6g0v4k8PW4 ekriYM9fJ2Ju2MFy0qeLrfl1siK0WDF9CFKDCfgEQblkeX7j2R6mdU03tlrGyeu14saM qv328bqoSx5DtMDZ3yzOdYMVCQ7DqM5cC+BfdUNlAZHvcB6xxm+n5wIlPKYavXgFCASh KgsuGWQ1XsH2ePh2gkAO84paaXXdnHdJu07yvRgxwPOteUZE8GqZcoumNs6zmGQe1Ve4 azpUwi+vHV83rgZTyjn1fYc5jaIUXMdvUhpJpKvlopxp/kVVcTYCGsRPzIi72/lDvFrI XOAg== X-Gm-Message-State: AOJu0YyicEvQpJyAN8wjQFs1qpzWyyl6gCefibk5EFec4jATmiUKjtFQ 9de+EV5mGxfUoDp2CUTef24A16t1Fgp99KgrBQQ= X-Received: by 2002:a17:90b:3601:b0:27d:839:52ae with SMTP id ml1-20020a17090b360100b0027d083952aemr15218600pjb.32.1698905052648; Wed, 01 Nov 2023 23:04:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Wed, 1 Nov 2023 23:04:01 -0700 Message-ID: Subject: Re: [PATCH next 1/1] perf beauty socket/prctl_option: Cope with extended regexp complaint by grep To: Arnaldo Carvalho de Melo Cc: Linux Kernel Mailing List , Adrian Hunter , Ian Rogers , Jiri Olsa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 01 Nov 2023 23:04:30 -0700 (PDT) On Tue, Oct 31, 2023 at 8:30 AM Arnaldo Carvalho de Melo wrote: > > Noticed on fedora 38, the extended regexp that so far was ok for both > grep and sed now gets complaints by grep, that says '/' doesn't need to > be escaped with '\'. > > So stop using '/' in sed, use '%' instead and remove the \ before / in > the common extended regexp. > > Link: https://x.com/SMT_Solvers/status/1710380010098344192?s=20 > Cc: Adrian Hunter > Cc: Ian Rogers > Cc: Jiri Olsa > Cc: Namhyung Kim > Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/trace/beauty/prctl_option.sh | 4 ++-- > tools/perf/trace/beauty/socket.sh | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/perf/trace/beauty/prctl_option.sh b/tools/perf/trace/beauty/prctl_option.sh > index 8059342ca4126c38..9455d9672f140d13 100755 > --- a/tools/perf/trace/beauty/prctl_option.sh > +++ b/tools/perf/trace/beauty/prctl_option.sh > @@ -4,9 +4,9 @@ > [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/ > > printf "static const char *prctl_options[] = {\n" > -regex='^#define[[:space:]]{1}PR_(\w+)[[:space:]]*([[:xdigit:]]+)([[:space:]]*\/.*)?$' > +regex='^#define[[:space:]]{1}PR_(\w+)[[:space:]]*([[:xdigit:]]+)([[:space:]]*/.*)?$' > grep -E $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \ > - sed -r "s/$regex/\2 \1/g" | \ > + sed -E "s%$regex%\2 \1%g" | \ > sort -n | xargs printf "\t[%s] = \"%s\",\n" > printf "};\n" > > diff --git a/tools/perf/trace/beauty/socket.sh b/tools/perf/trace/beauty/socket.sh > index 8bc7ba62203e4a9d..670c6db298ae0298 100755 > --- a/tools/perf/trace/beauty/socket.sh > +++ b/tools/perf/trace/beauty/socket.sh > @@ -18,10 +18,10 @@ grep -E $ipproto_regex ${uapi_header_dir}/in.h | \ > printf "};\n\n" > > printf "static const char *socket_level[] = {\n" > -socket_level_regex='^#define[[:space:]]+SOL_(\w+)[[:space:]]+([[:digit:]]+)([[:space:]]+\/.*)?' > +socket_level_regex='^#define[[:space:]]+SOL_(\w+)[[:space:]]+([[:digit:]]+)([[:space:]]+/.*)?' > > grep -E $socket_level_regex ${beauty_header_dir}/socket.h | \ > - sed -r "s/$socket_level_regex/\2 \1/g" | \ > + sed -E "s%$socket_level_regex%\2 \1%g" | \ > sort -n | xargs printf "\t[%s] = \"%s\",\n" > printf "};\n\n" > > -- > 2.41.0 >