Commit 7a973251 authored by David S. Miller's avatar David S. Miller

Merge branch 's390-bpf-jit-fixes'

Daniel Borkmann says:

====================
Two BPF fixes for s390

Found while testing some other work touching JITs.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1aff0c34 bad1926d
...@@ -1253,7 +1253,8 @@ static int bpf_jit_prog(struct bpf_jit *jit, struct bpf_prog *fp) ...@@ -1253,7 +1253,8 @@ static int bpf_jit_prog(struct bpf_jit *jit, struct bpf_prog *fp)
insn_count = bpf_jit_insn(jit, fp, i); insn_count = bpf_jit_insn(jit, fp, i);
if (insn_count < 0) if (insn_count < 0)
return -1; return -1;
jit->addrs[i + 1] = jit->prg; /* Next instruction address */ /* Next instruction address */
jit->addrs[i + insn_count] = jit->prg;
} }
bpf_jit_epilogue(jit); bpf_jit_epilogue(jit);
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
# define __NR_bpf 280 # define __NR_bpf 280
# elif defined(__sparc__) # elif defined(__sparc__)
# define __NR_bpf 349 # define __NR_bpf 349
# elif defined(__s390__)
# define __NR_bpf 351
# else # else
# error __NR_bpf not defined. libbpf does not support your arch. # error __NR_bpf not defined. libbpf does not support your arch.
# endif # endif
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
# define __NR_bpf 280 # define __NR_bpf 280
# elif defined(__sparc__) # elif defined(__sparc__)
# define __NR_bpf 349 # define __NR_bpf 349
# elif defined(__s390__)
# define __NR_bpf 351
# else # else
# error __NR_bpf not defined. libbpf does not support your arch. # error __NR_bpf not defined. libbpf does not support your arch.
# endif # endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment