/kernel/linux/linux-5.10/security/yama/ |
H A D | yama_lsm.c | 32 struct task_struct *tracee; member 132 * yama_ptracer_add - add/replace an exception for this tracer/tracee pair 134 * @tracee: the task_struct of the process to be ptraced 136 * Each tracee can have, at most, one tracer registered. Each time this 137 * is called, the prior registered tracer will be replaced for the tracee. 142 struct task_struct *tracee) in yama_ptracer_add() 150 added->tracee = tracee; in yama_ptracer_add() 159 if (relation->tracee == tracee) { in yama_ptracer_add() 141 yama_ptracer_add(struct task_struct *tracer, struct task_struct *tracee) yama_ptracer_add() argument 179 yama_ptracer_del(struct task_struct *tracer, struct task_struct *tracee) yama_ptracer_del() argument 305 ptracer_exception_found(struct task_struct *tracer, struct task_struct *tracee) ptracer_exception_found() argument [all...] |
/kernel/linux/linux-6.6/security/yama/ |
H A D | yama_lsm.c | 32 struct task_struct *tracee; member 132 * yama_ptracer_add - add/replace an exception for this tracer/tracee pair 134 * @tracee: the task_struct of the process to be ptraced 136 * Each tracee can have, at most, one tracer registered. Each time this 137 * is called, the prior registered tracer will be replaced for the tracee. 142 struct task_struct *tracee) in yama_ptracer_add() 150 added->tracee = tracee; in yama_ptracer_add() 159 if (relation->tracee == tracee) { in yama_ptracer_add() 141 yama_ptracer_add(struct task_struct *tracer, struct task_struct *tracee) yama_ptracer_add() argument 179 yama_ptracer_del(struct task_struct *tracer, struct task_struct *tracee) yama_ptracer_del() argument 305 ptracer_exception_found(struct task_struct *tracer, struct task_struct *tracee) ptracer_exception_found() argument [all...] |
/kernel/linux/linux-5.10/security/apparmor/ |
H A D | ipc.c | 76 static int profile_tracee_perm(struct aa_profile *tracee, in profile_tracee_perm() argument 80 if (profile_unconfined(tracee) || unconfined(tracer) || in profile_tracee_perm() 81 !PROFILE_MEDIATES(tracee, AA_CLASS_PTRACE)) in profile_tracee_perm() 84 return profile_ptrace_perm(tracee, tracer, request, sa); in profile_tracee_perm() 88 struct aa_label *tracee, u32 request, in profile_tracer_perm() 95 return profile_ptrace_perm(tracer, tracee, request, sa); in profile_tracer_perm() 98 if (&tracer->label == tracee) in profile_tracer_perm() 102 aad(sa)->peer = tracee; in profile_tracer_perm() 111 * aa_may_ptrace - test if tracer task can trace the tracee 113 * @tracee 87 profile_tracer_perm(struct aa_profile *tracer, struct aa_label *tracee, u32 request, struct common_audit_data *sa) profile_tracer_perm() argument 118 aa_may_ptrace(struct aa_label *tracer, struct aa_label *tracee, u32 request) aa_may_ptrace() argument [all...] |
H A D | lsm.c | 118 struct aa_label *tracer, *tracee; in apparmor_ptrace_access_check() local 122 tracee = aa_get_task_label(child); in apparmor_ptrace_access_check() 123 error = aa_may_ptrace(tracer, tracee, in apparmor_ptrace_access_check() 126 aa_put_label(tracee); in apparmor_ptrace_access_check() 134 struct aa_label *tracer, *tracee; in apparmor_ptrace_traceme() local 137 tracee = __begin_current_label_crit_section(); in apparmor_ptrace_traceme() 139 error = aa_may_ptrace(tracer, tracee, AA_PTRACE_TRACE); in apparmor_ptrace_traceme() 141 __end_current_label_crit_section(tracee); in apparmor_ptrace_traceme()
|
/kernel/linux/linux-6.6/security/apparmor/ |
H A D | task.c | 247 struct aa_profile *tracee, in profile_tracee_perm() 251 if (profile_unconfined(tracee) || unconfined(tracer) || in profile_tracee_perm() 252 !ANY_RULE_MEDIATES(&tracee->rules, AA_CLASS_PTRACE)) in profile_tracee_perm() 255 return profile_ptrace_perm(cred, tracee, tracer, request, ad); in profile_tracee_perm() 260 struct aa_label *tracee, u32 request, in profile_tracer_perm() 267 return profile_ptrace_perm(cred, tracer, tracee, request, ad); in profile_tracer_perm() 270 if (&tracer->label == tracee) in profile_tracer_perm() 274 ad->peer = tracee; in profile_tracer_perm() 283 * aa_may_ptrace - test if tracer task can trace the tracee 285 * @tracee 246 profile_tracee_perm(const struct cred *cred, struct aa_profile *tracee, struct aa_label *tracer, u32 request, struct apparmor_audit_data *ad) profile_tracee_perm() argument 258 profile_tracer_perm(const struct cred *cred, struct aa_profile *tracer, struct aa_label *tracee, u32 request, struct apparmor_audit_data *ad) profile_tracer_perm() argument 290 aa_may_ptrace(const struct cred *tracer_cred, struct aa_label *tracer, const struct cred *tracee_cred, struct aa_label *tracee, u32 request) aa_may_ptrace() argument [all...] |
H A D | lsm.c | 118 struct aa_label *tracer, *tracee; in apparmor_ptrace_access_check() local 123 tracee = cred_label(cred); /* ref count on cred */ in apparmor_ptrace_access_check() 125 error = aa_may_ptrace(current_cred(), tracer, cred, tracee, in apparmor_ptrace_access_check() 136 struct aa_label *tracer, *tracee; in apparmor_ptrace_traceme() local 140 tracee = __begin_current_label_crit_section(); in apparmor_ptrace_traceme() 143 error = aa_may_ptrace(cred, tracer, current_cred(), tracee, in apparmor_ptrace_traceme() 146 __end_current_label_crit_section(tracee); in apparmor_ptrace_traceme()
|
/kernel/linux/linux-5.10/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 1496 pid_t tracee, int status, void *args); 1498 void start_tracer(struct __test_metadata *_metadata, int fd, pid_t tracee, in start_tracer() argument 1512 ret = ptrace(PTRACE_ATTACH, tracee, NULL, 0); in start_tracer() 1514 kill(tracee, SIGKILL); in start_tracer() 1519 ret = ptrace(PTRACE_SETOPTIONS, tracee, NULL, ptrace_syscall ? in start_tracer() 1524 kill(tracee, SIGKILL); in start_tracer() 1527 tracee, NULL, 0); in start_tracer() 1530 /* Unblock the tracee */ in start_tracer() 1538 if (wait(&status) != tracee) in start_tracer() 1547 tracer_func(_metadata, tracee, statu in start_tracer() 1566 pid_t tracee = getpid(); setup_trace_fixture() local 1610 tracer_poke(struct __test_metadata *_metadata, pid_t tracee, int status, void *args) tracer_poke() argument 1907 get_syscall(struct __test_metadata *_metadata, pid_t tracee) get_syscall() argument 1919 __change_syscall(struct __test_metadata *_metadata, pid_t tracee, long *syscall, long *ret) __change_syscall() argument 1945 change_syscall_nr(struct __test_metadata *_metadata, pid_t tracee, long syscall) change_syscall_nr() argument 1952 change_syscall_ret(struct __test_metadata *_metadata, pid_t tracee, long ret) change_syscall_ret() argument 1960 tracer_seccomp(struct __test_metadata *_metadata, pid_t tracee, int status, void *args) tracer_seccomp() argument 2006 tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee, int status, void *args) tracer_ptrace() argument [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 1511 pid_t tracee, int status, void *args); 1513 void start_tracer(struct __test_metadata *_metadata, int fd, pid_t tracee, in start_tracer() argument 1527 ret = ptrace(PTRACE_ATTACH, tracee, NULL, 0); in start_tracer() 1529 kill(tracee, SIGKILL); in start_tracer() 1534 ret = ptrace(PTRACE_SETOPTIONS, tracee, NULL, ptrace_syscall ? in start_tracer() 1539 kill(tracee, SIGKILL); in start_tracer() 1542 tracee, NULL, 0); in start_tracer() 1545 /* Unblock the tracee */ in start_tracer() 1553 if (wait(&status) != tracee) in start_tracer() 1572 tracer_func(_metadata, tracee, statu in start_tracer() 1591 pid_t tracee = getpid(); setup_trace_fixture() local 1635 tracer_poke(struct __test_metadata *_metadata, pid_t tracee, int status, void *args) tracer_poke() argument 1936 get_syscall(struct __test_metadata *_metadata, pid_t tracee) get_syscall() argument 1948 __change_syscall(struct __test_metadata *_metadata, pid_t tracee, long *syscall, long *ret) __change_syscall() argument 1974 change_syscall_nr(struct __test_metadata *_metadata, pid_t tracee, long syscall) change_syscall_nr() argument 1981 change_syscall_ret(struct __test_metadata *_metadata, pid_t tracee, long ret) change_syscall_ret() argument 1989 tracer_seccomp(struct __test_metadata *_metadata, pid_t tracee, int status, void *args) tracer_seccomp() argument 2040 tracer_ptrace(struct __test_metadata *_metadata, pid_t tracee, int status, void *args) tracer_ptrace() argument [all...] |
/kernel/linux/linux-6.6/samples/ftrace/ |
H A D | ftrace-ops.c | 17 MODULE_PARM_DESC(nr_function_calls, "How many times to call the relevant tracee"); 26 MODULE_PARM_DESC(nr_ops_relevant, "How many ftrace_ops to associate with the relevant tracee"); 35 MODULE_PARM_DESC(nr_ops_irrelevant, "How many ftrace_ops to associate with the irrelevant tracee"); 120 static struct sample_ops *ops_alloc_init(void *tracee, ftrace_func_t func, in ops_alloc_init() argument 132 WARN_ON_ONCE(ftrace_set_filter_ip(&ops[i].ops, (unsigned long)tracee, 0, 0)); in ops_alloc_init() 195 " tracee: %ps\n" in ftrace_ops_sample_init() 198 " tracee: %ps\n" in ftrace_ops_sample_init()
|
/kernel/linux/linux-5.10/security/apparmor/include/ |
H A D | ipc.h | 32 int aa_may_ptrace(struct aa_label *tracer, struct aa_label *tracee,
|
/kernel/linux/linux-6.6/security/apparmor/include/ |
H A D | task.h | 95 const struct cred *tracee_cred, struct aa_label *tracee,
|