diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2022-02-14 16:11:39 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-08 00:04:57 +1100 |
commit | 1d4866d5652f7a19dcbed0c4e366c3402c7775b7 (patch) | |
tree | c1b3c0dd4b8e34d7881b6761f84b59639fa16fce /arch/powerpc/net | |
parent | c2067f7f88830cdd020c775ffefe84a8177337af (diff) | |
download | linux-stable-1d4866d5652f7a19dcbed0c4e366c3402c7775b7.tar.gz linux-stable-1d4866d5652f7a19dcbed0c4e366c3402c7775b7.tar.bz2 linux-stable-1d4866d5652f7a19dcbed0c4e366c3402c7775b7.zip |
powerpc64/bpf: Use r12 for constant blinding
In preparation for preserving kernel toc in r2, switch BPF_REG_AX from
r2 to r12. r12 is not used by bpf JIT except during external helper/bpf
calls, or with BPF_NOSPEC. These sequences aren't emitted when
BPF_REG_AX is used for constant blinding and other purposes.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/e109f98617eacb4512c17a48525e94eda42889e6.1644834730.git.naveen.n.rao@linux.vnet.ibm.com
Diffstat (limited to 'arch/powerpc/net')
-rw-r--r-- | arch/powerpc/net/bpf_jit64.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/net/bpf_jit64.h b/arch/powerpc/net/bpf_jit64.h index b63b35e45e55..82cdfee41278 100644 --- a/arch/powerpc/net/bpf_jit64.h +++ b/arch/powerpc/net/bpf_jit64.h @@ -56,7 +56,7 @@ const int b2p[MAX_BPF_JIT_REG + 2] = { /* frame pointer aka BPF_REG_10 */ [BPF_REG_FP] = 31, /* eBPF jit internal registers */ - [BPF_REG_AX] = 2, + [BPF_REG_AX] = 12, [TMP_REG_1] = 9, [TMP_REG_2] = 10 }; |