Re: [PATCH bpf-next v2 2/7] bpf/syscall: allow key to be null in map functions

2018-10-10 Thread Song Liu
On Wed, Oct 10, 2018 at 7:06 AM Mauricio Vasquez B wrote: > > This commit adds the required logic to allow key being NULL > in case the key_size of the map is 0. > > A new __bpf_copy_key function helper only copies the key from > userpsace when key_size != 0, otherwise it enforces that key must be

[PATCH bpf-next v2 2/7] bpf/syscall: allow key to be null in map functions

2018-10-10 Thread Mauricio Vasquez B
This commit adds the required logic to allow key being NULL in case the key_size of the map is 0. A new __bpf_copy_key function helper only copies the key from userpsace when key_size != 0, otherwise it enforces that key must be null. Signed-off-by: Mauricio Vasquez B --- kernel/bpf/syscall.c |