Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp324802rdb; Tue, 31 Oct 2023 08:30:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERbg3Dm6jap7byJsVZbeHk7wZu68PZsxa3Nv1Vor+iKEalLCynJeFpOy6OK6I9CQLBdUZ+ X-Received: by 2002:a05:6a21:3b44:b0:180:daeb:ac5e with SMTP id zy4-20020a056a213b4400b00180daebac5emr3610021pzb.10.1698766238526; Tue, 31 Oct 2023 08:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698766238; cv=none; d=google.com; s=arc-20160816; b=c4PmJ4Mp+sAUktCm5kc4O95BPqGdsmtXaZg1bYf45oSUtBqyLmfBEiy/kUwnec5iJE quJqsGlFt0sfzST5xLVXI2pxoN4RUlgHyC/WR5cD9bkKwRNMAZbtesegV9T5FuYLM7j6 uEuL0/pCSB1IdX5xgU/l6CQ/gcRRxNA4HuVNCbEZihjXStRlVlkePlXnUwF/LJBf2RZf DN1bmXTIDRi5xHrLhwTNc66cTNWiCkJKNXFFuBcrk/OCUiSl1oEJxoMOanqQULwaVQeO ul8nWkZA+LCJxNXJq80XFa9SW8acgUsZ1YNb1FtCFvZJ0hpv+jpiNanIhtJTiStzbYDl idSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=IEwpBAmVAQ+MI3OhDVIxR5mT+zl2OYhp4SOeEGeCqhw=; fh=ficwc02GdE+VePKm9rl4PU8GKgAUggfpuxAtr64RN+Q=; b=Kr4QNtiFnlqeIEGCNnOaFlzyj1EJ7aXpC0hUqJv0vG1ldGcCX+pgYubcfOLYqvFLmw ceLTLLM6HzMIx4ct5l4xLXahrgBCk6jQLPR95mqqY1hlYBwFK4IIoIVxVCUM17X+RLEP DN1mnpYPvHOyHXdLqmfG++7s3zGRUJtGMfSPgAwnJioxdJ/VHVBxndG7KSqojUy23YzX Cq7OLQ6Srp62wc86KOgA9m89vULb2arymbd5EQxkOeT85A1NwZs0BQ0RLdjqisqVj7cG uG3B1Z6kycds/LiYVzF0U1GJd9xsVgdzufr30337t1cN5ueddMJO/CoBKeja5GSqun9T 82QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DUnQos1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b26-20020a6567da000000b005855f67e490si1184899pgs.690.2023.10.31.08.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 08:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DUnQos1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 1CCC2807C85B; Tue, 31 Oct 2023 08:30:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344997AbjJaPaD (ORCPT + 99 others); Tue, 31 Oct 2023 11:30:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344229AbjJaPaC (ORCPT ); Tue, 31 Oct 2023 11:30:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D9AFC1 for ; Tue, 31 Oct 2023 08:29:59 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D3E4C433C7; Tue, 31 Oct 2023 15:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698766199; bh=rxuRTaIT9pmaTWt2pQ7fckfcepAPCBhaM/SIwHI5TwU=; h=Date:From:To:Cc:Subject:From; b=DUnQos1DvY96N15uUhrCmonwEiOD1Cvw2tU39bfox/Fb8RM87kene+CmxU5Hivuvb 6vFzYmmF3AvugdsDUFsYxZoYPMsBxs6mzMRBSP1bjBayBdB0A408/YtHyXC/88mmKq 46CYNC8GDrXfndr0sjueI9miRYNnPv2ENmMXn464cfAyT9dWCx4mrdmMo3qKEaBYvu tQp4zsl7X8DaqYfs4RJCrh5fieMxoumadCrPd3XODxH+Kkk9a2EBkDYr7OfOc7+rtw K+3TWbjZ9hTejStyMaUPuudOWeT4s53TpC6t+hQGGMR8yt1aw5qX23FnMZMdsqK/m5 sXNDf1H7bSrvg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 2B1C24035D; Tue, 31 Oct 2023 12:29:56 -0300 (-03) Date: Tue, 31 Oct 2023 12:29:56 -0300 From: Arnaldo Carvalho de Melo To: Linux Kernel Mailing List Cc: Adrian Hunter , Ian Rogers , Jiri Olsa , Namhyung Kim Subject: [PATCH next 1/1] perf beauty socket/prctl_option: Cope with extended regexp complaint by grep Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Tue, 31 Oct 2023 08:30:13 -0700 (PDT) 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 --- 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