bpf: enforce all maps having memory usage callback
authorYafang Shao <laoar.shao@gmail.com>
Sun, 5 Mar 2023 12:46:15 +0000 (12:46 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 7 Mar 2023 17:33:43 +0000 (09:33 -0800)
commit6b4a6ea2c62d34272d64161d43a19c02355576e2
tree33e31263163cc0d003c2942de91b147606a60e38
parent9629363cd05642fe43aded44938adec067ad1da3
bpf: enforce all maps having memory usage callback

We have implemented memory usage callback for all maps, and we enforce
any newly added map having a callback as well. We check this callback at
map creation time. If it doesn't have the callback, we will return
EINVAL.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Link: https://lore.kernel.org/r/20230305124615.12358-19-laoar.shao@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/syscall.c