From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 440D845563 for ; Wed, 3 Jul 2024 18:13:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36BF042E71; Wed, 3 Jul 2024 18:13:44 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B9A0B4279A for ; Wed, 3 Jul 2024 18:13:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720023221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PDPPd71DDscm18s341D3X/RDRKFNZIPjDLvn9+zCBz0=; b=QjoF4j9UeXylpabYossx93V6P/xCh8fd37N6SRL2i02Kzjc/pI3TKrnL/vJwse2kSWrWBI EVrdj4csnlvpbf7yBKWwxKb0a9GN3ncOz/tlZ7LP5najBdEteWcuVHpMMPC7aaIYg1BBbO fiKpousXG7CfvYIxIaUiwui0ew8ETJk= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-424-NJJ5b9eqM2mYfL3J7TCw_A-1; Wed, 03 Jul 2024 12:13:37 -0400 X-MC-Unique: NJJ5b9eqM2mYfL3J7TCw_A-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ee4e9b77c1so6702451fa.1 for ; Wed, 03 Jul 2024 09:13:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720023215; x=1720628015; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PDPPd71DDscm18s341D3X/RDRKFNZIPjDLvn9+zCBz0=; b=VIUyIDaEBGVMbvbSb89HDzNgfcrc93CBWxRSFnyTVTejo6JPPGs4YGUi00eNDg/IcY 8kBVcrarPQgZ36+if6imQsmmDdvWcec4qlrrjI94duligalNUMHaUk0eYsk4WTPyN+Tr UXZT/z4SvhkJjjITKSdDl5PQ9ycax24f278/Lz0IGgw/fMaVPXmLVC1cXOCnm/NO3am1 6zIcGkx/fWd6S/PdiaHBARe5gFyRk0bXrmiXDsI//sEwvnWGFBMXZXj1ofwaZu2e5gMY haHmjzdnszyLpdXCuHmYQBGHVKzK28WLUGUtAlggEODSJNSNAxpqOjZFRQXLpj9VmXwo Z2ug== X-Forwarded-Encrypted: i=1; AJvYcCXDXb1MyoV6fARZpmmxBHPSdUz5AEJeTX/lbax+62cb78EwfpglzSVavK1XK5dm3XQ8SO1q4KwsfEOCNoLY34k= X-Gm-Message-State: AOJu0Yx7CSzytQY7h/sKNz3aKIWsg3niwb/jpjzZITOJFkIKDTE3L1xj +NQN4RhJj+gS3vfQ8Fh8fl+Vph9mEKivoN8MgdkNk8BSltKW9lmzJ5hjXQ3RggP5PqIbybV7CFr PRElxMIcxhoLtPxlD6V+SfZlBJQG05PZwAnvH+R3rNaSmuGCitTaThyDJP90RDyS7jG+/IKeD5y vwFuK/30npvRou8seRlz4= X-Received: by 2002:a2e:9b8a:0:b0:2ee:7d37:49a7 with SMTP id 38308e7fff4ca-2ee84a21487mr6146291fa.3.1720023215740; Wed, 03 Jul 2024 09:13:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuTZ/HFiH7FPVCz/nNZ9jGEaNGSMERDoslSndvae0LhRgPUy12zKKagTUUUp8KUmA9OENR8+iSgZC0c6c2/jw= X-Received: by 2002:a2e:9b8a:0:b0:2ee:7d37:49a7 with SMTP id 38308e7fff4ca-2ee84a21487mr6146251fa.3.1720023215360; Wed, 03 Jul 2024 09:13:35 -0700 (PDT) MIME-Version: 1.0 References: <20240627101144.665413-1-mingjinx.ye@intel.com> <20240701103315.835249-1-mingjinx.ye@intel.com> In-Reply-To: <20240701103315.835249-1-mingjinx.ye@intel.com> From: David Marchand Date: Wed, 3 Jul 2024 18:13:23 +0200 Message-ID: Subject: Re: [PATCH v2] buildtools: fix invalid symbols To: Mingjin Ye Cc: dev@dpdk.org, stable@dpdk.org, Dmitry Kozlyuk , Ali Alnubani X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Adding Ali in the loop, as he was working on a similar patch. On Mon, Jul 1, 2024 at 12:56=E2=80=AFPM Mingjin Ye = wrote: > > Elf files generated by higher version compilers wrap multiple > symbols prefixed with "this_pmd_name". > > The patch uses the regex "^this_pmd_name[0-9]+$" to match the > symbol name. > > Bugzilla ID: 1466 > Fixes: 6c4bf8f42432 ("buildtools: add Python pmdinfogen") > Cc: stable@dpdk.org > > Signed-off-by: Mingjin Ye > --- > v2: Use regex ^this_pmd_name[0-9]+$ to filter symbols *names* > --- > buildtools/pmdinfogen.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py > index 2a44f17bda..0fbcc697ed 100755 > --- a/buildtools/pmdinfogen.py > +++ b/buildtools/pmdinfogen.py > @@ -6,6 +6,7 @@ > import argparse > import ctypes > import json > +import re > import sys > import tempfile > > @@ -70,7 +71,7 @@ def find_by_prefix(self, prefix): This function does not find symbols with a prefix anymore... Please rename. > prefix =3D prefix.encode("utf-8") if self._legacy_elftools else = prefix > for i in range(self._symtab.num_symbols()): > symbol =3D self._symtab.get_symbol(i) > - if symbol.name.startswith(prefix): > + if re.match(prefix, symbol.name): > yield ELFSymbol(self._image, symbol) > > > @@ -199,7 +200,7 @@ def dump(self, file): > > def load_drivers(image): > drivers =3D [] > - for symbol in image.find_by_prefix("this_pmd_name"): > + for symbol in image.find_by_prefix("^this_pmd_name[0-9]+$"): > drivers.append(Driver.load(image, symbol)) > return drivers The COFF implementation is probably broken by this change as it is still filtering symbols with a prefix. Please update. --=20 David Marchand