From: Greg Kroah-Hartman Date: Tue, 28 Feb 2023 18:51:01 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v4.19.275~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e5b99cfe66fdc0e2b5d036f70b3bb1e0170f7de;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: scripts-tags.sh-fix-incompatibility-with-pcre2.patch --- diff --git a/queue-6.1/scripts-tags.sh-fix-incompatibility-with-pcre2.patch b/queue-6.1/scripts-tags.sh-fix-incompatibility-with-pcre2.patch new file mode 100644 index 00000000000..3310325cd40 --- /dev/null +++ b/queue-6.1/scripts-tags.sh-fix-incompatibility-with-pcre2.patch @@ -0,0 +1,53 @@ +From 6ec363fc6142226b9ab5a6528f65333d729d2b6b Mon Sep 17 00:00:00 2001 +From: Carlos Llamas +Date: Wed, 15 Feb 2023 18:38:50 +0000 +Subject: scripts/tags.sh: fix incompatibility with PCRE2 + +From: Carlos Llamas + +commit 6ec363fc6142226b9ab5a6528f65333d729d2b6b upstream. + +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 +--- + scripts/tags.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/tags.sh ++++ b/scripts/tags.sh +@@ -91,7 +91,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 diff --git a/queue-6.1/series b/queue-6.1/series index c9f48bf669c..6a6069c1189 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -34,3 +34,4 @@ fs-move-should_remove_suid.patch attr-add-setattr_should_drop_sgid.patch attr-use-consistent-sgid-stripping-checks.patch fs-use-consistent-setgid-checks-in-is_sxid.patch +scripts-tags.sh-fix-incompatibility-with-pcre2.patch