kernel: Set the tracepoint flag in a tracepoint manner
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "linux/compiler.h"
|
||||
#include "linux/sched/signal.h"
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/task_work.h>
|
||||
#include <linux/thread_info.h>
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "selinux/selinux.h"
|
||||
#include "kernel_compat.h"
|
||||
#include "supercalls.h"
|
||||
#include "sucompat.h"
|
||||
#include "sulog.h"
|
||||
|
||||
|
||||
@@ -1243,7 +1244,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
|
||||
|
||||
if (new_uid.val == 2000) {
|
||||
if (ksu_su_compat_enabled) {
|
||||
set_tsk_thread_flag(current, TIF_SYSCALL_TRACEPOINT);
|
||||
ksu_set_task_tracepoint_flag(current);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1264,7 +1265,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
|
||||
spin_lock_irq(¤t->sighand->siglock);
|
||||
ksu_seccomp_allow_cache(current->seccomp.filter, __NR_reboot);
|
||||
if (ksu_su_compat_enabled) {
|
||||
set_tsk_thread_flag(current, TIF_SYSCALL_TRACEPOINT);
|
||||
ksu_set_task_tracepoint_flag(current);
|
||||
}
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
return 0;
|
||||
@@ -1278,12 +1279,12 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
}
|
||||
if (ksu_su_compat_enabled) {
|
||||
set_tsk_thread_flag(current, TIF_SYSCALL_TRACEPOINT);
|
||||
ksu_set_task_tracepoint_flag(current);
|
||||
}
|
||||
} else {
|
||||
// Disable syscall tracepoint sucompat for non-allowed processes
|
||||
if (ksu_su_compat_enabled) {
|
||||
clear_tsk_thread_flag(current, TIF_SYSCALL_TRACEPOINT);
|
||||
ksu_clear_task_tracepoint_flag(current);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user