]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/samples: Fix PT_REGS_IP on s390x and use it
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Mon, 28 Nov 2016 12:48:30 +0000 (13:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 21:26:46 +0000 (16:26 -0500)
commitce303b831486bb6ec04d5713df82c7f91c0f0b40
tree41e787570b3556b00b59ffcba6d0ba826a62ebf2
parentac01e7eca40e1814ff2eb26d90708b58a86ebeac
bpf/samples: Fix PT_REGS_IP on s390x and use it

The files "sampleip_kern.c" and "trace_event_kern.c" directly access
"ctx->regs.ip" which is not available on s390x. Fix this and use the
PT_REGS_IP() macro instead.

Also fix the macro for s390x and use "psw.addr" from "pt_regs".

Reported-by: Zvonko Kosic <zvonko.kosic@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/bpf_helpers.h
samples/bpf/sampleip_kern.c
samples/bpf/trace_event_kern.c