All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andrii@kernel.org>, <bpf@vger.kernel.org>,
	<ast@kernel.org>, <daniel@iogearbox.net>
Cc: <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 4/5] libbpf: fix section counting logic
Date: Tue, 2 Nov 2021 23:07:35 -0700	[thread overview]
Message-ID: <f17561ca-7348-720e-7009-aea2ef757a6d@fb.com> (raw)
In-Reply-To: <20211103001003.398812-5-andrii@kernel.org>



On 11/2/21 5:10 PM, Andrii Nakryiko wrote:
> e_shnum does include section #0 and as such is exactly the number of ELF
> sections that we need to allocate memory for to use section indices as
> array indices. Fix the off-by-one error.
> 
> This is purely accounting fix, previously we were overallocating one
> too many array items. But no correctness errors otherwise.
> 
> Fixes: 25bbbd7a444b ("libbpf: Remove assumptions about uniqueness of .rodata/.data/.bss maps")
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>

Acked-by: Yonghong Song <yhs@fb.com>

  reply	other threads:[~2021-11-03  6:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  0:09 [PATCH bpf-next 0/5] libbpf ELF sanity checking improvements Andrii Nakryiko
2021-11-03  0:09 ` [PATCH bpf-next 1/5] libbpf: detect corrupted ELF symbols section Andrii Nakryiko
2021-11-03  6:04   ` Yonghong Song
2021-11-03  0:10 ` [PATCH bpf-next 2/5] libbpf: improve sanity checking during BTF fix up Andrii Nakryiko
2021-11-03  6:06   ` Yonghong Song
2021-11-03 16:36     ` Andrii Nakryiko
2021-11-03 16:48       ` Andrii Nakryiko
2021-11-03  0:10 ` [PATCH bpf-next 3/5] libbpf: validate that .BTF and .BTF.ext sections contain data Andrii Nakryiko
2021-11-03  6:06   ` Yonghong Song
2021-11-03  0:10 ` [PATCH bpf-next 4/5] libbpf: fix section counting logic Andrii Nakryiko
2021-11-03  6:07   ` Yonghong Song [this message]
2021-11-03  0:10 ` [PATCH bpf-next 5/5] libbpf: improve ELF relo sanitization Andrii Nakryiko
2021-11-03  6:12   ` Yonghong Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f17561ca-7348-720e-7009-aea2ef757a6d@fb.com \
    --to=yhs@fb.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.