linux-stable/arch
Markos Chandras b4fe0ec86d MIPS: bpf: Fix PKT_TYPE case for big-endian cores
The skb->pkt_type field is defined as follows:

u8 pkt_type:3,
   fclone:2,
   ipvs_property:1,
   peeked:1,
   nf_trace:1

resulting to the following layout in big-endian systems

[pkt_type][fclone][ipvs_propery][peeked][nf_trace]
^                                                ^
|                                                |
LSB                                             MSB

As a result, the existing code did not work because it was trying to
match pkt_type == 7 whereas in reality it is 7<<5 on big-endian
systems.

This has been fixed in the interpreter in
0dcceabb0c
"net: filter: fix SKF_AD_PKTTYPE extension on big-endian"

The fix is to look for 7<<5 on big-endian systems for the pkt_type
field, and shift by 5 so the packet type will be at the lower 3 bits
of the A register.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7132/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-06-26 10:48:22 +01:00
..
alpha Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
arc Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
arm This pull request contains the second half the of the clk changes for 2014-06-15 16:02:20 -10:00
arm64 Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
avr32 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
blackfin blackfin updates for Linux 3.16 2014-06-12 20:08:47 -07:00
c6x DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
cris cris: update comments for generic idle conversion 2014-06-06 16:08:18 -07:00
frv sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
hexagon
ia64 Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
m32r
m68k Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
metag Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
microblaze Microblaze patches for 3.16-rc1 2014-06-05 16:15:33 -07:00
mips MIPS: bpf: Fix PKT_TYPE case for big-endian cores 2014-06-26 10:48:22 +01:00
mn10300 sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
openrisc DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
parisc Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
powerpc Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-06-12 21:23:38 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
score
sh Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-06-12 14:27:40 -07:00
tile Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
um Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-06-12 21:23:38 -07:00
unicore32 arch/unicore32/mm/ioremap.c: return NULL on invalid pfn 2014-06-04 16:53:53 -07:00
x86 Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-14 14:46:29 -07:00
xtensa Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
.gitignore
Kconfig