]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: Add cookie object to bpf maps
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 30 Jul 2025 23:47:30 +0000 (01:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:58:01 +0000 (18:58 +0200)
commit963e79f6bdac506023d35b3c14a2d8c15348a381
treec6d67b65aeed10e41a0703cf1c1b7dbd65832682
parentb0c51e95f54e5f4e13a7ada6629125b0bc427a96
bpf: Add cookie object to bpf maps

[ Upstream commit 12df58ad294253ac1d8df0c9bb9cf726397a671d ]

Add a cookie to BPF maps to uniquely identify BPF maps for the timespan
when the node is up. This is different to comparing a pointer or BPF map
id which could get rolled over and reused.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20250730234733.530041-1-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/bpf.h
kernel/bpf/syscall.c