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 28A30A0546; Thu, 27 May 2021 08:53:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D91EF40150; Thu, 27 May 2021 08:53:34 +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 0305240143 for ; Thu, 27 May 2021 08:53:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622098413; 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: in-reply-to:in-reply-to:references:references; bh=IrvLGZuRZes7n+nrTp4rTWI6W79UKC322BMS1OkiUtc=; b=AYQ72P6r0G9M22bnDxg0spbFBO2zSEm4VfH+zdcGZX8mduphmMSopix4F2WD5pY+dLukNf A5txqZ1hBbf1tHvQf8zhenV1Vt35iqvSzqZXc9UQkPQFD2RdJaiQHYeh7o/56+/CtbBR/X qVHJ5x0evSd5XQ6GL/pg4S/ZKLMbb80= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-104-YiQfWFzgM3afXceYISxg9Q-1; Thu, 27 May 2021 02:53:31 -0400 X-MC-Unique: YiQfWFzgM3afXceYISxg9Q-1 Received: by mail-vs1-f70.google.com with SMTP id p14-20020a67e94e0000b029023fa53ce6e9so1233463vso.14 for ; Wed, 26 May 2021 23:53:31 -0700 (PDT) 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=IrvLGZuRZes7n+nrTp4rTWI6W79UKC322BMS1OkiUtc=; b=KOunmzSSl/K1erHG38TQXzAkxjfTEwOCd+ZL5vdvCPyjNPMY4lnI4ElKFc0yTCq0L7 eFOEvscdt0hDZipxK5IDfUdvuoxROGh+gu6TFcokB7cP3oF5yN8VUdz+sSWXcbskDbdd EX2/qO4PYas5JHawMhhpBjKlJQxw/+oGDHBfnkVlms5qPatpiWIAelzPX7lwp5B24Ozq 03/LKnt24RpPSyAeLiDtS6nGhe/vfUUP7p8XL1ArmkLgPqFbRP1V+z5tcG0tIGYhty2U CPeAySUjUYd+PSR5AstHDa1Rc+DkIWb0+uP1Qeoi+r44chcTF7zrC3DZnRZzsd/D4zX8 u8Hw== X-Gm-Message-State: AOAM532I7pjRWUv8JVr7oZ7/xEMHxdk5FVCjn3v3TOQ7FGBZvuugtqz0 q1266t+dyPssVneDHEIlzsvgFfj3cYBoWHL5/b8D2ddxHckj0q2hgQ7iCToHza0pcrQ1ER1gk/O ymbLNRt3quCggfmD255I= X-Received: by 2002:ab0:3785:: with SMTP id d5mr1013432uav.126.1622098411236; Wed, 26 May 2021 23:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8E3TIF3IYLruK+QXk8kTzPTfaxwni3pJWaUzLR+a89gSFdqb3cB7op446x4cEu9K0Ry6j/3gTcfnHv8WGUwU= X-Received: by 2002:ab0:3785:: with SMTP id d5mr1013428uav.126.1622098410988; Wed, 26 May 2021 23:53:30 -0700 (PDT) MIME-Version: 1.0 References: <20210526214343.31352-1-dmitry.kozliuk@gmail.com> In-Reply-To: <20210526214343.31352-1-dmitry.kozliuk@gmail.com> From: David Marchand Date: Thu, 27 May 2021 08:53:19 +0200 Message-ID: To: Dmitry Kozlyuk Cc: dev , Zhihong Peng , Neil Horman Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] pmdinfogen: allow padding after NUL terminator X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, May 26, 2021 at 11:44 PM Dmitry Kozlyuk wrote: > > 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 Reproduced the issue described in bz on my (old) RHEL7 with clang 3.4.2. Reviewed-by: David Marchand Just to confirm my reading of the C version of pmdinfogen: the C version formats those symbols fine with printf %s. So there should be no need for a fix in stable branches, right? -- David Marchand