|
@@ -68,7 +68,7 @@ struct jit_ctx {
|
|
int idx;
|
|
int idx;
|
|
int epilogue_offset;
|
|
int epilogue_offset;
|
|
int *offset;
|
|
int *offset;
|
|
- u32 *image;
|
|
|
|
|
|
+ __le32 *image;
|
|
};
|
|
};
|
|
|
|
|
|
static inline void emit(const u32 insn, struct jit_ctx *ctx)
|
|
static inline void emit(const u32 insn, struct jit_ctx *ctx)
|
|
@@ -128,7 +128,7 @@ static inline int bpf2a64_offset(int bpf_to, int bpf_from,
|
|
|
|
|
|
static void jit_fill_hole(void *area, unsigned int size)
|
|
static void jit_fill_hole(void *area, unsigned int size)
|
|
{
|
|
{
|
|
- u32 *ptr;
|
|
|
|
|
|
+ __le32 *ptr;
|
|
/* We are guaranteed to have aligned memory. */
|
|
/* We are guaranteed to have aligned memory. */
|
|
for (ptr = area; size >= sizeof(u32); size -= sizeof(u32))
|
|
for (ptr = area; size >= sizeof(u32); size -= sizeof(u32))
|
|
*ptr++ = cpu_to_le32(AARCH64_BREAK_FAULT);
|
|
*ptr++ = cpu_to_le32(AARCH64_BREAK_FAULT);
|
|
@@ -871,7 +871,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
|
|
|
|
|
/* 2. Now, the actual pass. */
|
|
/* 2. Now, the actual pass. */
|
|
|
|
|
|
- ctx.image = (u32 *)image_ptr;
|
|
|
|
|
|
+ ctx.image = (__le32 *)image_ptr;
|
|
ctx.idx = 0;
|
|
ctx.idx = 0;
|
|
|
|
|
|
build_prologue(&ctx);
|
|
build_prologue(&ctx);
|