On Fri, Sep 11, 2020 at 9:46 AM Nicolas Rybowski nicolas.rybowski@tessares.net 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@tessares.net Signed-off-by: Nicolas Rybowski nicolas.rybowski@tessares.net
Acked-by: Song Liu songliubraving@fb.com