Patch "MIPS: BPF: Avoid unreachable code on little endian" has been added to the 4.2-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
MIPS: BPF: Avoid unreachable code on little endian
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mips-bpf-avoid-unreachable-code-on-little-endian.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
faa9724a674e5e52316bb0d173aed16bd17d536cMon Sep 17 00:00:00 2001
From: Aurelien Jarno <[email protected]>
Date: Sat, 5 Sep 2015 18:46:56 +0200
Subject: MIPS: BPF: Avoid unreachable code on little endian
From: Aurelien Jarno <[email protected]>
commit faa9724a674e5e52316bb0d173aed16bd17d536c upstream.
On little endian, avoid generating the big endian version of the code by using #else in addition to #ifdef #endif. Also fix one alignment issue wrt delay slot.
Patchwork: https://patchwork.linux-mips.org/patch/11097/
--- arch/mips/net/bpf_jit_asm.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
arch/mips/net/bpf_jit_asm.S +5 -3
@@ -151,9 +151,10 @@ NESTED(bpf_slow_path_word, (6 * SZREG), wsbh t0, $r_s0 jr $r_ra rotr $r_A, t0, 16 -#endif +#else jr $r_ra - move $r_A, $r_s0 + move $r_A, $r_s0 +#endif END(bpf_slow_path_word)
@@ -162,9 +163,10 @@ NESTED(bpf_slow_path_half, (6 * SZREG), #ifdef CONFIG_CPU_LITTLE_ENDIAN jr $r_ra wsbh $r_A, $r_s0 -#endif +#else jr $r_ra move $r_A, $r_s0 +#endif END(bpf_slow_path_half)
Patches currently in stable-queue which might be from [email protected] are
queue-4.2/mips-bpf-fix-build-on-pre-r2-little-endian-cpus.patch queue-4.2/mips-bpf-avoid-unreachable-code-on-little-endian.patch