Re: [PATCH bpf-next v2 5/5] bpf: selftests: add bpf_mptcp_sock() verifier tests

From: Song Liu
Date: Mon Sep 14 2020 - 14:10:07 EST


On Fri, Sep 11, 2020 at 9:46 AM Nicolas Rybowski
<nicolas.rybowski@xxxxxxxxxxxx> wrote:
>
> This patch adds verifier side tests for the new bpf_mptcp_sock() helper.
>
> Here are the new tests :
> - NULL bpf_sock is correctly handled
> - We cannot access a field from bpf_mptcp_sock if the latter is NULL
> - We can access a field from bpf_mptcp_sock if the latter is not NULL
> - We cannot modify a field from bpf_mptcp_sock.
>
> Note that "token" is currently the only field in bpf_mptcp_sock.
>
> Currently, there is no easy way to test the token field since we cannot
> get back the mptcp_sock in userspace, this could be a future amelioration.
>
> Acked-by: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>
> Signed-off-by: Nicolas Rybowski <nicolas.rybowski@xxxxxxxxxxxx>

Acked-by: Song Liu <songliubraving@xxxxxx>