Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp691164rwd; Wed, 7 Jun 2023 05:48:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cCUrSVNjZzVTawMCn1MYJRbNbAqB5M0EDyI6hQ38tWweGbsSiI2JsCRzE3cQhCkKNzwrg X-Received: by 2002:aa7:91c9:0:b0:652:e23b:a078 with SMTP id z9-20020aa791c9000000b00652e23ba078mr5684425pfa.13.1686142115176; Wed, 07 Jun 2023 05:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686142115; cv=none; d=google.com; s=arc-20160816; b=VUU6ZIUY7yJXUM6xgfnfcmXMfhOKEONZjKZdAzmqT1X1KUk1lPYrNJO49By+a2RzAd mXhzW515Qw6QjC+pob7qSQuQjHB8Prgr0sz/kssoC25ugrl3jwoALDmEx0PslQlGCKDG KmnvNDmfxLo9Aoprnr25IPQf7nauxt4N/quPv3FO5jd3wA9xUpdj0of92gMs7pWxcS0e 2Idl/ire3KyeHE4PgB4kZRhrDfA+nx/FwGT28m/nVnRWFetyi1CGCFBw4fzAqFqulNpE ZMOKCeOyaDc0/EYGQQAcE0ksk1DPJ7QZCbAJw8E0g0lK5XIoK1CRvnxZHPXXuoV1D2dF YUXw== 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 :dkim-signature; bh=DfnsQmPO330UsKnnpsBKAGSB6Fb5r0PM2aL9RUSxXjU=; b=so22J2UHnG4xhJarYEle3/PAbmG9GzJtfInsZQiXn/EVcHAUAodDOGWNu6FNqH3CAU UkfpO4WbHC6anVNU4L52nd5MlxKCBO6pBFIhh51bzS4UgSEQSUkX4NtBFm96T7ZxnRYf aTLORa7d1c5e51iyG2jhT41Qe2xZ9YJfCifW6KdDylwq0/14Y556R6ifh4Se8nNhEOVH jMUt6VVAImPyx89UV4UJrNfDOMWLxMrga89QiceTOiRPmKaP+Lxy7596xov/fbW98B7I GdLWolM1Oj1p0npD0f1/6OZKwro+Bc0B9tHiJp+OT27yBWwmOtdL7qhPOEPm1efFFXwM FbsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXpCoGGi; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x191-20020a6386c8000000b0053fb7968568si9101007pgd.16.2023.06.07.05.48.18; Wed, 07 Jun 2023 05:48:35 -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=@kernel.org header.s=k20201202 header.b=oXpCoGGi; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240859AbjFGM1c (ORCPT + 99 others); Wed, 7 Jun 2023 08:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240688AbjFGM1a (ORCPT ); Wed, 7 Jun 2023 08:27:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D76CBE65; Wed, 7 Jun 2023 05:27:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7283B6365F; Wed, 7 Jun 2023 12:27:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4F4DC433EF; Wed, 7 Jun 2023 12:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686140848; bh=rYNeihmRmo69wMB7UeZnTSVlzTtJvq708KV1rnsqrnc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oXpCoGGid7jdVikkcxY8xeJ8jiCYaQZLC7F9dsWF6CpSKh0F7QkkurvIXSzvs6cul ajTuYf4R+Hy09iqgG1QfHkpqa5RklWs2dPYutlVgtD4hS2rBGQvG4uo5LooDFRMeR6 zQUEy0g1iqn5m/VMFXqpm6AWwBmMLnAXAHaEc93S/KaQYfyyKxWclSmu/C8eNB4vC8 M6da9LjJVcSg+xKXw/apxsw3Uq0omXvpsmBLARrKXv6/Ro8EVTJq4kmOZE/x9q9UJ6 Gj+W4mYpvMbF4/MCcSqaX4xpnPIyYRIs2Qag2qPmuG7dX5ObIODB2qu8SYZTw2i6AQ CXvNcs0oBoxmg== Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-39aa825c299so354669b6e.0; Wed, 07 Jun 2023 05:27:28 -0700 (PDT) X-Gm-Message-State: AC+VfDzk7Emxm5L2xoTlU1sKAgSTS9CtewTOeU21+xIkSb6sbP5UL5ox I47gtiBbZ9dWTwF3O5YQfwh05cmcu6D0n5LGbSk= X-Received: by 2002:aca:b5c2:0:b0:39a:1ceb:3ec4 with SMTP id e185-20020acab5c2000000b0039a1ceb3ec4mr7264308oif.29.1686140848154; Wed, 07 Jun 2023 05:27:28 -0700 (PDT) MIME-Version: 1.0 References: <20230606173553.v7lckyxrcsotanm5@google.com> In-Reply-To: <20230606173553.v7lckyxrcsotanm5@google.com> From: Masahiro Yamada Date: Wed, 7 Jun 2023 21:26:52 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] scripts/mksysmap: Fix badly escaped '$' To: =?UTF-8?Q?Pierre=2DCl=C3=A9ment_Tosi?= Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Wed, Jun 7, 2023 at 2:36=E2=80=AFAM Pierre-Cl=C3=A9ment Tosi wrote: > > The backslash characters escaping '$' in the command to sed (intended to > prevent it from interpreting '$' as "end-of-line") are currently being > consumed by the Shell (where they mean that sh should not evaluate what > follows '$' as a variable name). This means that > > sed -e "/ \$/d" > > executes the script > > / $/d > > instead of the intended > > / \$/d > > So escape twice in mksysmap any '$' that actually needs to reach sed > escaped so that the backslash survives the Shell. You are right. Thanks for catching this bug. Applied to linux-kbuild. Thanks. > > Fixes: c4802044a0a7 ("scripts/mksysmap: use sed with in-line comments") > Fixes: 320e7c9d4494 ("scripts/kallsyms: move compiler-generated symbol pa= tterns to mksysmap") > Signed-off-by: Pierre-Cl=C3=A9ment Tosi > --- > scripts/mksysmap | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/mksysmap b/scripts/mksysmap > index cb3b1fff3eee..ec3338526102 100755 > --- a/scripts/mksysmap > +++ b/scripts/mksysmap > @@ -32,7 +32,7 @@ ${NM} -n ${1} | sed >${2} -e " > # (do not forget a space before each pattern) > > # local symbols for ARM, MIPS, etc. > -/ \$/d > +/ \\$/d > > # local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc. > / \.L/d > @@ -41,7 +41,7 @@ ${NM} -n ${1} | sed >${2} -e " > / __efistub_/d > > # arm64 local symbols in non-VHE KVM namespace > -/ __kvm_nvhe_\$/d > +/ __kvm_nvhe_\\$/d > / __kvm_nvhe_\.L/d > > # arm64 lld > -- > 2.41.0.rc0.172.g3f132b7071-goog > > > -- > Pierre --=20 Best Regards Masahiro Yamada