]> git.baikalelectronics.ru Git - kernel.git/commit
s390/bpf: Only clear A and X for converted BPF programs
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Wed, 29 Jul 2015 19:15:17 +0000 (21:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jul 2015 21:59:58 +0000 (14:59 -0700)
commitac692962ddae4a9bb64105ec9e1543c507ebed7a
tree888437f97f8dd86ce7dc02a2a607c97e46b4fdbc
parent126ef06624f80b1ccc835b40f6a31f770b33d6e3
s390/bpf: Only clear A and X for converted BPF programs

Only classic BPF programs that have been converted to eBPF need to clear
the A and X registers. We can check for converted programs with:

  bpf_prog->type == BPF_PROG_TYPE_UNSPEC

So add the check and skip initialization for real eBPF programs.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/s390/net/bpf_jit_comp.c