Skip to content

Conversation

kernel-patches-daemon-bpf-rc[bot]
Copy link

Pull request for series with
subject: bpf: introduce kfunc flags for dynptr types
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1003829

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

Upstream branch: 6ff4a0f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1003829
version: 1

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

Upstream branch: 6ff4a0f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1003829
version: 1

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

Upstream branch: 3547a61
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1003829
version: 1

The verifier currently special-cases dynptr initialization kfuncs to set
the correct dynptr type for an uninitialized argument. This patch moves
that logic into kfunc metadata.

Introduce KF_DYNPTR_* kfunc flags and a helper,
dynptr_type_from_kfunc_flags(), which translates those flags into the
appropriate DYNPTR_TYPE_* mask. With the type encoded in the kfunc
declaration, the verifier no longer needs explicit checks for
bpf_dynptr_from_xdp(), bpf_dynptr_from_skb(), and
bpf_dynptr_from_skb_meta().

This simplifies the verifier and centralizes dynptr typing in kfunc
declarations, with no user-visible behavior change.

Signed-off-by: Mykyta Yatsenko <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8cd189e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1003829
version: 1

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.

1 participant