Home
last modified time | relevance | path

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

12

/security/selinux/ss/
Dsidtab.c23 int sidtab_init(struct sidtab *s) in sidtab_init() argument
27 memset(s->roots, 0, sizeof(s->roots)); in sidtab_init()
30 s->isids[i].set = 0; in sidtab_init()
32 s->count = 0; in sidtab_init()
33 s->convert = NULL; in sidtab_init()
34 hash_init(s->context_to_sid); in sidtab_init()
36 spin_lock_init(&s->lock); in sidtab_init()
40 static u32 context_to_sid(struct sidtab *s, struct context *context) in context_to_sid() argument
46 hash_for_each_possible_rcu(s->context_to_sid, entry, list, in context_to_sid()
57 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context) in sidtab_set_initial() argument
[all …]
Dsidtab.h97 int sidtab_init(struct sidtab *s);
98 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context);
99 struct context *sidtab_search(struct sidtab *s, u32 sid);
100 struct context *sidtab_search_force(struct sidtab *s, u32 sid);
102 int sidtab_convert(struct sidtab *s, struct sidtab_convert_params *params);
104 int sidtab_context_to_sid(struct sidtab *s, struct context *context, u32 *sid);
106 void sidtab_destroy(struct sidtab *s);
Dsymtab.c36 int symtab_init(struct symtab *s, unsigned int size) in symtab_init() argument
38 s->table = hashtab_create(symhash, symcmp, size); in symtab_init()
39 if (!s->table) in symtab_init()
41 s->nprim = 0; in symtab_init()
Dconditional.c28 int s[COND_EXPR_MAXDEPTH]; in cond_evaluate_expr() local
37 s[sp] = p->bool_val_to_struct[cur->bool - 1]->state; in cond_evaluate_expr()
42 s[sp] = !s[sp]; in cond_evaluate_expr()
48 s[sp] |= s[sp + 1]; in cond_evaluate_expr()
54 s[sp] &= s[sp + 1]; in cond_evaluate_expr()
60 s[sp] ^= s[sp + 1]; in cond_evaluate_expr()
66 s[sp] = (s[sp] == s[sp + 1]); in cond_evaluate_expr()
72 s[sp] = (s[sp] != s[sp + 1]); in cond_evaluate_expr()
78 return s[0]; in cond_evaluate_expr()
Dservices.c273 int s[CEXPR_MAXDEPTH]; in constraint_expr_eval() local
280 s[sp] = !s[sp]; in constraint_expr_eval()
285 s[sp] &= s[sp + 1]; in constraint_expr_eval()
290 s[sp] |= s[sp + 1]; in constraint_expr_eval()
311 s[++sp] = ebitmap_get_bit(&r1->dominates, in constraint_expr_eval()
315 s[++sp] = ebitmap_get_bit(&r2->dominates, in constraint_expr_eval()
319 s[++sp] = (!ebitmap_get_bit(&r1->dominates, in constraint_expr_eval()
355 s[++sp] = mls_level_eq(l1, l2); in constraint_expr_eval()
358 s[++sp] = !mls_level_eq(l1, l2); in constraint_expr_eval()
361 s[++sp] = mls_level_dom(l1, l2); in constraint_expr_eval()
[all …]
Dcontext.h167 static inline unsigned int context_compute_hash(const char *s) in context_compute_hash() argument
169 return full_name_hash(NULL, s, strlen(s)); in context_compute_hash()
Dsymtab.h20 int symtab_init(struct symtab *s, unsigned int size);
Debitmap.c270 unsigned int s; in ebitmap_set_bit() local
274 s = find_first_bit(n->maps, EBITMAP_SIZE); in ebitmap_set_bit()
275 if (s < EBITMAP_SIZE) in ebitmap_set_bit()
Dmls.h39 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.h313 extern int policydb_load_isids(struct policydb *p, struct sidtab *s);
Dpolicydb.c674 static void symtab_hash_eval(struct symtab *s) in symtab_hash_eval() argument
679 hash_eval(s[i].table, symtab_name[i]); in symtab_hash_eval()
850 int policydb_load_isids(struct policydb *p, struct sidtab *s) in policydb_load_isids() argument
855 rc = sidtab_init(s); in policydb_load_isids()
867 sidtab_destroy(s); in policydb_load_isids()
873 sidtab_destroy(s); in policydb_load_isids()
878 sidtab_destroy(s); in policydb_load_isids()
882 rc = sidtab_set_initial(s, c->sid[0], &c->context[0]); in policydb_load_isids()
886 sidtab_destroy(s); in policydb_load_isids()
/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.c872 struct tomoyo_task *s = tomoyo_task(current); in tomoyo_find_next_domain() local
874 s->old_domain_info = s->domain_info; in tomoyo_find_next_domain()
875 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.c62 #define A(s) {"smack"#s, sizeof("smack"#s) - 1, Opt_##s} argument
73 static int match_opt_prefix(char *s, int l, char **arg) in match_opt_prefix() argument
79 if (len > l || memcmp(s, smk_mount_opts[i].name, len)) in match_opt_prefix()
81 if (len == l || s[len] != '=') in match_opt_prefix()
83 *arg = s + len + 1; in match_opt_prefix()
97 static void smk_bu_mode(int mode, char *s) in smk_bu_mode() argument
102 s[i++] = 'r'; in smk_bu_mode()
104 s[i++] = 'w'; in smk_bu_mode()
106 s[i++] = 'x'; in smk_bu_mode()
108 s[i++] = 'a'; in smk_bu_mode()
[all …]
/security/
Ddevice_cgroup.c46 static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s) in css_to_devcgroup() argument
48 return s ? container_of(s, struct dev_cgroup, css) : NULL; in css_to_devcgroup()
DKconfig.hardening35 on the function calling complexity of a given workload's
/security/integrity/
Ddigsig_asymmetric.c115 pks.s = hdr->sig; in asymmetric_verify()
/security/integrity/evm/
DKconfig11 EVM protects a file's security extended attributes against
/security/keys/
Dtrusted.c398 static int osap(struct tpm_buf *tb, struct osapsess *s, in osap() argument
421 s->handle = LOAD32(tb->data, TPM_DATA_OFFSET); in osap()
422 memcpy(s->enonce, &(tb->data[TPM_DATA_OFFSET + sizeof(uint32_t)]), in osap()
426 return TSS_rawhmac(s->secret, key, SHA1_DIGEST_SIZE, TPM_NONCE_SIZE, in osap()
/security/selinux/
Dhooks.c423 #define A(s, has_arg) {#s, sizeof(#s) - 1, Opt_##s, has_arg} argument
438 static int match_opt_prefix(char *s, int l, char **arg) in match_opt_prefix() argument
444 if (len > l || memcmp(s, tokens[i].name, len)) in match_opt_prefix()
447 if (len == l || s[len] != '=') in match_opt_prefix()
449 *arg = s + len + 1; in match_opt_prefix()
632 static int parse_sid(struct super_block *sb, const char *s, u32 *sid) in parse_sid() argument
634 int rc = security_context_str_to_sid(&selinux_state, s, in parse_sid()
639 s, sb->s_id, sb->s_type->name, rc); in parse_sid()
997 static int selinux_add_opt(int token, const char *s, void **mnt_opts) in selinux_add_opt() argument
1010 if (!s) in selinux_add_opt()
[all …]
/security/apparmor/
Dapparmorfs.c1488 char *buffer, *s; in gen_symlink_name() local
1492 s = buffer = kmalloc(size, GFP_KERNEL); in gen_symlink_name()
1497 strcpy(s, "../../"); in gen_symlink_name()
1498 s += 6; in gen_symlink_name()
1502 error = snprintf(s, size, "raw_data/%s/%s", dirname, fname); in gen_symlink_name()

12