]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf, xdp: constify some bpf_prog * function arguments
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Tue, 3 Dec 2024 17:37:25 +0000 (18:37 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Dec 2024 02:41:06 +0000 (18:41 -0800)
commit7cd1107f48e2a246c6a628c2381e1b8aafa4675a
tree62f370fc53c5971f5681117c8aa47d380642dce9
parentca5c94949facce1f67a4a9a9528a27f635ff3e78
bpf, xdp: constify some bpf_prog * function arguments

In lots of places, bpf_prog pointer is used only for tracing or other
stuff that doesn't modify the structure itself. Same for net_device.
Address at least some of them and add `const` attributes there. The
object code didn't change, but that may prevent unwanted data
modifications and also allow more helpers to have const arguments.

Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/bpf.h
include/linux/filter.h
include/linux/netdevice.h
include/linux/skbuff.h
kernel/bpf/devmap.c
net/core/dev.c
net/core/filter.c
net/core/skbuff.c