Skip to content

Conversation

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

Pull request for series with
subject: bpf/helpers: bpf_strnstr: Exact match length
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=995877

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

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

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

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

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

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

strnstr should not treat the ending '\0' of s2 as a matching character,
otherwise the parameter 'len' will be meaningless, for example:

    1. bpf_strnstr("openat", "open", 4) = -ENOENT
    2. bpf_strnstr("openat", "open", 5) = 0

This patch makes (1) return 0, indicating a successful match.

Signed-off-by: Rong Tao <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=995877 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