android_kernel_google_msm/arch/x86
Alexei Starovoitov 67ba9818b3 x86: bpf_jit: fix compilation of large bpf programs
commit 3f7352bf21f8fd7ba3e2fcef9488756f188e12be upstream.

x86 has variable length encoding. x86 JIT compiler is trying
to pick the shortest encoding for given bpf instruction.
While doing so the jump targets are changing, so JIT is doing
multiple passes over the program. Typical program needs 3 passes.
Some very short programs converge with 2 passes. Large programs
may need 4 or 5. But specially crafted bpf programs may hit the
pass limit and if the program converges on the last iteration
the JIT compiler will be producing an image full of 'int 3' insns.
Fix this corner case by doing final iteration over bpf program.

Fixes: 0a14842f5a ("net: filter: Just In Time compiler for x86-64")
Reported-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Tested-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-09-18 09:20:42 +08:00
..
boot x86, build: Pass in additional -mno-mmx, -mno-sse options 2014-06-07 16:02:08 -07:00
configs
crypto crypto: aesni - fix memory usage in GCM decryption 2015-06-19 11:40:28 +08:00
ia32
include/asm x86/iommu: Fix header comments regarding standard and _FINISH macros 2015-09-18 09:20:28 +08:00
kernel x86/mce: Fix MCE severity messages 2015-09-18 09:20:42 +08:00
kvm KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages 2015-09-18 09:20:40 +08:00
lguest
lib
math-emu
mm x86, mm/ASLR: Fix stack randomization on 64-bit systems 2015-04-14 17:33:58 +08:00
net x86: bpf_jit: fix compilation of large bpf programs 2015-09-18 09:20:42 +08:00
oprofile
pci
platform x86/efi: Fix dummy variable buffer allocation 2014-06-07 16:02:10 -07:00
power
syscalls x86, x32: Use compat shims for io_{setup,submit} 2014-06-30 20:01:33 -07:00
tools
um x86, um: actually mark system call tables readonly 2015-04-14 17:33:49 +08:00
vdso x86/vdso: Fix the build on GCC5 2015-06-19 11:40:25 +08:00
video
xen xen/smp/spinlock: Fix leakage of the spinlock interrupt line for every CPU online/offline 2014-03-11 16:10:06 -07:00
.gitignore
Kbuild
Kconfig config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected 2015-06-19 11:40:34 +08:00
Kconfig.cpu
Kconfig.debug
Makefile
Makefile.um
Makefile_32.cpu