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 3FF8CA0C47 for ; Wed, 9 Jun 2021 18:01:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30E7A410F7; Wed, 9 Jun 2021 18:01:14 +0200 (CEST) Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mails.dpdk.org (Postfix) with ESMTP id 2BB5A4069B for ; Wed, 9 Jun 2021 18:01:12 +0200 (CEST) Received: by mail-ed1-f50.google.com with SMTP id w21so29073300edv.3 for ; Wed, 09 Jun 2021 09:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sCWNjPiUUNu8cSEwUAx0v/3uPvoVqwYOn4iuKSnMSVU=; b=AiTX3REqHXl/MD5lN1cRZDhDCzBUJgVcdIaZttvHySuHc36uM1m2n0MwNjSP8F+0KV +9fUlDHfJ1QpMqEjGujzuWShIvpA8kYRXEq6r26RmAjGYRYFF28g3smSEQ9QbaIWeZ6T eif8iSJvlQ33qEKWc3A0lkCTYQBPGLWIgJZos= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sCWNjPiUUNu8cSEwUAx0v/3uPvoVqwYOn4iuKSnMSVU=; b=C0L3W9XzwTYqJvDvteIo57Bd5ZIlwhnR8gdEiJjv0d1G7Vt8nLPh1RCfm3GH5r5AYp 7y2rZO6AxNbovicBbW5WH0kl8jSKr8avK1/rXHyan5Tb8/a92FWG+tTUV+qHDALkqeAq moCi+sqkCsaHTgj1ovcX5OAjRDYoSSl/kB/Ijuwm+67CaJn3jlXlKNEMs1E2D8mEnEbO 4Y7nlXq+gErm2xFp+Q+FmVpnMeZUpLI20PRcoIJcbgNd71oDNhwnGn40g+rE4AcwtIiP aBwAbcH8K7BZDiUQjp+DZCc4sjd0ua3Z9dNSr7ydxtiXh3r6TNF6nP+jWViI42614baW w2Dg== X-Gm-Message-State: AOAM5306JsEXsk+1q7tRpt/VYOl6ttHLC2Dr/tyYJv53ypjeFaudNuuu kc94gK+aT3bDoHUaRw5xCfNZ5da49c/EeJ9lFNxxPw== X-Google-Smtp-Source: ABdhPJxmJyiOa9dptl7aCJ0OOkZThkvxdmm+VzjgoJGvbVV07+9lhqLfi1Hio5USEQt6BQubz5csvs5rZ+4oNmmP1Tk= X-Received: by 2002:a50:ed82:: with SMTP id h2mr162612edr.140.1623254471843; Wed, 09 Jun 2021 09:01:11 -0700 (PDT) MIME-Version: 1.0 References: <20210526214343.31352-1-dmitry.kozliuk@gmail.com> <20210527212421.24224-1-dmitry.kozliuk@gmail.com> <20210609185219.5eefdddd@sovereign> In-Reply-To: <20210609185219.5eefdddd@sovereign> From: Lincoln Lavoie Date: Wed, 9 Jun 2021 12:01:00 -0400 Message-ID: To: Dmitry Kozlyuk Cc: dev , Zhihong Peng , Neil Horman , ci@dpdk.org Content-Type: multipart/alternative; boundary="0000000000002cce7105c4576220" Subject: Re: [dpdk-ci] [PATCH v2] pmdinfogen: allow padding after NUL terminator X-BeenThere: ci@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK CI discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ci-bounces@dpdk.org Sender: "ci" --0000000000002cce7105c4576220 Content-Type: text/plain; charset="UTF-8" Hi Dmitry, If the failing test is the unit test func_reentrancy_autotest, that is being looked into , as it seems like the test case does not reliably run. It passes / fails between different systems running both on bare metal and in virtual environments, on different OSes and architectures. Do you have a link to your patch in patchworks or the lab dashboard? Cheers, Lincoln On Wed, Jun 9, 2021 at 11:52 AM Dmitry Kozlyuk wrote: > 2021-05-28 00:24 (UTC+0300), Dmitry Kozlyuk: > > Size of string constant symbol may be larger than its length > > measured up to NUL terminator. In this case pmdinfogen included padding > > bytes after NUL terminator in generated source, yielding incorrect code. > > > > Always trim string data to NUL terminator while reading ELF. > > It was already done for COFF because there's no symbol size. > > > > Bugzilla ID: 720 > > Fixes: f0f93a7adfee ("buildtools: use Python pmdinfogen") > > > > Signed-off-by: Dmitry Kozlyuk > > --- > > v2: return helper to coff.py, where it's needed (David Marchand). > > > > buildtools/pmdinfogen.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py > > index 7a739ec7d4..2a44f17bda 100755 > > --- a/buildtools/pmdinfogen.py > > +++ b/buildtools/pmdinfogen.py > > @@ -28,7 +28,7 @@ def __init__(self, image, symbol): > > def string_value(self): > > size = self._symbol["st_size"] > > value = self.get_value(0, size) > > - return value[:-1].decode() if value else "" > > + return coff.decode_asciiz(value) # not COFF-specific > > > > def get_value(self, offset, size): > > section = self._symbol["st_shndx"] > > There are CI failures that seem unrelated to this patch: > some tests with NICs that I can't check > and an Arch Linux build failure that I failed to reproduce. > GitHub Actions are passing. > Are these known CI bugs or does this patch need any corrections? > -- *Lincoln Lavoie* Principal Engineer, Broadband Technologies 21 Madbury Rd., Ste. 100, Durham, NH 03824 lylavoie@iol.unh.edu https://www.iol.unh.edu +1-603-674-2755 (m) --0000000000002cce7105c4576220 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi = Dmitry,

If the failing te= st is the unit test=C2=A0func_reentrancy_autotest, that is being looked int= o , as it seems like=C2=A0the test case does not reliably run.=C2=A0 It pas= ses / fails between different systems running both on bare metal and in vir= tual environments, on different OSes and architectures.=C2=A0

Do you have a link to your patch in pa= tchworks or the lab dashboard?

Cheers,
Lincoln

= =C2=A0

On Wed, Jun 9, 2021 at 11:52 AM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
=
2021-05-28 00:24 (U= TC+0300), Dmitry Kozlyuk:
> Size of string constant symbol may be larger than its length
> measured up to NUL terminator. In this case pmdinfogen included paddin= g
> bytes after NUL terminator in generated source, yielding incorrect cod= e.
>
> Always trim string data to NUL terminator while reading ELF.
> It was already done for COFF because there's no symbol size.
>
> Bugzilla ID: 720
> Fixes: f0f93a7adfee ("buildtools: use Python pmdinfogen") >
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> ---
> v2: return helper to coff.py, where it's needed (David Marchand).<= br> >
>=C2=A0 buildtools/pmdinfogen.py | 2 +-
>=C2=A0 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py
> index 7a739ec7d4..2a44f17bda 100755
> --- a/buildtools/pmdinfogen.py
> +++ b/buildtools/pmdinfogen.py
> @@ -28,7 +28,7 @@ def __init__(self, image, symbol):
>=C2=A0 =C2=A0 =C2=A0 def string_value(self):
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 size =3D self._symbol["st_size&= quot;]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 value =3D self.get_value(0, size) > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 return value[:-1].decode() if value else = ""
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return coff.decode_asciiz(value)=C2=A0 # = not COFF-specific
>=C2=A0
>=C2=A0 =C2=A0 =C2=A0 def get_value(self, offset, size):
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 section =3D self._symbol["st_sh= ndx"]

There are CI failures that seem unrelated to this patch:
some tests with NICs that I can't check
and an Arch Linux build failure that I failed to reproduce.
GitHub Actions are passing.
Are these known CI bugs or does this patch need any corrections?


--
Lincoln Lavoie
Prin= cipal Engineer, Broadband Technologies
21 Madbury Rd., Ste. 100, = Durham, NH 03824
+1-603-674-= 2755 (m)

--0000000000002cce7105c4576220--