Re: [PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-22 Thread Jakub Kicinski
On Fri, 21 Dec 2018 17:24:01 -0800, Alexei Starovoitov wrote: > On Fri, Dec 21, 2018 at 03:46:32PM -0800, Jakub Kicinski wrote: > > On Thu, 20 Dec 2018 07:19:06 +, Yonghong Song wrote: > > > > I think this will break func_info, since it's not adjusted here. > > > > Also iirc line_info is relyin

Re: [PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-21 Thread Alexei Starovoitov
On Fri, Dec 21, 2018 at 03:46:32PM -0800, Jakub Kicinski wrote: > On Thu, 20 Dec 2018 07:19:06 +, Yonghong Song wrote: > > > I think this will break func_info, since it's not adjusted here. > > > Also iirc line_info is relying on first insn to always have line_info. > > > If first insn is dead,

Re: [PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-21 Thread Martin Lau
On Fri, Dec 21, 2018 at 03:46:32PM -0800, Jakub Kicinski wrote: > I want to also > tackle the JIT linfo offsets for offloads while at it and post an RFC > (unless you're handling that already Martin?) No. I am not :)

Re: [PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-21 Thread Jakub Kicinski
On Thu, 20 Dec 2018 07:19:06 +, Yonghong Song wrote: > > I think this will break func_info, since it's not adjusted here. > > Also iirc line_info is relying on first insn to always have line_info. > > If first insn is dead, second insn might not have a line_info generated > > and things won't g

Re: [PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-19 Thread Yonghong Song
On 12/19/18 4:45 PM, Alexei Starovoitov wrote: > On Wed, Dec 19, 2018 at 10:29:18AM -0800, Jakub Kicinski wrote: >> Instead of overwriting dead code with jmp -1 instructions >> remove it completely for root. Adjust verifier state and >> line info appropriately. >> >> Signed-off-by: Jakub Kicinsk

Re: [PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-19 Thread Alexei Starovoitov
On Wed, Dec 19, 2018 at 10:29:18AM -0800, Jakub Kicinski wrote: > Instead of overwriting dead code with jmp -1 instructions > remove it completely for root. Adjust verifier state and > line info appropriately. > > Signed-off-by: Jakub Kicinski > --- > include/linux/filter.h | 1 + > kernel/bp

[PATCH bpf-next 07/19] bpf: verifier: remove dead code

2018-12-19 Thread Jakub Kicinski
Instead of overwriting dead code with jmp -1 instructions remove it completely for root. Adjust verifier state and line info appropriately. Signed-off-by: Jakub Kicinski --- include/linux/filter.h | 1 + kernel/bpf/core.c | 12 kernel/bpf/verifier.c | 139 +