This is a note to let you know that I've just added the patch titled

    x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND

to the 3.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:
     x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch
and it can be found in the queue-3.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 9b4c86fd07e1c29945883fb881c117c8e9cb14db Mon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Wed, 28 Mar 2012 23:27:00 +0000
Subject: x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND


From: "[email protected]" <[email protected]>

[ Upstream commit 1d24fb3684f347226747c6b11ea426b7b992694e ]

When K >= 0xFFFF0000, AND needs the two least significant bytes of K as
its operand, but EMIT2() gives it the least significant byte of K and
0x2. EMIT() should be used here to replace EMIT2().

Signed-off-by: Feiran Zhuang  <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 arch/x86/net/bpf_jit_comp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -289,7 +289,7 @@ void bpf_jit_compile(struct sk_filter *f
                                        EMIT2(0x24, K & 0xFF); /* and imm8,%al 
*/
                                } else if (K >= 0xFFFF0000) {
                                        EMIT2(0x66, 0x25);      /* and 
imm16,%ax */
-                                       EMIT2(K, 2);
+                                       EMIT(K, 2);
                                } else {
                                        EMIT1_off32(0x25, K);   /* and 
imm32,%eax */
                                }


Patches currently in stable-queue which might be from [email protected] are

queue-3.2/x86-bpf_jit-fix-a-bug-in-emitting-the-16-bit-immediate-operand-of-and.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to