Skip to content

Commit 82787bb

Browse files
committed
fix lsm hook
1 parent 6a751cd commit 82787bb

3 files changed

Lines changed: 205 additions & 156 deletions

File tree

kernel/feature/process_tag.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ static void process_tag_task_free(struct task_struct *task)
208208
ksu_process_tag_delete(task);
209209
}
210210

211-
struct ksu_lsm_hook process_tag_task_alloc_hook = KSU_LSM_HOOK_BPF_INIT(task_alloc, task_alloc, process_tag_task_alloc);
212-
struct ksu_lsm_hook process_tag_task_free_hook = KSU_LSM_HOOK_BPF_INIT(task_free, task_free, process_tag_task_free);
211+
struct ksu_lsm_hook process_tag_task_alloc_hook =
212+
KSU_LSM_HOOK_INIT(task_alloc, "selinux_task_alloc", process_tag_task_alloc, 0);
213+
struct ksu_lsm_hook process_tag_task_free_hook =
214+
KSU_LSM_HOOK_INIT(task_free, "selinux_task_alloc", process_tag_task_free, 1);
213215

214216
// Feature handler
215217
static int process_tag_feature_get(u64 *value)

0 commit comments

Comments
 (0)