lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c8020dc5-e911-e9a1-a269-5fbcb682f346@isovalent.com>
Date:   Fri, 6 Jan 2023 12:11:03 +0000
From:   Quentin Monnet <quentin@...valent.com>
To:     Michal Suchanek <msuchanek@...e.de>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        "open list:BPF [GENERAL] (Safe Dynamic Programs and Tools)" 
        <bpf@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bpf_doc: Fix build error with older python versions

2023-01-06 12:40 UTC+0100 ~ Michal Suchanek <msuchanek@...e.de>
> + 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@...e.de>
> ---
>  scripts/bpf_doc.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/bpf_doc.py b/scripts/bpf_doc.py
> index e8d90829f23e..38d51e05c7a2 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:

Thanks, the change looks good.

Acked-by: Quentin Monnet <quentin@...valent.com>

Would be nice to have a bit more context in the commit log: As I
understand, Match objects have been scriptable since Python 3.6 (2016).

Reference: https://docs.python.org/3/whatsnew/3.6.html#re

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ