Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6acdc9a6 authored by Naveen N. Rao's avatar Naveen N. Rao Committed by Michael Ellerman
Browse files

powerpc/bpf: Use memset32() to pre-fill traps in BPF page(s)



Use the newly introduced memset32() to pre-fill BPF page(s) with trap
instructions.

Signed-off-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 694fc88c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -25,11 +25,7 @@ int bpf_jit_enable __read_mostly;

static void bpf_jit_fill_ill_insns(void *area, unsigned int size)
{
	int *p = area;

	/* Fill whole space with trap instructions */
	while (p < (int *)((char *)area + size))
		*p++ = BREAKPOINT_INSTRUCTION;
	memset32(area, BREAKPOINT_INSTRUCTION, size/4);
}

static inline void bpf_flush_icache(void *start, void *end)