Lines Matching refs:tsp
154 struct task_smack *tsp = smack_cred(current_cred()); in smk_bu_current() local
164 tsp->smk_task->smk_known, oskp->smk_known, in smk_bu_current()
175 struct task_smack *tsp = smack_cred(current_cred()); in smk_bu_task() local
186 tsp->smk_task->smk_known, smk_task->smk_known, acc, in smk_bu_task()
197 struct task_smack *tsp = smack_cred(current_cred()); in smk_bu_inode() local
216 tsp->smk_task->smk_known, isp->smk_inode->smk_known, acc, in smk_bu_inode()
227 struct task_smack *tsp = smack_cred(current_cred()); in smk_bu_file() local
228 struct smack_known *sskp = tsp->smk_task; in smk_bu_file()
257 struct task_smack *tsp = smack_cred(cred); in smk_bu_credfile() local
258 struct smack_known *sskp = tsp->smk_task; in smk_bu_credfile()
340 static void init_task_smack(struct task_smack *tsp, struct smack_known *task, in init_task_smack() argument
343 tsp->smk_task = task; in init_task_smack()
344 tsp->smk_forked = forked; in init_task_smack()
345 INIT_LIST_HEAD(&tsp->smk_rules); in init_task_smack()
346 INIT_LIST_HEAD(&tsp->smk_relabel); in init_task_smack()
347 mutex_init(&tsp->smk_rules_lock); in init_task_smack()
435 struct task_smack *tsp; in smk_ptrace_rule_check() local
447 tsp = smack_cred(tracercred); in smk_ptrace_rule_check()
448 tracer_known = smk_of_task(tsp); in smk_ptrace_rule_check()
472 rc = smk_tskacc(tsp, tracee_known, smk_ptrace_mode(mode), saip); in smk_ptrace_rule_check()
996 struct task_smack *tsp = smack_cred(current_cred()); in smack_inode_init_security() local
998 struct smack_known *skp = smk_of_task(tsp); in smack_inode_init_security()
1008 if (tsp->smk_task != tsp->smk_transmuted) { in smack_inode_init_security()
1021 if ((tsp->smk_task == tsp->smk_transmuted) || in smack_inode_init_security()
1032 if (tsp->smk_task != tsp->smk_transmuted) in smack_inode_init_security()
1821 struct task_smack *tsp; in smack_mmap_file() local
1845 tsp = smack_cred(current_cred()); in smack_mmap_file()
1868 &tsp->smk_rules); in smack_mmap_file()
1896 &tsp->smk_rules); in smack_mmap_file()
1986 struct task_smack *tsp; in smack_file_receive() local
1998 tsp = smack_cred(current_cred()); in smack_file_receive()
2005 rc = smk_access(tsp->smk_task, ssp->smk_out, MAY_WRITE, &ad); in smack_file_receive()
2009 rc = smk_access(ssp->smk_in, tsp->smk_task, MAY_WRITE, &ad); in smack_file_receive()
2039 struct task_smack *tsp = smack_cred(file->f_cred); in smack_file_open() local
2046 rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); in smack_file_open()
2079 struct task_smack *tsp = smack_cred(cred); in smack_cred_free() local
2084 smk_destroy_label_list(&tsp->smk_relabel); in smack_cred_free()
2086 list_for_each_safe(l, n, &tsp->smk_rules) { in smack_cred_free()
2178 struct task_smack *tsp = smack_cred(new); in smack_kernel_create_files_as() local
2180 tsp->smk_forked = isp->smk_inode; in smack_kernel_create_files_as()
2181 tsp->smk_task = tsp->smk_forked; in smack_kernel_create_files_as()
3731 struct task_smack *tsp = smack_cred(current_cred()); in do_setattr() local
3737 if (!smack_privileged(CAP_MAC_ADMIN) && list_empty(&tsp->smk_relabel)) in do_setattr()
3759 list_for_each_entry(sklep, &tsp->smk_relabel, list) in do_setattr()
3772 tsp = smack_cred(new); in do_setattr()
3773 tsp->smk_task = skp; in do_setattr()
3777 smk_destroy_label_list(&tsp->smk_relabel); in do_setattr()
4880 struct task_smack *tsp; in smack_inode_copy_up() local
4891 tsp = smack_cred(new_creds); in smack_inode_copy_up()
4898 tsp->smk_task = skp; in smack_inode_copy_up()
4965 struct task_smack *tsp = smack_cred(current_cred()); in smack_uring_override_creds() local
4972 if (tsp->smk_task == nsp->smk_task) in smack_uring_override_creds()
5007 struct task_smack *tsp; in smack_uring_cmd() local
5014 tsp = smack_cred(file->f_cred); in smack_uring_cmd()
5019 rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); in smack_uring_cmd()
5241 struct task_smack *tsp; in smack_init() local
5250 tsp = smack_cred(cred); in smack_init()
5251 init_task_smack(tsp, &smack_known_floor, &smack_known_floor); in smack_init()