diff options
| author | Geliang Tang <[email protected]> | 2022-05-19 23:30:14 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-05-20 22:35:00 +0000 |
| commit | 0266223467728d553b99adea769d9ff3b6e41372 (patch) | |
| tree | b4be9cf3dc4acf70ffcffccd5b9e5b30c621978a /net/unix/af_unix.c | |
| parent | selftests/bpf: Test bpf_skc_to_mptcp_sock (diff) | |
| download | kernel-0266223467728d553b99adea769d9ff3b6e41372.tar.gz kernel-0266223467728d553b99adea769d9ff3b6e41372.zip | |
selftests/bpf: Verify token of struct mptcp_sock
This patch verifies the struct member token of struct mptcp_sock. Add a
new member token in struct mptcp_storage to store the token value of the
msk socket got by bpf_skc_to_mptcp_sock(). Trace the kernel function
mptcp_pm_new_connection() by using bpf fentry prog to obtain the msk token
and save it in a global bpf variable. Pass the variable to verify_msk() to
verify it with the token saved in socket_storage_map.
v4:
- use ASSERT_* instead of CHECK_FAIL (Andrii)
- skip the test if 'ip mptcp monitor' is not supported (Mat)
v5:
- Drop 'ip mptcp monitor', trace mptcp_pm_new_connection instead (Martin)
- Use ASSERT_EQ (Andrii)
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Matthieu Baerts <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
