Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: bpf: stub out skb metadata dynptr read/write ops when CONFIG_NET=n
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=995995

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 2465bb8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995995
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 2660b9d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995995
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: d3abefe
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995995
version: 1

Kernel Test Robot reported a compiler warning - a null pointer may be
passed to memmove in __bpf_dynptr_{read,write} when building without
networking support.

The warning is correct from a static analysis standpoint, but not actually
reachable. Without CONFIG_NET, creating dynptrs to skb metadata is
impossible since the constructor kfunc is missing.

Fix this the same way as for skb and xdp data dynptrs. Add wrappers for
loading and storing bytes to skb metadata, and stub them out to return an
error when CONFIG_NET=n.

Fixes: 6877cd3 ("bpf: Enable read/write access to skb metadata through a dynptr")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Jakub Sitnicki <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 4c229f3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995995
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=995995 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants