Skip to content
Commit c9d29f46 authored by Mauricio Vasquez B's avatar Mauricio Vasquez B Committed by Alexei Starovoitov
Browse files

bpf/syscall: allow key to be null in map functions



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: default avatarMauricio Vasquez B <mauricio.vasquez@polito.it>
Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 14499160
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment