All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Jialu Xu <xujialu@vimux.org>, Vipin Sharma <vipinsh@google.com>,
	Carlos Llamas <cmllamas@google.com>
Subject: [PATCH 6.2 07/16] scripts/tags.sh: fix incompatibility with PCRE2
Date: Wed,  1 Mar 2023 19:07:43 +0100	[thread overview]
Message-ID: <20230301180653.571096754@linuxfoundation.org> (raw)
In-Reply-To: <20230301180653.263532453@linuxfoundation.org>

From: Carlos Llamas <cmllamas@google.com>

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 <gregkh@linuxfoundation.org>
Cc: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Jialu Xu <xujialu@vimux.org>
Cc: Vipin Sharma <vipinsh@google.com>
Cc: stable@vger.kernel.org
Fixes: 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely")
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20230215183850.3353198-1-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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



  parent reply	other threads:[~2023-03-01 18:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 18:07 [PATCH 6.2 00/16] 6.2.2-rc1 review Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 01/16] ALSA: hda: cs35l41: Correct error condition handling Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 02/16] crypto: arm64/sm4-gcm - Fix possible crash in GCM cryption Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 03/16] bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 04/16] vc_screen: dont clobber return value in vcs_read Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 05/16] drm/amd/display: Move DCN314 DOMAIN power control to DMCUB Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 06/16] drm/amd/display: Properly reuse completion structure Greg Kroah-Hartman
2023-03-01 18:07 ` Greg Kroah-Hartman [this message]
2023-03-01 18:07 ` [PATCH 6.2 08/16] wifi: rtw88: usb: Set qsel correctly Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 09/16] wifi: rtw88: usb: send Zero length packets if necessary Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 10/16] wifi: rtw88: usb: drop now unnecessary URB size check Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 11/16] usb: dwc3: pci: add support for the Intel Meteor Lake-M Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 12/16] USB: serial: option: add support for VW/Skoda "Carstick LTE" Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 13/16] usb: gadget: u_serial: Add null pointer check in gserial_resume Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 14/16] arm64: dts: uniphier: Fix property name in PXs3 USB node Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 15/16] usb: typec: pd: Remove usb_suspend_supported sysfs from sink PDO Greg Kroah-Hartman
2023-03-01 18:07 ` [PATCH 6.2 16/16] USB: core: Dont hold device lock while reading the "descriptors" sysfs file Greg Kroah-Hartman
2023-03-01 22:50 ` [PATCH 6.2 00/16] 6.2.2-rc1 review Florian Fainelli
2023-03-01 23:24 ` Justin Forbes
2023-03-02  1:42 ` Shuah Khan
2023-03-02  2:16 ` Bagas Sanjaya
2023-03-02  7:27 ` Jon Hunter
2023-03-02 10:21 ` Conor Dooley
2023-03-02 11:40 ` Sudip Mukherjee (Codethink)
2023-03-02 17:23 ` Ron Economos
2023-03-02 19:25 ` Naresh Kamboju
2023-03-02 23:16 ` Slade Watkins
2023-03-03  1:31 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230301180653.571096754@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=cmllamas@google.com \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=masahiroy@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=vipinsh@google.com \
    --cc=xujialu@vimux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.