Subject: Re: [PATCH net] net: filter: initialize A and X registers

From: Martin Schwidefsky <[email-masked]>
Date: Thu, 24 Apr 2014 09:07:12 +0200

On Wed, 23 Apr 2014 19:55:09 -0700
Eric Dumazet <[email-masked]> wrote:

> On Wed, 2014-04-23 at 15:19 -0700, Alexei Starovoitov wrote:
> 
> > yes, x86 jit is smart to deal around this problem in an efficient way.
> > sparc/arm jits copy pasted the idea correctly.
> 
> Well... not really smart, but sufficient enough (even if I am sure we
> probably have some bugs)
> 
> > but s390 jit seems to have a bug, since it's not clearing A
> > when 1st insn is BPF_S_LDX_B_MSH
> 
> Sure, JIT is hard and quite risky (You forgot to CC Heiko & Martin, they
> probably can send the needed patch)

That should be a one-line patch which removes the BPF_S_LDX_B_MSH opcode
from the switch statement in bpf_jit_noleaks.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.