Introduce types and configs for bpf programs that can be attached to LSM hooks. The programs can be enabled by the config option CONFIG_BPF_LSM.
Showing the changes to include/uapi/linux (1 of 10 files). Show all
Unified · Split
| @@ -181,6 +181,7 @@ enum bpf_prog_type { · 180 unmodified lines | ||
| 181 | 181 | BPF_PROG_TYPE_TRACING, |
| 182 | 182 | BPF_PROG_TYPE_STRUCT_OPS, |
| 183 | 183 | BPF_PROG_TYPE_EXT, |
| 184 | + BPF_PROG_TYPE_LSM, | |
| 184 | 185 | }; |
| 185 | 186 | |
| 186 | 187 | enum bpf_attach_type { |
| @@ -211,6 +212,7 @@ enum bpf_attach_type { · 24 unmodified lines | ||
| 211 | 212 | BPF_TRACE_FENTRY, |
| 212 | 213 | BPF_TRACE_FEXIT, |
| 213 | 214 | BPF_MODIFY_RETURN, |
| 215 | + BPF_LSM_MAC, | |
| 214 | 216 | __MAX_BPF_ATTACH_TYPE |
| 215 | 217 | }; |
| 216 | 218 | |