@@ -56,6 +56,7 @@ pub mod kprobe;
56
56
pub mod links;
57
57
pub mod lirc_mode2;
58
58
pub mod lsm;
59
+ pub mod lsm_cgroup;
59
60
pub mod perf_attach;
60
61
pub mod perf_event;
61
62
pub mod raw_trace_point;
@@ -105,6 +106,7 @@ pub use crate::programs::{
105
106
links:: { CgroupAttachMode , Link , LinkOrder } ,
106
107
lirc_mode2:: LircMode2 ,
107
108
lsm:: Lsm ,
109
+ lsm_cgroup:: LsmCgroup ,
108
110
perf_event:: { PerfEvent , PerfEventScope , PerfTypeId , SamplePolicy } ,
109
111
probe:: ProbeKind ,
110
112
raw_trace_point:: RawTracePoint ,
@@ -303,6 +305,8 @@ pub enum Program {
303
305
RawTracePoint ( RawTracePoint ) ,
304
306
/// A [`Lsm`] program
305
307
Lsm ( Lsm ) ,
308
+ /// A [`LsmCgroup`] program
309
+ LsmCgroup ( LsmCgroup ) ,
306
310
/// A [`BtfTracePoint`] program
307
311
BtfTracePoint ( BtfTracePoint ) ,
308
312
/// A [`FEntry`] program
@@ -340,6 +344,7 @@ impl Program {
340
344
Self :: PerfEvent ( _) => ProgramType :: PerfEvent ,
341
345
Self :: RawTracePoint ( _) => ProgramType :: RawTracePoint ,
342
346
Self :: Lsm ( _) => ProgramType :: Lsm ,
347
+ Self :: LsmCgroup ( _) => ProgramType :: Lsm ,
343
348
// The following program types are a subset of `TRACING` programs:
344
349
//
345
350
// - `BPF_TRACE_RAW_TP` (`BtfTracePoint`)
@@ -379,6 +384,7 @@ impl Program {
379
384
Self :: PerfEvent ( p) => p. pin ( path) ,
380
385
Self :: RawTracePoint ( p) => p. pin ( path) ,
381
386
Self :: Lsm ( p) => p. pin ( path) ,
387
+ Self :: LsmCgroup ( p) => p. pin ( path) ,
382
388
Self :: BtfTracePoint ( p) => p. pin ( path) ,
383
389
Self :: FEntry ( p) => p. pin ( path) ,
384
390
Self :: FExit ( p) => p. pin ( path) ,
@@ -410,6 +416,7 @@ impl Program {
410
416
Self :: PerfEvent ( mut p) => p. unload ( ) ,
411
417
Self :: RawTracePoint ( mut p) => p. unload ( ) ,
412
418
Self :: Lsm ( mut p) => p. unload ( ) ,
419
+ Self :: LsmCgroup ( mut p) => p. unload ( ) ,
413
420
Self :: BtfTracePoint ( mut p) => p. unload ( ) ,
414
421
Self :: FEntry ( mut p) => p. unload ( ) ,
415
422
Self :: FExit ( mut p) => p. unload ( ) ,
@@ -443,6 +450,7 @@ impl Program {
443
450
Self :: PerfEvent ( p) => p. fd ( ) ,
444
451
Self :: RawTracePoint ( p) => p. fd ( ) ,
445
452
Self :: Lsm ( p) => p. fd ( ) ,
453
+ Self :: LsmCgroup ( p) => p. fd ( ) ,
446
454
Self :: BtfTracePoint ( p) => p. fd ( ) ,
447
455
Self :: FEntry ( p) => p. fd ( ) ,
448
456
Self :: FExit ( p) => p. fd ( ) ,
@@ -477,6 +485,7 @@ impl Program {
477
485
Self :: PerfEvent ( p) => p. info ( ) ,
478
486
Self :: RawTracePoint ( p) => p. info ( ) ,
479
487
Self :: Lsm ( p) => p. info ( ) ,
488
+ Self :: LsmCgroup ( p) => p. info ( ) ,
480
489
Self :: BtfTracePoint ( p) => p. info ( ) ,
481
490
Self :: FEntry ( p) => p. info ( ) ,
482
491
Self :: FExit ( p) => p. info ( ) ,
@@ -788,6 +797,7 @@ impl_program_unload!(
788
797
LircMode2 ,
789
798
PerfEvent ,
790
799
Lsm ,
800
+ LsmCgroup ,
791
801
RawTracePoint ,
792
802
BtfTracePoint ,
793
803
FEntry ,
@@ -829,6 +839,7 @@ impl_fd!(
829
839
LircMode2 ,
830
840
PerfEvent ,
831
841
Lsm ,
842
+ LsmCgroup ,
832
843
RawTracePoint ,
833
844
BtfTracePoint ,
834
845
FEntry ,
@@ -935,6 +946,7 @@ impl_program_pin!(
935
946
LircMode2 ,
936
947
PerfEvent ,
937
948
Lsm ,
949
+ LsmCgroup ,
938
950
RawTracePoint ,
939
951
BtfTracePoint ,
940
952
FEntry ,
@@ -974,8 +986,9 @@ impl_from_pin!(
974
986
SkMsg ,
975
987
CgroupSysctl ,
976
988
LircMode2 ,
977
- PerfEvent ,
978
989
Lsm ,
990
+ LsmCgroup ,
991
+ PerfEvent ,
979
992
RawTracePoint ,
980
993
BtfTracePoint ,
981
994
FEntry ,
@@ -1031,6 +1044,7 @@ impl_try_from_program!(
1031
1044
LircMode2 ,
1032
1045
PerfEvent ,
1033
1046
Lsm ,
1047
+ LsmCgroup ,
1034
1048
RawTracePoint ,
1035
1049
BtfTracePoint ,
1036
1050
FEntry ,
@@ -1058,6 +1072,7 @@ impl_info!(
1058
1072
LircMode2 ,
1059
1073
PerfEvent ,
1060
1074
Lsm ,
1075
+ LsmCgroup ,
1061
1076
RawTracePoint ,
1062
1077
BtfTracePoint ,
1063
1078
FEntry ,
0 commit comments