linux/arch/x86
Alexei Starovoitov 769e0de647 bpf: x86: fix epilogue generation for eBPF programs
classic BPF has a restriction that last insn is always BPF_RET.
eBPF doesn't have BPF_RET instruction and this restriction.
It has BPF_EXIT insn which can appear anywhere in the program
one or more times and it doesn't have to be last insn.
Fix eBPF JIT to emit epilogue when first BPF_EXIT is seen
and all other BPF_EXIT instructions will be emitted as jump.

Since jump offset to epilogue is computed as:
jmp_offset = ctx->cleanup_addr - addrs[i]
we need to change type of cleanup_addr to signed to compute the offset as:
(long long) ((int)20 - (int)30)
instead of:
(long long) ((unsigned int)20 - (int)30)

Fixes: 622582786c ("net: filter: x86: internal BPF JIT")
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-05 21:23:54 -08:00
..
boot x86, kaslr: Prevent .bss from overlaping initrd 2014-11-01 22:20:50 +01:00
configs x86: Add "make tinyconfig" to configure the tiniest possible kernel 2014-08-08 16:30:24 -07:00
crypto Revert "crypto: aesni - disable "by8" AVX CTR optimization" 2014-10-02 14:40:28 +08:00
ia32 x86_64, entry: Fix out of bounds read on sysenter 2014-10-31 18:47:09 -07:00
include uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME 2014-11-23 14:25:28 -08:00
kernel Merge branch 'x86-traps' (trap handling from Andy Lutomirski) 2014-11-23 13:56:55 -08:00
kvm kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn() 2014-11-26 14:40:45 +01:00
lguest asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
lib x86-64: make csum_partial_copy_from_user() error handling consistent 2014-11-16 11:00:42 -08:00
math-emu asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
mm x86, mm: Set NX across entire PMD at boot 2014-11-18 18:32:24 +01:00
net bpf: x86: fix epilogue generation for eBPF programs 2014-12-05 21:23:54 -08:00
oprofile percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t 2014-08-28 08:58:57 -04:00
pci xen: features and fixes for 3.18-rc0 2014-10-11 20:29:01 -04:00
platform Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-31 14:30:16 -07:00
power nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2014-10-09 22:26:04 -04:00
purgatory arch/x86/purgatory/Makefile: try to use automatic variable in kexec purgatory makefile 2014-10-14 02:18:21 +02:00
realmode x86/build: Supress realmode.bin is up to date message 2014-04-16 15:17:24 +02:00
syscalls bpf: enable bpf syscall on x64 and i386 2014-09-26 15:05:14 -04:00
tools x86, kaslr: Handle Gold linker for finding bss/brk 2014-11-18 18:32:24 +01:00
um Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
vdso x86/vdso: Fix vdso2c's special_pages[] error checking 2014-09-24 09:55:38 +02:00
video
xen x86/core, x86/xen/smp: Use 'die_complete' completion when taking CPU down 2014-11-10 11:16:40 +01:00
.gitignore x86/build: Add arch/x86/purgatory/ make generated files to gitignore 2014-10-09 09:29:46 +02:00
Kbuild kexec: create a new config option CONFIG_KEXEC_FILE for new syscall 2014-08-29 16:28:16 -07:00
Kconfig perf/x86: Fix embarrasing typo 2014-11-04 07:06:58 +01:00
Kconfig.cpu Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
Kconfig.debug
Makefile Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 18:17:33 +02:00
Makefile_32.cpu
Makefile.um