All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid.com>
To: Daniel Borkmann <dborkman@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Network Development <netdev@vger.kernel.org>,
	Mikulas Patocka <mpatocka@redhat.com>
Subject: Re: [PATCH net-next 3/3] net: bpf: be friendly to kmemcheck
Date: Sat, 6 Sep 2014 09:09:51 -0700	[thread overview]
Message-ID: <CAMEtUuz5ec8=-x9QO+jjSENz+rKVdv0Avhupi4snSgUboSaKUA@mail.gmail.com> (raw)
In-Reply-To: <1409996567-2170-4-git-send-email-dborkman@redhat.com>

On Sat, Sep 6, 2014 at 2:42 AM, Daniel Borkmann <dborkman@redhat.com> wrote:
> Reported by Mikulas Patocka, kmemcheck currently barks out a
> false positive since we don't have special kmemcheck annotation
> for bitfields used in bpf_prog structure.
>
> We currently have jited:1, len:31 and thus when accessing len
> while CONFIG_KMEMCHECK enabled, kmemcheck throws a warning that
> we're reading uninitialized memory.
>
> As we don't need the whole bit universe for pages member, we
> can just split it to u16 and use a bool flag for jited instead
> of a bitfield.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: Alexei Starovoitov <ast@plumgrid.com>
> ---
>  arch/arm/net/bpf_jit_32.c       | 2 +-
>  arch/mips/net/bpf_jit.c         | 2 +-
>  arch/powerpc/net/bpf_jit_comp.c | 2 +-
>  arch/s390/net/bpf_jit_comp.c    | 2 +-
>  arch/sparc/net/bpf_jit_comp.c   | 2 +-
>  arch/x86/net/bpf_jit_comp.c     | 2 +-
>  include/linux/filter.h          | 6 +++---
>  net/core/filter.c               | 2 +-
>  8 files changed, 10 insertions(+), 10 deletions(-)

This one also looks good. Thanks!
Acked-by: Alexei Starovoitov <ast@plumgrid.com>

      reply	other threads:[~2014-09-06 16:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-06  9:42 [PATCH net-next 0/3] BPF updates Daniel Borkmann
2014-09-06  9:42 ` [PATCH net-next 1/3] net: bpf: consolidate JIT binary allocator Daniel Borkmann
2014-09-07 23:15   ` David Miller
2014-09-08  0:17     ` Alexei Starovoitov
2014-09-08  6:09     ` Daniel Borkmann
2014-09-08  6:17   ` Heiko Carstens
2014-09-08  8:12     ` Daniel Borkmann
2014-09-06  9:42 ` [PATCH net-next 2/3] net: bpf: arm: address randomize and write protect JIT code Daniel Borkmann
2014-09-06 17:36   ` Mircea Gherzan
2014-09-06  9:42 ` [PATCH net-next 3/3] net: bpf: be friendly to kmemcheck Daniel Borkmann
2014-09-06 16:09   ` Alexei Starovoitov [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='CAMEtUuz5ec8=-x9QO+jjSENz+rKVdv0Avhupi4snSgUboSaKUA@mail.gmail.com' \
    --to=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=netdev@vger.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 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.