Dave Marchevsky
6fc88c354f
bpf: Migrate cgroup_bpf to internal cgroup_bpf_attach_type enum
...
Add an enum (cgroup_bpf_attach_type) containing only valid cgroup_bpf
attach types and a function to map bpf_attach_type values to the new
enum. Inspired by netns_bpf_attach_type.
Then, migrate cgroup_bpf to use cgroup_bpf_attach_type wherever
possible. Functionality is unchanged as attach_type_to_prog_type
switches in bpf/syscall.c were preventing non-cgroup programs from
making use of the invalid cgroup_bpf array slots.
As a result struct cgroup_bpf uses 504 fewer bytes relative to when its
arrays were sized using MAX_BPF_ATTACH_TYPE.
bpf_cgroup_storage is notably not migrated as struct
bpf_cgroup_storage_key is part of uapi and contains a bpf_attach_type
member which is not meant to be opaque. Similarly, bpf_cgroup_link
continues to report its bpf_attach_type member to userspace via fdinfo
and bpf_link_info.
To ease disambiguation, bpf_attach_type variables are renamed from
'type' to 'atype' when changed to cgroup_bpf_attach_type.
Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Link: https://lore.kernel.org/bpf/20210819092420.1984861-2-davemarchevsky@fb.com
2021-08-23 17:50:24 -07:00
..
2021-04-10 10:52:04 +02:00
2021-08-04 12:11:52 +02:00
2020-12-14 09:16:22 -06:00
2021-06-04 08:07:30 +02:00
2021-03-11 20:47:05 +00:00
2021-01-25 18:44:44 +01:00
2021-08-13 06:41:22 -07:00
2021-03-31 15:59:14 -04:00
2020-11-19 11:25:47 +01:00
2020-12-28 14:21:31 +00:00
2021-06-16 17:47:53 +02:00
2021-07-28 13:19:31 +01:00
2021-03-18 09:02:27 +01:00
2021-02-09 10:58:19 +01:00
2021-06-10 20:59:05 -04:00
2021-05-19 11:40:15 +02:00
2021-02-06 09:22:10 +01:00
2021-02-06 09:22:10 +01:00
2021-01-09 09:21:03 -07:00
2021-02-15 18:28:30 +01:00
2021-04-02 11:18:30 -06:00
2020-10-09 12:47:02 -06:00
2021-08-23 17:50:24 -07:00
2021-03-04 17:58:15 -08:00
2021-06-22 14:11:57 +02:00
2021-06-22 14:11:57 +02:00
2021-05-27 09:42:21 +02:00
2021-04-20 14:28:33 -07:00
2021-01-12 17:31:14 +01:00
2020-10-02 17:58:52 -06:00
2021-06-02 14:08:09 +02:00
2021-03-22 10:22:22 +01:00
2020-10-29 18:39:43 -07:00
2020-12-04 12:06:15 +01:00
2020-12-15 12:13:36 -08:00
2020-09-17 18:46:04 +02:00
2021-06-14 23:54:53 -07:00
2021-06-02 14:08:37 -07:00
2021-03-26 14:53:41 -04:00
2021-03-18 17:03:54 +01:00
2021-04-13 17:31:44 +01:00
2021-07-01 13:08:18 -07:00
2021-06-17 11:32:50 -07:00
2020-12-03 00:12:08 -08:00
2021-04-20 08:59:03 -06:00
2021-02-26 09:41:03 -08:00
2021-05-10 09:26:18 -06:00
2020-11-16 11:41:12 -08:00
2021-01-27 15:13:52 +01:00
2021-02-07 14:51:19 -08:00
2021-06-22 09:15:35 +02:00
2021-06-22 16:42:09 +02:00
2020-10-03 14:18:29 -07:00
2021-02-08 13:01:24 +01:00
2021-02-15 11:43:33 +01:00
2021-02-04 09:29:57 -08:00
2020-11-27 15:48:31 +01:00
2021-01-22 09:58:57 +01:00
2021-01-22 09:59:00 +01:00
2021-06-03 15:31:34 -07:00
2021-03-30 13:29:39 -07:00
2021-07-28 10:22:43 -07:00
2020-11-06 14:29:11 +11:00
2021-07-29 15:06:50 +01:00
2021-05-07 00:26:34 -07:00
2021-08-11 13:34:41 +01:00
2021-07-29 15:06:50 +01:00
2021-03-10 12:45:16 -08:00
2021-08-03 11:50:22 +01:00
2020-11-09 16:41:40 -08:00
2021-02-04 09:29:57 -08:00
2021-07-21 08:14:33 -07:00
2021-08-05 11:46:42 +01:00
2021-05-05 14:31:05 +02:00
2021-02-26 09:41:03 -08:00
2021-06-30 14:15:39 -06:00
2021-07-21 08:14:33 -07:00
2021-07-21 08:14:33 -07:00
2021-07-21 08:14:33 -07:00
2021-03-18 11:42:46 +01:00
2020-09-15 09:57:45 -05:00
2021-07-21 08:14:33 -07:00
2020-11-16 16:27:03 +01:00
2020-12-15 12:13:36 -08:00
2021-04-26 08:25:20 -07:00
2020-11-04 16:43:38 +01:00
2021-04-20 21:47:48 -04:00
2021-06-17 14:25:39 -04:00
2021-06-25 11:24:24 -04:00
2021-03-03 16:55:02 -08:00
2021-04-22 12:22:11 -07:00
2021-04-13 09:16:12 -06:00
2021-05-21 15:03:50 +02:00
2021-07-21 08:14:33 -07:00
2021-07-08 11:48:21 -07:00
2021-03-10 09:34:06 +01:00
2021-03-24 08:26:29 +01:00
2021-07-29 15:06:50 +01:00
2021-04-08 13:15:33 -07:00
2020-12-14 11:47:37 -08:00
2021-01-12 17:05:37 +01:00
2020-09-25 14:23:27 +02:00
2021-06-30 20:47:29 -07:00
2020-09-15 22:13:31 +10:00
2021-06-01 12:09:27 +02:00
2021-06-18 11:40:11 -07:00
2020-12-15 12:13:36 -08:00
2021-01-23 12:38:42 -08:00
2021-06-30 15:34:04 -06:00
2021-08-10 11:29:39 -07:00
2021-07-01 13:08:18 -07:00
2021-06-18 13:02:45 -07:00
2020-10-14 20:28:05 -07:00
2021-06-10 12:51:33 -07:00
2021-03-11 16:12:59 -08:00
2021-01-25 09:36:25 -05:00
2021-05-07 00:26:34 -07:00
2020-10-02 09:37:41 -04:00
2020-09-22 13:58:40 +02:00
2021-06-23 13:05:09 +02:00
2021-01-04 11:42:26 -05:00
2021-07-27 11:48:42 +01:00
2020-12-15 16:49:59 -08:00
2021-07-06 10:37:46 -05:00
2021-05-21 06:12:52 -10:00
2021-08-02 10:24:38 +01:00
2021-01-22 20:41:29 -08:00
2020-12-21 17:36:48 -08:00
2021-05-12 11:43:31 +02:00
2021-03-25 15:31:22 -07:00
2021-03-17 16:15:39 +01:00
2021-04-08 10:14:45 +02:00
2021-04-06 10:29:56 +02:00
2021-01-25 15:14:16 -08:00
2020-11-24 10:10:59 -06:00
2021-03-17 14:16:26 -05:00
2021-01-16 23:19:26 +01:00
2021-03-24 16:31:23 -07:00
2020-10-05 16:35:57 +01:00
2021-06-22 11:28:51 -07:00
2021-06-28 12:49:52 -07:00
2021-06-18 11:35:47 -07:00
2021-01-15 17:14:49 +01:00
2021-03-10 09:34:06 +01:00
2021-05-18 16:20:54 -05:00
2021-06-16 12:54:02 -07:00
2021-06-23 12:56:08 -07:00
2021-08-04 12:52:03 +01:00
2020-12-03 10:03:14 -08:00
2021-01-26 18:39:45 -08:00
2021-02-11 18:25:05 -08:00
2021-02-02 14:50:15 +01:00
2021-01-07 16:17:32 +01:00
2021-03-11 12:13:08 +01:00
2020-09-18 13:58:37 -07:00
2020-09-18 13:58:37 -07:00
2020-11-27 14:32:37 -08:00
2021-04-10 10:36:34 +02:00
2021-06-30 20:47:27 -07:00
2021-03-22 10:24:07 +01:00
2021-06-02 14:09:05 +02:00
2020-09-26 10:22:29 +02:00
2021-03-22 10:22:22 +01:00
2021-02-23 07:52:56 -05:00
2020-10-07 14:23:44 -06:00
2021-05-05 10:19:41 -06:00
2020-10-23 11:55:28 -04:00
2020-10-23 11:55:28 -04:00
2021-05-23 19:21:31 +02:00
2021-04-08 12:26:34 +02:00
2020-11-20 10:44:41 +01:00
2021-07-03 04:50:51 -04:00
2021-06-17 21:45:43 +02:00
2021-03-07 09:07:16 +01:00
2021-06-11 13:32:47 -07:00
2020-12-14 19:33:39 -08:00
2021-06-12 13:16:45 -07:00