summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2025-01-27 14:13:42 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-08 09:58:08 +0100
commit557707906dd3e34b8a8c265f664d19f95799937e (patch)
tree495fbac7b66fb1cf345cd8fa8384729315833f34 /scripts/stackusage
parent1dd823a46e25ffde1492c391934f69a9e5eb574f (diff)
downloadlinux-557707906dd3e34b8a8c265f664d19f95799937e.tar.gz
linux-557707906dd3e34b8a8c265f664d19f95799937e.tar.bz2
linux-557707906dd3e34b8a8c265f664d19f95799937e.zip
net: xdp: Disallow attaching device-bound programs in generic mode
[ Upstream commit 3595599fa8360bb3c7afa7ee50c810b4a64106ea ] Device-bound programs are used to support RX metadata kfuncs. These kfuncs are driver-specific and rely on the driver context to read the metadata. This means they can't work in generic XDP mode. However, there is no check to disallow such programs from being attached in generic mode, in which case the metadata kfuncs will be called in an invalid context, leading to crashes. Fix this by adding a check to disallow attaching device-bound programs in generic mode. Fixes: 2b3486bc2d23 ("bpf: Introduce device-bound XDP programs") Reported-by: Marcus Wichelmann <marcus.wichelmann@hetzner-cloud.de> Closes: https://lore.kernel.org/r/dae862ec-43b5-41a0-8edf-46c59071cdda@hetzner-cloud.de Tested-by: Marcus Wichelmann <marcus.wichelmann@hetzner-cloud.de> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20250127131344.238147-1-toke@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions