Re: [dpdk-dev] [PATCH] bpf: fix to allow ptr stack program type

2019-08-12 Thread Ananyev, Konstantin
Hi Jerin, > > > > > > > > > > bpf_validate does not allow to execute RTE_BPF_ARG_PTR_STACK for > > > > > no reason. > > > > > > > > I believe there is a reason, > > > > ARG_PTR_STACK is reserved for memory within BPF program internal > > > > stack only. > > > > User that calls BPF program should n

Re: [dpdk-dev] [PATCH] bpf: fix to allow ptr stack program type

2019-08-12 Thread Jerin Jacob Kollanukkaran
> -Original Message- > From: Ananyev, Konstantin > Sent: Monday, August 12, 2019 5:08 PM > To: Jerin Jacob Kollanukkaran ; dev@dpdk.org > Cc: tho...@monjalon.net; sta...@dpdk.org > Subject: [EXT] RE: [dpdk-dev] [PATCH] bpf: fix to allow ptr stack program > typ

Re: [dpdk-dev] [PATCH] bpf: fix to allow ptr stack program type

2019-08-12 Thread Ananyev, Konstantin
> > Hi Jerin, > > Hi Konstantin, > > > > > > > > > bpf_validate does not allow to execute RTE_BPF_ARG_PTR_STACK for no > > > reason. > > > > I believe there is a reason, > > ARG_PTR_STACK is reserved for memory within BPF program internal stack > > only. > > User that calls BPF program should n

Re: [dpdk-dev] [PATCH] bpf: fix to allow ptr stack program type

2019-08-12 Thread Jerin Jacob Kollanukkaran
> -Original Message- > From: Ananyev, Konstantin > Sent: Monday, August 12, 2019 2:20 PM > To: Jerin Jacob Kollanukkaran ; dev@dpdk.org > Cc: tho...@monjalon.net; sta...@dpdk.org > Subject: [EXT] RE: [dpdk-dev] [PATCH] bpf: fix to allow ptr st

Re: [dpdk-dev] [PATCH] bpf: fix to allow ptr stack program type

2019-08-12 Thread Ananyev, Konstantin
Hi Jerin, > > bpf_validate does not allow to execute > RTE_BPF_ARG_PTR_STACK for no reason. I believe there is a reason, ARG_PTR_STACK is reserved for memory within BPF program internal stack only. User that calls BPF program should never pass parameter with that type. If the user allocates para

[dpdk-dev] [PATCH] bpf: fix to allow ptr stack program type

2019-08-09 Thread jerinj
From: Jerin Jacob bpf_validate does not allow to execute RTE_BPF_ARG_PTR_STACK for no reason. Fix it by enhancing the prog_arg.type check. Fixes: 6e12ec4c4d6d ("bpf: add more checks") Cc: sta...@dpdk.org Signed-off-by: Jerin Jacob --- lib/librte_bpf/bpf_validate.c | 1 + 1 file changed, 1 ins