[dpdk-dev] [PATCH] pmdinfogen: allow padding after NUL terminator
David Marchand
david.marchand at redhat.com
Thu May 27 08:53:19 CEST 2021
On Wed, May 26, 2021 at 11:44 PM Dmitry Kozlyuk
<dmitry.kozliuk at gmail.com> 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 <dmitry.kozliuk at gmail.com>
Reproduced the issue described in bz on my (old) RHEL7 with clang 3.4.2.
Reviewed-by: David Marchand <david.marchand at redhat.com>
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
More information about the dev
mailing list