From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E03AC6FA8E for ; Tue, 28 Feb 2023 18:49:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229493AbjB1Sts (ORCPT ); Tue, 28 Feb 2023 13:49:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbjB1Sts (ORCPT ); Tue, 28 Feb 2023 13:49:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25F7D206A7 for ; Tue, 28 Feb 2023 10:49:47 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id D91FCB80E9A for ; Tue, 28 Feb 2023 18:49:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56929C433EF; Tue, 28 Feb 2023 18:49:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1677610184; bh=XP9vofwXeKc+yADR6j7kOrfxBB0QE0bP8uDydZMDz2Q=; h=Subject:To:Cc:From:Date:From; b=fBHZIsMQkrIXuFGnraNU/XsuNvQxVcyo5Skl/+XRg4ei/UVcZ1LPUBlWwkAcnAcfl nxqwlZeWYB0soB5WVER5m/zQIicX6OLd83HpzgEA08pwcJR8Lxku78yNv8ZziSsoxw 1pIZg+LXuZHmlGYdbNxKJhPQLqWn0CT8ldNXfwrk= Subject: FAILED: patch "[PATCH] scripts/tags.sh: fix incompatibility with PCRE2" failed to apply to 5.4-stable tree To: cmllamas@google.com, cristian.ciocaltea@collabora.com, gregkh@linuxfoundation.org, masahiroy@kernel.org, vipinsh@google.com, xujialu@vimux.org Cc: From: Date: Tue, 28 Feb 2023 19:49:38 +0100 Message-ID: <167761017822973@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Possible dependencies: 6ec363fc6142 ("scripts/tags.sh: fix incompatibility with PCRE2") 7394d2ebb651 ("scripts/tags.sh: Invoke 'realpath' via 'xargs'") 162343a876f1 ("scripts/tags.sh: exclude tools directory from tags generation") 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 6ec363fc6142226b9ab5a6528f65333d729d2b6b Mon Sep 17 00:00:00 2001 From: Carlos Llamas Date: Wed, 15 Feb 2023 18:38:50 +0000 Subject: [PATCH] scripts/tags.sh: fix incompatibility with PCRE2 Starting with release 10.38 PCRE2 drops default support for using \K in lookaround patterns as described in [1]. Unfortunately, scripts/tags.sh relies on such functionality to collect all_compiled_soures() leading to the following error: $ make COMPILED_SOURCE=1 tags GEN tags grep: \K is not allowed in lookarounds (but see PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK) The usage of \K for this pattern was introduced in commit 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") which speeds up the generation of tags significantly. In order to fix this issue without compromising the performance we can switch over to an equivalent sed expression. The same matching pattern is preserved here except \K is replaced with a backreference \1. [1] https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC11 Cc: Greg Kroah-Hartman Cc: Cristian Ciocaltea Cc: Masahiro Yamada Cc: Jialu Xu Cc: Vipin Sharma Cc: stable@vger.kernel.org Fixes: 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20230215183850.3353198-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman diff --git a/scripts/tags.sh b/scripts/tags.sh index 1ad45f17179a..6b9001853890 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -98,7 +98,7 @@ all_compiled_sources() { echo include/generated/autoconf.h find $ignore -name "*.cmd" -exec \ - grep -Poh '(?(?=^source_.* \K).*|(?=^ \K\S).*(?= \\))' {} \+ | + sed -n -E 's/^source_.* (.*)/\1/p; s/^ (\S.*) \\/\1/p' {} \+ | awk '!a[$0]++' } | xargs realpath -esq $([ -z "$KBUILD_ABS_SRCTREE" ] && echo --relative-to=.) | sort -u