From: David Miller <davem@davemloft.net>
To: ast@plumgrid.com
Cc: dborkman@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG
Date: Fri, 19 Sep 2014 16:02:00 -0400 (EDT) [thread overview]
Message-ID: <20140919.160200.48663669220936853.davem@davemloft.net> (raw)
In-Reply-To: <1410917578-5122-1-git-send-email-ast@plumgrid.com>
From: Alexei Starovoitov <ast@plumgrid.com>
Date: Tue, 16 Sep 2014 18:32:58 -0700
> fix several issues in sparc BPF JIT compiler.
>
> ldx/stx related:
> . classic BPF instructions that access mem[] slots were not setting
> SEEN_MEM flag, so stack wasn't allocated. Fix that by advertising
> correct flags
>
> . LDX/STX instructions were missing SEEN_XREG, so register value
> could have leaked to user space. Fix it.
>
> . since stack for mem[] slots is allocated with 'sub %sp' instead
> of 'save %sp', use %sp as base register instead of %fp.
>
> . ldx mem[0] means first slot in classic BPF which should have
> -4 offset instead of 0.
>
> . sparc64 needs 2047 stack bias as per ABI to access stack
>
> . emit_stmem() was using LD32I macro instead of ST32I
>
> SKF_AD_VLAN_TAG* related:
> . SKF_AD_VLAN_TAG_PRESENT must return 1 or 0 instead of '> 0' or 0
> as per classic BPF de facto standard
>
> . SKF_AD_VLAN_TAG needs to mask the field correctly
>
> Fixes: 2809a2087cc4 ("net: filter: Just In Time compiler for sparc")
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Applied and queued up for -stable, thanks!
prev parent reply other threads:[~2014-09-19 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 1:32 [PATCH net] sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG Alexei Starovoitov
2014-09-19 20:02 ` David Miller [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=20140919.160200.48663669220936853.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@plumgrid.com \
--cc=dborkman@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).