linux/arch/arm64
Xi Wang a45b402bb2 arm64: bpf: fix signedness bug in loading 64-bit immediate
[ Upstream commit 1e4df6b720 ]

Consider "(u64)insn1.imm << 32 | imm" in the arm64 JIT.  Since imm is
signed 32-bit, it is sign-extended to 64-bit, losing the high 32 bits.
The fix is to convert imm to u32 first, which will be zero-extended to
u64 implicitly.

Cc: Zi Shen Lim <zlim.lnx@gmail.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@vger.kernel.org>
Fixes: 30d3d94cc3 ("arm64: bpf: add 'load 64-bit immediate' instruction")
Signed-off-by: Xi Wang <xi.wang@gmail.com>
[will: removed non-arm64 bits and redundant casting]
Signed-off-by: Will Deacon <will.deacon@arm.com>

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-06-10 13:42:27 -04:00
..
boot dtb: xgene: fix: Backward compatibility with older firmware 2014-11-04 17:08:42 -05:00
configs arm64: defconfig: update defconfig for 3.18 2014-11-05 17:07:58 +00:00
crypto crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:46 -08:00
include KVM: arm/arm64: check IRQ number on userland injection 2015-05-17 19:11:50 -04:00
kernel arm64: fix midr range for Cortex-A57 erratum 832075 2015-04-27 17:13:47 -04:00
kvm arm64: KVM: Fix HCR setting for 32bit guests 2015-05-11 07:07:35 -04:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: dma-mapping: always clear allocated buffers 2015-05-17 19:12:38 -04:00
net arm64: bpf: fix signedness bug in loading 64-bit immediate 2015-06-10 13:42:27 -04:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: errata: add workaround for cortex-a53 erratum #845719 2015-04-27 17:13:46 -04:00
Kconfig.debug arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support 2014-09-08 14:39:18 +01:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-10-14 09:22:26 +02:00