Lines Matching defs:HOOK
88 #define SECURITY_HOOK_ACTIVE_KEY(HOOK, IDX) security_hook_active_##HOOK##_##IDX
92 * HOOK is an LSM hook as defined in linux/lsm_hookdefs.h
95 #define LSM_STATIC_CALL(HOOK, IDX) lsm_static_call_##HOOK##_##IDX
466 #define __CALL_STATIC_VOID(NUM, HOOK, ...) \
468 if (static_branch_unlikely(&SECURITY_HOOK_ACTIVE_KEY(HOOK, NUM))) { \
469 static_call(LSM_STATIC_CALL(HOOK, NUM))(__VA_ARGS__); \
473 #define call_void_hook(HOOK, ...) \
475 LSM_LOOP_UNROLL(__CALL_STATIC_VOID, HOOK, __VA_ARGS__); \
479 #define __CALL_STATIC_INT(NUM, R, HOOK, LABEL, ...) \
481 if (static_branch_unlikely(&SECURITY_HOOK_ACTIVE_KEY(HOOK, NUM))) { \
482 R = static_call(LSM_STATIC_CALL(HOOK, NUM))(__VA_ARGS__); \
483 if (R != LSM_RET_DEFAULT(HOOK)) \
488 #define call_int_hook(HOOK, ...) \
491 int RC = LSM_RET_DEFAULT(HOOK); \
493 LSM_LOOP_UNROLL(__CALL_STATIC_INT, RC, HOOK, OUT, __VA_ARGS__); \