Patch "bpf_doc: Fix build error with older python versions" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bpf_doc: Fix build error with older python versions

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bpf_doc-fix-build-error-with-older-python-versions.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1b50f1ea36c7d01975741afd3ae1446cf774cb73
Author: Michal Suchanek <msuchanek@xxxxxxx>
Date:   Mon Jan 9 12:34:42 2023 +0100

    bpf_doc: Fix build error with older python versions
    
    [ Upstream commit 5fbea42387eba1c7517fcad79099df706def7054 ]
    
    The ability to subscript match result as an array is only available
    since python 3.6. Existing code in bpf_doc uses the older group()
    interface but commit 8a76145a2ec2 adds code using the new interface.
    
    Use the old interface consistently to avoid build error on older
    distributions like the below:
    
    + make -j48 -s -C /dev/shm/kbuild/linux.33946/current ARCH=powerpc HOSTCC=gcc CROSS_COMPILE=powerpc64-suse-linux- clean
    TypeError: '_sre.SRE_Match' object is not subscriptable
    
    Fixes: 8a76145a2ec2 ("bpf: explicitly define BPF_FUNC_xxx integer values")
    Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Acked-by: Quentin Monnet <quentin@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20230109113442.20946-1-msuchanek@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/bpf_doc.py b/scripts/bpf_doc.py
index e8d90829f23ed..38d51e05c7a2b 100755
--- a/scripts/bpf_doc.py
+++ b/scripts/bpf_doc.py
@@ -271,7 +271,7 @@ class HeaderParser(object):
             if capture:
                 fn_defines_str += self.line
                 helper_name = capture.expand(r'bpf_\1')
-                self.helper_enum_vals[helper_name] = int(capture[2])
+                self.helper_enum_vals[helper_name] = int(capture.group(2))
                 self.helper_enum_pos[helper_name] = i
                 i += 1
             else:



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux