BPF List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Dave Marchevsky <davemarchevsky@fb.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org, martin.lau@kernel.org, kernel-team@fb.com,
	fw@strlen.de, eddyz87@gmail.com
Subject: Re: [PATCH bpf-next] bpf: Fix bpf_refcount_acquire's refcount_t address calculation
Date: Fri, 21 Apr 2023 14:40:21 +0000	[thread overview]
Message-ID: <168208802103.4759.10849441890270501771.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20230421074431.3548349-1-davemarchevsky@fb.com>

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Fri, 21 Apr 2023 00:44:31 -0700 you wrote:
> When calculating the address of the refcount_t struct within a local
> kptr, bpf_refcount_acquire_impl should add refcount_off bytes to the
> address of the local kptr. Due to some missing parens, the function is
> incorrectly adding sizeof(refcount_t) * refcount_off bytes. This patch
> fixes the calculation.
> 
> Due to the incorrect calculation, bpf_refcount_acquire_impl was trying
> to refcount_inc some memory well past the end of local kptrs, resulting
> in kasan and refcount complaints, as reported in [0]. In that thread,
> Florian and Eduard discovered that bpf selftests written in the new
> style - with __success and an expected __retval, specifically - were not
> actually being run. As a result, selftests added in bpf_refcount series
> weren't really exercising this behavior, and thus didn't unearth the
> bug.
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: Fix bpf_refcount_acquire's refcount_t address calculation
    https://git.kernel.org/bpf/bpf-next/c/4ab07209d5cc

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      reply	other threads:[~2023-04-21 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  7:44 [PATCH bpf-next] bpf: Fix bpf_refcount_acquire's refcount_t address calculation Dave Marchevsky
2023-04-21 14:40 ` patchwork-bot+netdevbpf [this message]

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=168208802103.4759.10849441890270501771.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davemarchevsky@fb.com \
    --cc=eddyz87@gmail.com \
    --cc=fw@strlen.de \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox