BPF List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Johannes Krude <johannes@krude.de>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	trivial@kernel.org
Subject: Re: [PATCH] bpf_prog_offload_info_fill: replace bitwise AND by logical AND
Date: Wed, 12 Feb 2020 19:38:29 -0800	[thread overview]
Message-ID: <20200212193829.00ddefc0@cakuba.hsd1.ca.comcast.net> (raw)
In-Reply-To: <20200212193227.GA3769@phlox.h.transitiv.net>

On Wed, 12 Feb 2020 20:32:27 +0100, Johannes Krude wrote:
> This if guards whether user-space wants a copy of the offload-jited
> bytecode and whether this bytecode exists. By erroneously doing a bitwise
> AND instead of a logical AND on user- and kernel-space buffer-size can lead
> to no data being copied to user-space especially when user-space size is a
> power of two and bigger then the kernel-space buffer.
> 
> Signed-off-by: Johannes Krude <johannes@krude.de>

Thank you for the fix, in the future please provide a Fixes tag and
include the tree name in the PATCH tag, e.g. [PATCH bpf], or [PATCH net]
etc.

Fixes: fcfb126defda ("bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info")

Acked-by: Jakub Kicinski <kuba@kernel.org>

  reply	other threads:[~2020-02-13  3:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 19:32 [PATCH] bpf_prog_offload_info_fill: replace bitwise AND by logical AND Johannes Krude
2020-02-13  3:38 ` Jakub Kicinski [this message]
2020-02-17 15:56 ` Daniel Borkmann

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=20200212193829.00ddefc0@cakuba.hsd1.ca.comcast.net \
    --to=kuba@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=johannes@krude.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=trivial@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