mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
powerpc/bpf: Remove bpf_jit_free()
Commit74451e66d5
("bpf: make jited programs visible in traces") added a default bpf_jit_free() implementation. Powerpc did not use the default bpf_jit_free() as powerpc did not set the images read-only. The default bpf_jit_free() called bpf_jit_binary_unlock_ro() is why it could not be used for powerpc. Commitd53d2f78ce
("bpf: Use vmalloc special flag") moved keeping track of read-only memory to vmalloc. This included removing bpf_jit_binary_unlock_ro(). Therefore there is no reason powerpc needs its own bpf_jit_free(). Remove it. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210609013431.9805-6-jniethe5@gmail.com
This commit is contained in:
parent
6a3a58e623
commit
bc33cfdb0b
1 changed files with 0 additions and 12 deletions
|
@ -257,15 +257,3 @@ out:
|
|||
|
||||
return fp;
|
||||
}
|
||||
|
||||
/* Overriding bpf_jit_free() as we don't set images read-only. */
|
||||
void bpf_jit_free(struct bpf_prog *fp)
|
||||
{
|
||||
unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
|
||||
struct bpf_binary_header *bpf_hdr = (void *)addr;
|
||||
|
||||
if (fp->jited)
|
||||
bpf_jit_binary_free(bpf_hdr);
|
||||
|
||||
bpf_prog_unlock_free(fp);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue