Re: [PATCH bpf-next v4 1/2] bpf: allow map helpers access to map values directly

2018-04-24 Thread Paul Chaignon
On 04/23/2018 11:18 PM +0200, Daniel Borkmann wrote: > On 04/22/2018 11:52 PM, Paul Chaignon wrote: > > Helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only > > access stack and packet memory. Allow these helpers to directly access > > map values by passing registers of type

Re: [PATCH bpf-next v4 1/2] bpf: allow map helpers access to map values directly

2018-04-23 Thread Daniel Borkmann
On 04/22/2018 11:52 PM, Paul Chaignon wrote: > Helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only > access stack and packet memory. Allow these helpers to directly access > map values by passing registers of type PTR_TO_MAP_VALUE. > > This change removes the need for an

[PATCH bpf-next v4 1/2] bpf: allow map helpers access to map values directly

2018-04-22 Thread Paul Chaignon
Helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only access stack and packet memory. Allow these helpers to directly access map values by passing registers of type PTR_TO_MAP_VALUE. This change removes the need for an extra copy to the stack when using a map value to perform