]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: fix endianness annotation for 'struct jit_ctx' and friends
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Wed, 28 Jun 2017 14:58:03 +0000 (16:58 +0200)
committerWill Deacon <will.deacon@arm.com>
Fri, 30 Jun 2017 16:11:28 +0000 (17:11 +0100)
commitbce2e6cf4c53de4cdebf01248ff64adc6d8242ef
treef5c1b14561bd44748353c203903539e39bf222c1
parent9eedf7339e6af3106fe88f0740cff7b9243e9ceb
arm64: fix endianness annotation for 'struct jit_ctx' and friends

struct jit_ctx::image is used the store a pointer to the jitted
intructions, which are always little-endian. These instructions
are thus correctly converted from native order to little-endian
before being stored but the pointer 'image' is declared as for
native order values.

Fix this by declaring the field as __le32* instead of u32*.
Same for the pointer used in jit_fill_hole() to initialize
the image.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/net/bpf_jit_comp.c