Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3049824rwl; Fri, 6 Jan 2023 14:58:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXtXky7MfS56H8guaCAxSxCl4e8gas9iVr4FY561iinjfem2zqDKMH3YO2VMze/Az8Qlp6EY X-Received: by 2002:a17:906:86d5:b0:7c0:e305:a282 with SMTP id j21-20020a17090686d500b007c0e305a282mr45956835ejy.59.1673045892215; Fri, 06 Jan 2023 14:58:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673045892; cv=none; d=google.com; s=arc-20160816; b=MxqskGmj23NwuCdnyhSYH52XujIGAOzNLIzaBdPwnn4gYi3nERRdZX15QONvsMZf0w +bueyZx5XKXELTVomAchZ5tSLOlLAr66OfR4GzRUw/Oi9cLc7u6scgDJkx9nTo3MuFzn MZKDY8J9zfaYxoo3PxftIFz8JpR/cvWpn9Xsi6Kzshln800qPjCaXr48ERbvpZwGzoW8 aAdZENJxTSxk9NqP3ueCK0ngw9IIrmWE48bxR03tTEbiSCYtuAsqnkLX0C9KMy+9uyrf +At6VuoVW2Ta5RAPUi0NUD8qyjgyDLWA6cuYd7gb5SSIPMPcUlPZKW/Z1wL+D/agFU2R rEQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=JjYv3fBUyrGVrKF/IniJ8SG3NCkC6womSe1Ww0XaM0M=; b=ICLRFF6OpWuwmULmfj8sXTKhNpeEDcfPwN2lBVMHVJBpEutcMnPBG/OmDBQSA2bFx3 MFOH1cep3hKIYyj+cSjECTlayNixbGNyT667Cu/tc06b/26Px09XfAhcHyCIIfO2QGM2 7SlHx1PqOjCzS850ed1lEGnKFE5GIlxF3YtDx/P2K28M9ESxWFZ9LNwHitI48CeICsgo /CjkzMC7VzTnKsBte13ojhFYoRJ3NCn733H2M++LboyPw634y8eQilctXDQcJWlF/XWd oIE3IMlFpRrcjdbifAojA7zat53tsHWJby1JZH/6DOE4zgyLHUvD3zbjMhj6jCnwKYco XaWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wg4-20020a17090705c400b007adf3ed5d20si2788490ejb.376.2023.01.06.14.57.58; Fri, 06 Jan 2023 14:58:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235771AbjAFWMD (ORCPT + 55 others); Fri, 6 Jan 2023 17:12:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbjAFWMC (ORCPT ); Fri, 6 Jan 2023 17:12:02 -0500 Received: from www62.your-server.de (www62.your-server.de [213.133.104.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A1CD35911; Fri, 6 Jan 2023 14:12:01 -0800 (PST) Received: from sslproxy04.your-server.de ([78.46.152.42]) by www62.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pDuwJ-000AGE-3n; Fri, 06 Jan 2023 23:11:51 +0100 Received: from [85.1.206.226] (helo=linux.home) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDuwI-0006S9-Kh; Fri, 06 Jan 2023 23:11:50 +0100 Subject: Re: [PATCH] bpf_doc: Fix build error with older python versions To: Quentin Monnet , Michal Suchanek Cc: Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , "open list:BPF [GENERAL] (Safe Dynamic Programs and Tools)" , open list References: <20230106114037.25036-1-msuchanek@suse.de> From: Daniel Borkmann Message-ID: <521abe2f-1aa3-563f-48ec-c016450602d9@iogearbox.net> Date: Fri, 6 Jan 2023 23:11:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.7/26773/Fri Jan 6 09:48:44 2023) X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/6/23 1:11 PM, Quentin Monnet wrote: > 2023-01-06 12:40 UTC+0100 ~ Michal Suchanek >> + 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 >> --- >> 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 > > 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 Agree, Michal, could you improve the commit description as it's a bit terse as-is and then resubmit your patch. Thanks, Daniel