Home
last modified time | relevance | path

Searched refs:s (Results 1 – 25 of 28) sorted by relevance

12

/security/selinux/ss/
Dsidtab.c33 int sidtab_init(struct sidtab *s) in sidtab_init() argument
37 memset(s->roots, 0, sizeof(s->roots)); in sidtab_init()
40 s->isids[i].set = 0; in sidtab_init()
42 s->frozen = false; in sidtab_init()
43 s->count = 0; in sidtab_init()
44 s->convert = NULL; in sidtab_init()
45 hash_init(s->context_to_sid); in sidtab_init()
47 spin_lock_init(&s->lock); in sidtab_init()
50 s->cache_free_slots = CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE; in sidtab_init()
51 INIT_LIST_HEAD(&s->cache_lru_list); in sidtab_init()
[all …]
Dsidtab.h106 int sidtab_init(struct sidtab *s);
107 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context);
108 struct sidtab_entry *sidtab_search_entry(struct sidtab *s, u32 sid);
109 struct sidtab_entry *sidtab_search_entry_force(struct sidtab *s, u32 sid);
111 static inline struct context *sidtab_search(struct sidtab *s, u32 sid) in sidtab_search() argument
113 struct sidtab_entry *entry = sidtab_search_entry(s, sid); in sidtab_search()
118 static inline struct context *sidtab_search_force(struct sidtab *s, u32 sid) in sidtab_search_force() argument
120 struct sidtab_entry *entry = sidtab_search_entry_force(s, sid); in sidtab_search_force()
125 int sidtab_convert(struct sidtab *s, struct sidtab_convert_params *params);
127 void sidtab_cancel_convert(struct sidtab *s);
[all …]
Dsymtab.c40 int symtab_init(struct symtab *s, unsigned int size) in symtab_init() argument
42 s->nprim = 0; in symtab_init()
43 return hashtab_init(&s->table, size); in symtab_init()
46 int symtab_insert(struct symtab *s, char *name, void *datum) in symtab_insert() argument
48 return hashtab_insert(&s->table, name, datum, symtab_key_params); in symtab_insert()
51 void *symtab_search(struct symtab *s, const char *name) in symtab_search() argument
53 return hashtab_search(&s->table, name, symtab_key_params); in symtab_search()
Dconditional.c27 int s[COND_EXPR_MAXDEPTH]; in cond_evaluate_expr() local
41 s[sp] = p->bool_val_to_struct[node->bool - 1]->state; in cond_evaluate_expr()
46 s[sp] = !s[sp]; in cond_evaluate_expr()
52 s[sp] |= s[sp + 1]; in cond_evaluate_expr()
58 s[sp] &= s[sp + 1]; in cond_evaluate_expr()
64 s[sp] ^= s[sp + 1]; in cond_evaluate_expr()
70 s[sp] = (s[sp] == s[sp + 1]); in cond_evaluate_expr()
76 s[sp] = (s[sp] != s[sp + 1]); in cond_evaluate_expr()
82 return s[0]; in cond_evaluate_expr()
208 int cond_read_bool(struct policydb *p, struct symtab *s, void *fp) in cond_read_bool() argument
[all …]
Dsymtab.h20 int symtab_init(struct symtab *s, unsigned int size);
22 int symtab_insert(struct symtab *s, char *name, void *datum);
23 void *symtab_search(struct symtab *s, const char *name);
Dservices.c283 int s[CEXPR_MAXDEPTH]; in constraint_expr_eval() local
290 s[sp] = !s[sp]; in constraint_expr_eval()
295 s[sp] &= s[sp + 1]; in constraint_expr_eval()
300 s[sp] |= s[sp + 1]; in constraint_expr_eval()
321 s[++sp] = ebitmap_get_bit(&r1->dominates, in constraint_expr_eval()
325 s[++sp] = ebitmap_get_bit(&r2->dominates, in constraint_expr_eval()
329 s[++sp] = (!ebitmap_get_bit(&r1->dominates, in constraint_expr_eval()
365 s[++sp] = mls_level_eq(l1, l2); in constraint_expr_eval()
368 s[++sp] = !mls_level_eq(l1, l2); in constraint_expr_eval()
371 s[++sp] = mls_level_dom(l1, l2); in constraint_expr_eval()
[all …]
Dpolicydb.c698 static void symtab_hash_eval(struct symtab *s) in symtab_hash_eval() argument
703 hash_eval(&s[i].table, symtab_name[i]); in symtab_hash_eval()
869 int policydb_load_isids(struct policydb *p, struct sidtab *s) in policydb_load_isids() argument
874 rc = sidtab_init(s); in policydb_load_isids()
887 sidtab_destroy(s); in policydb_load_isids()
895 rc = sidtab_set_initial(s, sid, &c->context[0]); in policydb_load_isids()
899 sidtab_destroy(s); in policydb_load_isids()
1098 static int perm_read(struct policydb *p, struct symtab *s, void *fp) in perm_read() argument
1121 rc = symtab_insert(s, key, perdatum); in perm_read()
1131 static int common_read(struct policydb *p, struct symtab *s, void *fp) in common_read() argument
[all …]
Dconditional.h72 int cond_read_bool(struct policydb *p, struct symtab *s, void *fp);
Debitmap.c289 unsigned int s; in ebitmap_set_bit() local
293 s = find_first_bit(n->maps, EBITMAP_SIZE); in ebitmap_set_bit()
294 if (s < EBITMAP_SIZE) in ebitmap_set_bit()
Dmls.h42 struct sidtab *s,
Dmls.c238 struct sidtab *s, in mls_context_to_sid() argument
267 defcon = sidtab_search(s, def_sid); in mls_context_to_sid()
Dpolicydb.h321 extern int policydb_load_isids(struct policydb *p, struct sidtab *s);
/security/tomoyo/
Dtomoyo.c18 struct tomoyo_task *s = tomoyo_task(current); in tomoyo_domain() local
20 if (s->old_domain_info && !current->in_execve) { in tomoyo_domain()
21 atomic_dec(&s->old_domain_info->users); in tomoyo_domain()
22 s->old_domain_info = NULL; in tomoyo_domain()
24 return s->domain_info; in tomoyo_domain()
40 struct tomoyo_task *s = tomoyo_task(current); in tomoyo_cred_prepare() local
42 if (s->old_domain_info && !current->in_execve) { in tomoyo_cred_prepare()
43 atomic_dec(&s->domain_info->users); in tomoyo_cred_prepare()
44 s->domain_info = s->old_domain_info; in tomoyo_cred_prepare()
45 s->old_domain_info = NULL; in tomoyo_cred_prepare()
[all …]
Dmemory.c50 const size_t s = ksize(ptr); in tomoyo_memory_ok() local
52 tomoyo_memory_used[TOMOYO_MEMORY_POLICY] += s; in tomoyo_memory_ok()
57 tomoyo_memory_used[TOMOYO_MEMORY_POLICY] -= s; in tomoyo_memory_ok()
Dsecurityfs_if.c73 struct tomoyo_task *s = tomoyo_task(current); in tomoyo_write_self() local
75 s->domain_info; in tomoyo_write_self()
77 s->domain_info = new_domain; in tomoyo_write_self()
Ddomain.c870 struct tomoyo_task *s = tomoyo_task(current); in tomoyo_find_next_domain() local
872 s->old_domain_info = s->domain_info; in tomoyo_find_next_domain()
873 s->domain_info = domain; in tomoyo_find_next_domain()
/security/smack/
Dsmackfs.c531 static void *smk_seq_start(struct seq_file *s, loff_t *pos, in smk_seq_start() argument
548 static void *smk_seq_next(struct seq_file *s, void *v, loff_t *pos, in smk_seq_next() argument
559 static void smk_seq_stop(struct seq_file *s, void *v) in smk_seq_stop() argument
564 static void smk_rule_show(struct seq_file *s, struct smack_rule *srp, int max) in smk_rule_show() argument
579 seq_printf(s, "%s %s", in smk_rule_show()
583 seq_putc(s, ' '); in smk_rule_show()
586 seq_putc(s, 'r'); in smk_rule_show()
588 seq_putc(s, 'w'); in smk_rule_show()
590 seq_putc(s, 'x'); in smk_rule_show()
592 seq_putc(s, 'a'); in smk_rule_show()
[all …]
Dsmack_lsm.c59 #define A(s) {"smack"#s, sizeof("smack"#s) - 1, Opt_##s} argument
70 static int match_opt_prefix(char *s, int l, char **arg) in match_opt_prefix() argument
76 if (len > l || memcmp(s, smk_mount_opts[i].name, len)) in match_opt_prefix()
78 if (len == l || s[len] != '=') in match_opt_prefix()
80 *arg = s + len + 1; in match_opt_prefix()
94 static void smk_bu_mode(int mode, char *s) in smk_bu_mode() argument
99 s[i++] = 'r'; in smk_bu_mode()
101 s[i++] = 'w'; in smk_bu_mode()
103 s[i++] = 'x'; in smk_bu_mode()
105 s[i++] = 'a'; in smk_bu_mode()
[all …]
/security/
Ddevice_cgroup.c48 static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s) in css_to_devcgroup() argument
50 return s ? container_of(s, struct dev_cgroup, css) : NULL; in css_to_devcgroup()
/security/integrity/
Ddigsig_asymmetric.c127 pks.s = hdr->sig; in asymmetric_verify()
/security/keys/trusted-keys/
Dtrusted_tpm1.c391 static int osap(struct tpm_buf *tb, struct osapsess *s, in osap() argument
414 s->handle = LOAD32(tb->data, TPM_DATA_OFFSET); in osap()
415 memcpy(s->enonce, &(tb->data[TPM_DATA_OFFSET + sizeof(uint32_t)]), in osap()
419 return TSS_rawhmac(s->secret, key, SHA1_DIGEST_SIZE, TPM_NONCE_SIZE, in osap()
/security/integrity/evm/
DKconfig11 EVM protects a file's security extended attributes against
/security/selinux/
Dhooks.c383 #define A(s, has_arg) {#s, sizeof(#s) - 1, Opt_##s, has_arg} argument
398 static int match_opt_prefix(char *s, int l, char **arg) in match_opt_prefix() argument
404 if (len > l || memcmp(s, tokens[i].name, len)) in match_opt_prefix()
407 if (len == l || s[len] != '=') in match_opt_prefix()
409 *arg = s + len + 1; in match_opt_prefix()
618 static int parse_sid(struct super_block *sb, const char *s, u32 *sid) in parse_sid() argument
620 int rc = security_context_str_to_sid(&selinux_state, s, in parse_sid()
625 s, sb ? sb->s_id : "?", sb ? sb->s_type->name : "?", rc); in parse_sid()
986 static int selinux_add_opt(int token, const char *s, void **mnt_opts) in selinux_add_opt() argument
994 if (!s) in selinux_add_opt()
[all …]
Dselinuxfs.c1778 const char *s = security_get_initial_sid_context(i); in sel_make_initcon_files() local
1780 if (!s) in sel_make_initcon_files()
1782 dentry = d_alloc_name(dir, s); in sel_make_initcon_files()
/security/apparmor/
Dapparmorfs.c1577 char *buffer, *s; in gen_symlink_name() local
1581 s = buffer = kmalloc(size, GFP_KERNEL); in gen_symlink_name()
1586 strcpy(s, "../../"); in gen_symlink_name()
1587 s += 6; in gen_symlink_name()
1591 error = snprintf(s, size, "raw_data/%s/%s", dirname, fname); in gen_symlink_name()

12