WSL2-Linux-Kernel/arch/sparc
Alexei Starovoitov f6f2332dce sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG
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: 2809a2087c ("net: filter: Just In Time compiler for sparc")
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-19 16:01:18 -04:00
..
boot sparc: Add "install" target 2014-08-04 20:45:59 -07:00
configs perf: Remove PERF_COUNTERS config option 2012-04-26 13:52:52 +02:00
crypto sparc64: fix sparse warnings in aes_glue.c 2014-05-18 19:01:33 -07:00
include sparc: Hook up memfd_create system call. 2014-08-13 22:00:09 -07:00
kernel sparc: Hook up memfd_create system call. 2014-08-13 22:00:09 -07:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next 2014-08-06 09:41:23 -07:00
math-emu arch/sparc/math-emu/math_32.c: drop stray break operator 2014-08-04 20:29:06 -07:00
mm sparc64: Fix up merge thinko. 2014-08-05 19:09:19 -07:00
net sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG 2014-09-19 16:01:18 -04:00
oprofile sparc: using HZ needs an include of linux/param.h 2009-10-05 00:46:08 -07:00
power sparc64: Hibernation support 2013-03-20 11:06:54 -07:00
prom sparc64: fix sparse warnings in smp_64.c 2014-05-18 19:01:31 -07:00
Kbuild sparc64: Add SHA1 driver making use of the 'sha1' instruction. 2012-08-20 15:08:49 -07:00
Kconfig lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig 2014-08-08 15:57:26 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile sparc: Add "install" target 2014-08-04 20:45:59 -07:00