Daniel Borkmann
43d2b88c29
bpf, selftests: Add test case for mixed cgroup v1/v2
...
Minimal selftest which implements a small BPF policy program to the
connect(2) hook which rejects TCP connection requests to port 60123
with EPERM. This is being attached to a non-root cgroup v2 path. The
test asserts that this works under cgroup v2-only and under a mixed
cgroup v1/v2 environment where net_classid is set in the former case.
Before fix:
# ./test_progs -t cgroup_v1v2
test_cgroup_v1v2:PASS:server_fd 0 nsec
test_cgroup_v1v2:PASS:client_fd 0 nsec
test_cgroup_v1v2:PASS:cgroup_fd 0 nsec
test_cgroup_v1v2:PASS:server_fd 0 nsec
run_test:PASS:skel_open 0 nsec
run_test:PASS:prog_attach 0 nsec
test_cgroup_v1v2:PASS:cgroup-v2-only 0 nsec
run_test:PASS:skel_open 0 nsec
run_test:PASS:prog_attach 0 nsec
run_test:PASS:join_classid 0 nsec
(network_helpers.c:219: errno: None) Unexpected success to connect to server
test_cgroup_v1v2:FAIL:cgroup-v1v2 unexpected error: -1 (errno 0)
#27 cgroup_v1v2:FAIL
Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED
After fix:
# ./test_progs -t cgroup_v1v2
#27 cgroup_v1v2:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Andrii Nakryiko <andrii@kernel.org >
Link: https://lore.kernel.org/bpf/20210913230759.2313-3-daniel@iogearbox.net
2021-09-13 16:35:58 -07:00
..
2020-03-25 11:50:48 +01:00
2020-12-10 13:11:30 -08:00
2021-02-08 17:55:01 -08:00
2021-05-19 00:41:56 +02:00
2021-08-17 00:45:08 +02:00
2020-06-28 10:06:53 -07:00
2021-01-27 18:18:15 -08:00
2021-08-17 00:45:08 +02:00
2021-07-23 16:45:17 -07:00
2021-08-15 00:19:06 -07:00
2020-08-13 16:45:41 -07:00
2021-08-25 17:40:35 -07:00
2021-03-04 16:44:00 +01:00
2020-11-05 18:37:31 -08:00
2021-07-20 13:49:25 -07:00
2021-04-26 18:37:13 -07:00
2021-01-12 17:23:47 -08:00
2021-08-16 18:38:52 -07:00
2020-11-09 16:18:36 -08:00
2020-11-05 18:37:30 -08:00
2021-05-25 17:32:35 -07:00
2021-07-29 17:23:52 -07:00
2021-05-25 17:32:35 -07:00
2020-03-02 17:00:41 -08:00
2021-05-25 17:32:35 -07:00
2020-03-02 17:00:41 -08:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-09-13 16:35:58 -07:00
2021-05-25 17:32:35 -07:00
2021-01-20 14:23:00 -08:00
2020-07-02 16:09:01 +02:00
2021-07-16 13:22:47 -07:00
2020-08-13 16:45:41 -07:00
2021-01-08 13:39:24 -08:00
2021-07-16 13:22:47 -07:00
2020-08-01 23:10:42 -07:00
2020-01-20 16:37:45 -08:00
2020-09-21 16:18:00 -07:00
2020-05-01 10:36:32 -07:00
2020-07-01 09:06:12 +02:00
2021-05-19 00:41:44 +02:00
2021-05-19 00:41:44 +02:00
2021-05-25 17:32:35 -07:00
2021-05-19 00:41:44 +02:00
2021-02-11 16:19:13 +01:00
2021-05-19 00:41:44 +02:00
2020-05-09 00:48:20 +02:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-02-26 13:23:53 -08:00
2021-07-22 20:09:16 -07:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2020-09-03 17:33:31 -07:00
2020-08-13 16:45:41 -07:00
2021-02-12 17:37:23 -08:00
2020-11-05 20:04:46 -08:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-08-25 17:40:35 -07:00
2021-08-13 15:56:28 -07:00
2021-05-19 00:41:44 +02:00
2020-10-02 14:59:25 -07:00
2020-09-03 17:14:40 -07:00
2021-05-25 17:32:35 -07:00
2021-04-23 14:05:27 -07:00
2021-04-23 14:05:27 -07:00
2021-04-23 14:05:27 -07:00
2020-07-02 16:09:01 +02:00
2021-05-24 13:30:52 -07:00
2020-11-05 19:55:57 -08:00
2020-05-09 00:48:20 +02:00
2021-04-08 23:54:47 -07:00
2020-09-15 18:28:27 -07:00
2021-06-17 13:05:10 +02:00
2021-04-08 23:54:48 -07:00
2020-03-04 13:41:06 -08:00
2021-04-25 21:09:02 -07:00
2021-08-04 16:18:48 -07:00
2021-08-24 14:17:53 -07:00
2021-04-15 16:50:22 -07:00
2021-05-25 17:32:35 -07:00
2020-09-30 23:21:06 -07:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-08-17 00:45:08 +02:00
2021-07-23 16:57:03 -07:00
2020-05-09 00:48:20 +02:00
2020-05-09 00:48:20 +02:00
2020-11-19 11:58:15 -08:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2020-05-09 00:48:20 +02:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-02-11 16:19:24 +01:00
2021-08-06 17:18:33 +02:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-06-17 18:23:55 -07:00
2020-07-25 20:37:02 -07:00
2021-05-25 17:32:35 -07:00
2020-03-05 14:02:41 -08:00
2021-08-17 14:08:30 -07:00
2020-05-09 00:48:20 +02:00
2020-09-18 22:54:52 +02:00
2021-05-25 17:32:35 -07:00
2020-11-12 18:39:28 -08:00
2020-08-13 16:45:41 -07:00
2020-06-01 14:38:21 -07:00
2021-05-11 15:07:17 -07:00
2021-04-26 18:37:13 -07:00
2021-08-15 00:19:10 -07:00
2021-05-25 17:32:35 -07:00
2021-02-11 17:44:41 -08:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-08-26 11:55:25 -07:00
2021-08-27 09:45:59 -07:00
2020-11-16 22:19:07 +01:00
2021-08-20 01:10:01 +02:00
2021-04-08 23:54:47 -07:00
2020-05-09 00:48:20 +02:00
2021-02-10 11:05:34 -08:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2021-05-13 17:23:57 -07:00
2020-11-09 22:15:23 +01:00
2021-05-19 00:33:40 +02:00
2021-07-09 12:08:40 +02:00
2021-02-26 11:51:48 -08:00
2021-09-07 17:23:19 +02:00
2021-05-17 17:52:20 +02:00
2021-08-04 16:18:48 -07:00
2021-05-25 17:32:35 -07:00
2020-07-02 16:09:01 +02:00
2020-12-03 17:23:24 -08:00
2020-08-20 16:02:36 +02:00
2020-11-18 01:36:27 +01:00
2021-02-12 17:37:23 -08:00
2021-03-25 18:39:51 -07:00
2021-02-02 21:21:55 -08:00
2021-04-25 21:09:02 -07:00
2021-05-25 17:32:35 -07:00
2020-10-09 22:03:06 +02:00
2020-11-13 01:42:11 +01:00
2021-08-23 18:01:47 -07:00
2021-07-15 22:31:11 +02:00
2020-09-29 13:09:24 -07:00
2021-05-19 00:42:20 +02:00
2021-05-25 17:32:35 -07:00
2021-05-25 17:32:35 -07:00
2020-08-13 16:45:41 -07:00
2020-03-17 19:29:12 +01:00
2020-05-14 21:21:57 -07:00
2020-04-15 13:26:08 +02:00
2021-08-13 23:48:16 +02:00
2021-05-25 17:32:35 -07:00
2021-07-07 19:51:13 -07:00
2021-07-07 20:01:45 -07:00
2021-07-07 20:01:45 -07:00
2020-04-08 01:35:24 +02:00
2021-05-25 17:32:35 -07:00
2020-10-02 16:46:20 +02:00
2020-05-09 00:48:20 +02:00