/kernel/bpf/ |
D | net_namespace.c | 13 enum bpf_attach_type type; member 28 static void netns_bpf_attach_type_unneed(enum netns_bpf_attach_type type) in netns_bpf_attach_type_unneed() argument 30 switch (type) { in netns_bpf_attach_type_unneed() 41 static void netns_bpf_attach_type_need(enum netns_bpf_attach_type type) in netns_bpf_attach_type_need() argument 43 switch (type) { in netns_bpf_attach_type_need() 56 enum netns_bpf_attach_type type) in netns_bpf_run_array_detach() argument 60 run_array = rcu_replace_pointer(net->bpf.run_array[type], NULL, in netns_bpf_run_array_detach() 65 static int link_index(struct net *net, enum netns_bpf_attach_type type, in link_index() argument 71 list_for_each_entry(pos, &net->bpf.links[type], node) { in link_index() 79 static int link_count(struct net *net, enum netns_bpf_attach_type type) in link_count() argument [all …]
|
D | cgroup.c | 41 enum bpf_attach_type type, in bpf_cgroup_storages_alloc() argument 50 key.attach_type = type; in bpf_cgroup_storages_alloc() 116 unsigned int type; in cgroup_bpf_release() local 120 for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { in cgroup_bpf_release() 121 struct list_head *progs = &cgrp->bpf.progs[type]; in cgroup_bpf_release() 134 cgrp->bpf.effective[type], in cgroup_bpf_release() 199 enum bpf_attach_type type) in hierarchy_allows_attach() argument 207 u32 flags = p->bpf.flags[type]; in hierarchy_allows_attach() 212 cnt = prog_list_length(&p->bpf.progs[type]); in hierarchy_allows_attach() 228 enum bpf_attach_type type, in compute_effective_progs() argument [all …]
|
D | inode.c | 32 static void *bpf_any_get(void *raw, enum bpf_type type) in bpf_any_get() argument 34 switch (type) { in bpf_any_get() 52 static void bpf_any_put(void *raw, enum bpf_type type) in bpf_any_put() argument 54 switch (type) { in bpf_any_put() 70 static void *bpf_fd_probe_obj(u32 ufd, enum bpf_type *type) in bpf_fd_probe_obj() argument 76 *type = BPF_TYPE_MAP; in bpf_fd_probe_obj() 82 *type = BPF_TYPE_PROG; in bpf_fd_probe_obj() 88 *type = BPF_TYPE_LINK; in bpf_fd_probe_obj() 130 static int bpf_inode_type(const struct inode *inode, enum bpf_type *type) in bpf_inode_type() argument 132 *type = BPF_TYPE_UNSPEC; in bpf_inode_type() [all …]
|
D | verifier.c | 385 static bool type_is_pkt_pointer(enum bpf_reg_type type) in type_is_pkt_pointer() argument 387 return type == PTR_TO_PACKET || in type_is_pkt_pointer() 388 type == PTR_TO_PACKET_META; in type_is_pkt_pointer() 391 static bool type_is_sk_pointer(enum bpf_reg_type type) in type_is_sk_pointer() argument 393 return type == PTR_TO_SOCKET || in type_is_sk_pointer() 394 type == PTR_TO_SOCK_COMMON || in type_is_sk_pointer() 395 type == PTR_TO_TCP_SOCK || in type_is_sk_pointer() 396 type == PTR_TO_XDP_SOCK; in type_is_sk_pointer() 399 static bool reg_type_not_null(enum bpf_reg_type type) in reg_type_not_null() argument 401 return type == PTR_TO_SOCKET || in reg_type_not_null() [all …]
|
D | btf.c | 355 const struct btf_type *type; member 478 id = t->type; in btf_type_skip_modifiers() 479 t = btf_type_by_id(btf, t->type); in btf_type_skip_modifiers() 497 return btf_type_skip_modifiers(btf, t->type, res_id); in btf_type_resolve_ptr() 709 id = m->type; in btf_member_is_reg_int() 746 id = t->type; in btf_type_skip_qualifiers() 747 t = btf_type_by_id(btf, t->type); in btf_type_skip_qualifiers() 773 const struct btf_type *t = show->state.type; in btf_show_name() 795 id = m->type; in btf_show_name() 839 id = t->type; in btf_show_name() [all …]
|
D | bpf_lru_list.c | 53 enum bpf_lru_list_type type) in bpf_lru_list_count_inc() argument 55 if (type < NR_BPF_LRU_LIST_COUNT) in bpf_lru_list_count_inc() 56 l->counts[type]++; in bpf_lru_list_count_inc() 60 enum bpf_lru_list_type type) in bpf_lru_list_count_dec() argument 62 if (type < NR_BPF_LRU_LIST_COUNT) in bpf_lru_list_count_dec() 63 l->counts[type]--; in bpf_lru_list_count_dec() 71 if (WARN_ON_ONCE(IS_LOCAL_LIST_TYPE(node->type))) in __bpf_lru_node_move_to_free() 80 bpf_lru_list_count_dec(l, node->type); in __bpf_lru_node_move_to_free() 82 node->type = tgt_free_type; in __bpf_lru_node_move_to_free() 91 if (WARN_ON_ONCE(!IS_LOCAL_LIST_TYPE(node->type)) || in __bpf_lru_node_move_in() [all …]
|
/kernel/trace/ |
D | trace_export.c | 19 enum trace_reg type, void *data) in ftrace_event_register() argument 37 #define __field_struct(type, item) argument 40 #define __field(type, item) type item; argument 43 #define __field_fn(type, item) type item; argument 46 #define __field_desc(type, container, item) type item; argument 49 #define __field_packed(type, container, item) type item; argument 52 #define __array(type, item, size) type item[size]; argument 55 #define __array_desc(type, container, item, size) type item[size]; argument 58 #define __dynamic_array(type, item) type item[]; argument 87 .type = #_type, .name = #_item, \ [all …]
|
D | trace_events_synth.c | 117 char *name, *type; in synth_event_define_fields() local 124 type = event->fields[i]->type; in synth_event_define_fields() 126 ret = trace_define_field(call, type, name, offset, size, in synth_event_define_fields() 147 static bool synth_field_signed(char *type) in synth_field_signed() argument 149 if (str_has_prefix(type, "u")) in synth_field_signed() 151 if (strcmp(type, "gfp_t") == 0) in synth_field_signed() 157 static int synth_field_is_string(char *type) in synth_field_is_string() argument 159 if (strstr(type, "char[") != NULL) in synth_field_is_string() 165 static int synth_field_string_size(char *type) in synth_field_string_size() argument 171 start = strstr(type, "char["); in synth_field_string_size() [all …]
|
D | trace_probe.c | 33 #define DEFINE_BASIC_PRINT_TYPE_FUNC(tname, type, fmt) \ argument 36 trace_seq_printf(s, fmt, *(type *)data); \ 101 static const struct fetch_type *find_fetch_type(const char *type) in find_fetch_type() argument 105 if (!type) in find_fetch_type() 106 type = DEFAULT_FETCH_TYPE_STR; in find_fetch_type() 109 if (*type == 'b') { in find_fetch_type() 112 type = strchr(type, '/'); in find_fetch_type() 113 if (!type) in find_fetch_type() 116 type++; in find_fetch_type() 117 if (kstrtoul(type, 0, &bs)) in find_fetch_type() [all …]
|
D | trace_events_filter.c | 593 #define DEFINE_COMPARISON_PRED(type) \ argument 594 static int filter_pred_LT_##type(struct filter_pred *pred, void *event) \ 596 type *addr = (type *)(event + pred->offset); \ 597 type val = (type)pred->val; \ 600 static int filter_pred_LE_##type(struct filter_pred *pred, void *event) \ 602 type *addr = (type *)(event + pred->offset); \ 603 type val = (type)pred->val; \ 606 static int filter_pred_GT_##type(struct filter_pred *pred, void *event) \ 608 type *addr = (type *)(event + pred->offset); \ 609 type val = (type)pred->val; \ [all …]
|
D | trace_dynevent.c | 34 int dyn_event_release(int argc, char **argv, struct dyn_event_operations *type) in dyn_event_release() argument 63 if (type && type != pos->ops) in dyn_event_release() 147 int dyn_events_release_all(struct dyn_event_operations *type) in dyn_events_release_all() argument 154 if (type && ev->ops != type) in dyn_events_release_all() 162 if (type && ev->ops != type) in dyn_events_release_all() 361 enum dynevent_type type, in dynevent_cmd_init() argument 367 cmd->type = type; in dynevent_cmd_init()
|
D | trace_output.c | 303 if (entry->type != event->event.type) { in trace_raw_output_prep() 658 struct trace_event *ftrace_find_event(int type) in ftrace_find_event() argument 663 key = type & (EVENT_HASHSIZE - 1); in ftrace_find_event() 666 if (event->type == type) in ftrace_find_event() 690 if (e->type != next) in trace_search_list() 743 if (!event->type) { in register_trace_event() 748 event->type = trace_search_list(&list); in register_trace_event() 749 if (!event->type) in register_trace_event() 754 event->type = next_event_type++; in register_trace_event() 758 if (WARN_ON(ftrace_find_event(event->type))) in register_trace_event() [all …]
|
D | synth_event_gen_test.c | 238 { .type = "pid_t", .name = "next_pid_field" }, 239 { .type = "char[16]", .name = "next_comm_field" }, 240 { .type = "u64", .name = "ts_ns" }, 241 { .type = "char[]", .name = "dynstring_field_1" }, 242 { .type = "u64", .name = "ts_ms" }, 243 { .type = "unsigned int", .name = "cpu" }, 244 { .type = "char[64]", .name = "my_string_field" }, 245 { .type = "char[]", .name = "dynstring_field_2" }, 246 { .type = "int", .name = "my_int_field" },
|
D | trace_syscalls.c | 19 enum trace_reg type, void *data); 21 enum trace_reg type, void *data); 144 if (entry->enter_event->event.type != ent->type) { in print_syscall_enter() 192 if (entry->exit_event->event.type != ent->type) { in print_syscall_exit() 207 .type = #_type, .name = #_name, \ 330 sys_data->enter_event->event.type, size, irq_flags, pc); in ftrace_syscall_enter() 376 sys_data->exit_event->event.type, sizeof(*entry), in ftrace_syscall_exit() 492 { .type = TRACE_FUNCTION_TYPE, 639 sys_data->enter_event->event.type, 1, regs, in perf_syscall_enter() 735 perf_trace_buf_submit(rec, size, rctx, sys_data->exit_event->event.type, in perf_syscall_exit() [all …]
|
/kernel/time/ |
D | alarmtimer.c | 202 struct alarm_base *base = &alarm_bases[alarm->type]; in alarmtimer_fired() 229 struct alarm_base *base = &alarm_bases[alarm->type]; in alarm_expires_remaining() 247 int i, ret, type; in alarmtimer_suspend() local 256 type = freezer_alarmtype; in alarmtimer_suspend() 284 type = i; in alarmtimer_suspend() 295 trace_alarmtimer_suspend(expires, type); in alarmtimer_suspend() 333 __alarm_init(struct alarm *alarm, enum alarmtimer_type type, in __alarm_init() argument 339 alarm->type = type; in __alarm_init() 349 void alarm_init(struct alarm *alarm, enum alarmtimer_type type, in alarm_init() argument 352 hrtimer_init(&alarm->timer, alarm_bases[type].base_clockid, in alarm_init() [all …]
|
/kernel/ |
D | pid.c | 163 enum pid_type type; in alloc_pid() local 262 for (type = 0; type < PIDTYPE_MAX; ++type) in alloc_pid() 263 INIT_HLIST_HEAD(&pid->tasks[type]); in alloc_pid() 321 static struct pid **task_pid_ptr(struct task_struct *task, enum pid_type type) in task_pid_ptr() argument 323 return (type == PIDTYPE_PID) ? in task_pid_ptr() 325 &task->signal->pids[type]; in task_pid_ptr() 331 void attach_pid(struct task_struct *task, enum pid_type type) in attach_pid() argument 333 struct pid *pid = *task_pid_ptr(task, type); in attach_pid() 334 hlist_add_head_rcu(&task->pid_links[type], &pid->tasks[type]); in attach_pid() 337 static void __change_pid(struct task_struct *task, enum pid_type type, in __change_pid() argument [all …]
|
D | auditsc.c | 102 int type; member 487 switch (f->type) { in audit_filter_rules() 675 result = security_audit_rule_match(sid, f->type, in audit_filter_rules() 692 f->type, in audit_filter_rules() 699 f->type, in audit_filter_rules() 708 if (!ctx || ctx->type != AUDIT_IPC) in audit_filter_rules() 711 f->type, f->op, in audit_filter_rules() 721 result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val); in audit_filter_rules() 885 if (context->type == AUDIT_KERN_MODULE) { in audit_free_module() 1229 int type; in audit_log_time() local [all …]
|
D | jump_label.c | 342 enum jump_label_type type) in arch_jump_label_transform_static() argument 344 arch_jump_label_transform(entry, type); in arch_jump_label_transform_static() 349 WARN_ON_ONCE(key->type & JUMP_TYPE_LINKED); in static_key_entries() 350 return (struct jump_entry *)(key->type & ~JUMP_TYPE_MASK); in static_key_entries() 355 return key->type & JUMP_TYPE_TRUE; in static_key_type() 360 return key->type & JUMP_TYPE_LINKED; in static_key_linked() 365 key->type &= ~JUMP_TYPE_LINKED; in static_key_clear_linked() 370 key->type |= JUMP_TYPE_LINKED; in static_key_set_linked() 385 unsigned long type; in static_key_set_entries() local 388 type = key->type & JUMP_TYPE_MASK; in static_key_set_entries() [all …]
|
D | kcmp.c | 39 static long kptr_obfuscate(long v, int type) in kptr_obfuscate() argument 41 return (v ^ cookies[type][0]) * cookies[type][1]; in kptr_obfuscate() 50 static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type) in kcmp_ptr() argument 54 t1 = kptr_obfuscate((long)v1, type); in kcmp_ptr() 55 t2 = kptr_obfuscate((long)v2, type); in kcmp_ptr() 152 SYSCALL_DEFINE5(kcmp, pid_t, pid1, pid_t, pid2, int, type, in SYSCALL_DEFINE5() argument 186 switch (type) { in SYSCALL_DEFINE5()
|
D | kallsyms.c | 488 char type; member 496 char *type, char *name) in arch_get_kallsym() argument 504 &iter->value, &iter->type, in get_ksymbol_arch() 518 &iter->value, &iter->type, in get_ksymbol_mod() 537 &iter->value, &iter->type, in get_ksymbol_ftrace_mod() 555 &iter->value, &iter->type, in get_ksymbol_bpf() 575 &iter->value, &iter->type, in get_ksymbol_kprobe() 587 iter->type = kallsyms_get_symbol_type(off); in get_ksymbol_core() 684 char type; in s_show() local 690 type = iter->exported ? toupper(iter->type) : in s_show() [all …]
|
/kernel/events/ |
D | hw_breakpoint.c | 52 static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type) in get_bp_info() argument 54 return per_cpu_ptr(bp_cpuinfo + type, cpu); in get_bp_info() 88 static unsigned int max_task_bp_pinned(int cpu, enum bp_type_idx type) in max_task_bp_pinned() argument 90 unsigned int *tsk_pinned = get_bp_info(cpu, type)->tsk_pinned; in max_task_bp_pinned() 93 for (i = nr_slots[type] - 1; i >= 0; i--) { in max_task_bp_pinned() 105 static int task_bp_pinned(int cpu, struct perf_event *bp, enum bp_type_idx type) in task_bp_pinned() argument 113 find_slot_idx(iter->attr.bp_type) == type && in task_bp_pinned() 134 enum bp_type_idx type) in fetch_bp_busy_slots() argument 140 struct bp_cpuinfo *info = get_bp_info(cpu, type); in fetch_bp_busy_slots() 145 nr += max_task_bp_pinned(cpu, type); in fetch_bp_busy_slots() [all …]
|
/kernel/kcsan/ |
D | report.c | 206 static const char *get_access_type(int type) in get_access_type() argument 208 if (type & KCSAN_ACCESS_ASSERT) { in get_access_type() 209 if (type & KCSAN_ACCESS_SCOPED) { in get_access_type() 210 if (type & KCSAN_ACCESS_WRITE) in get_access_type() 215 if (type & KCSAN_ACCESS_WRITE) in get_access_type() 222 switch (type) { in get_access_type() 248 static const char *get_bug_type(int type) in get_bug_type() argument 250 return (type & KCSAN_ACCESS_ASSERT) != 0 ? "assert: race" : "data-race"; in get_bug_type() 327 enum kcsan_report_type type, in print_report() argument 344 if (type == KCSAN_REPORT_RACE_SIGNAL) { in print_report() [all …]
|
D | core.c | 211 __kcsan_check_access(scoped_access->ptr, scoped_access->size, scoped_access->type); in kcsan_check_scoped_accesses() 217 is_atomic(const volatile void *ptr, size_t size, int type, struct kcsan_ctx *ctx) in is_atomic() argument 219 if (type & KCSAN_ACCESS_ATOMIC) in is_atomic() 227 if (type & KCSAN_ACCESS_ASSERT) in is_atomic() 231 (type & KCSAN_ACCESS_WRITE) && size <= sizeof(long) && in is_atomic() 232 !(type & KCSAN_ACCESS_COMPOUND) && IS_ALIGNED((unsigned long)ptr, size)) in is_atomic() 254 should_watch(const volatile void *ptr, size_t size, int type, struct kcsan_ctx *ctx) in should_watch() argument 263 if (is_atomic(ptr, size, type, ctx)) in should_watch() 307 static void delay_access(int type) in delay_access() argument 312 (type & (KCSAN_ACCESS_COMPOUND | KCSAN_ACCESS_ASSERT)) ? 1 : 0; in delay_access() [all …]
|
/kernel/power/ |
D | qos.c | 66 switch (c->type) { in pm_qos_get_value() 223 .type = PM_QOS_MIN, 445 c->type = PM_QOS_MAX; in freq_constraints_init() 454 c->type = PM_QOS_MIN; in freq_constraints_init() 465 enum freq_qos_req_type type) in freq_qos_read_value() argument 469 switch (type) { in freq_qos_read_value() 501 switch(req->type) { in freq_qos_apply() 533 enum freq_qos_req_type type, s32 value) in freq_qos_add_request() argument 545 req->type = type; in freq_qos_add_request() 549 req->type = 0; in freq_qos_add_request() [all …]
|
/kernel/dma/ |
D | debug.c | 71 int type; member 316 entry->type == ref->type ? ++match_lvl : 0; in __hash_bucket_find() 394 if (entry->type == dma_debug_resource) in phys_addr() 418 type2name[entry->type], idx, in debug_dma_dump_mappings() 795 type2name[entry->type], idx, in dump_show() 866 dir2name[entry->direction], type2name[entry->type]); in dma_debug_device_change() 991 if (ref->type != entry->type) { in check_unmap() 997 type2name[entry->type], type2name[ref->type]); in check_unmap() 998 } else if ((entry->type == dma_debug_coherent) && in check_unmap() 1010 if (ref->sg_call_ents && ref->type == dma_debug_sg && in check_unmap() [all …]
|