/kernel/ |
D | sysctl-test.c | 38 size_t len; in sysctl_test_api_dointvec_null_tbl_data() local 45 len = 1234; in sysctl_test_api_dointvec_null_tbl_data() 47 KUNIT_PROC_READ, buffer, &len, in sysctl_test_api_dointvec_null_tbl_data() 49 KUNIT_EXPECT_EQ(test, 0, len); in sysctl_test_api_dointvec_null_tbl_data() 54 len = 1234; in sysctl_test_api_dointvec_null_tbl_data() 56 KUNIT_PROC_WRITE, buffer, &len, in sysctl_test_api_dointvec_null_tbl_data() 58 KUNIT_EXPECT_EQ(test, 0, len); in sysctl_test_api_dointvec_null_tbl_data() 84 size_t len; in sysctl_test_api_dointvec_table_maxlen_unset() local 91 len = 1234; in sysctl_test_api_dointvec_table_maxlen_unset() 93 KUNIT_PROC_READ, buffer, &len, in sysctl_test_api_dointvec_table_maxlen_unset() [all …]
|
D | kallsyms.c | 45 int len, skipped_first = 0; in kallsyms_expand_symbol() local 51 len = *data; in kallsyms_expand_symbol() 56 if ((len & 0x80) != 0) { in kallsyms_expand_symbol() 57 len = (len & 0x7F) | (*data << 7); in kallsyms_expand_symbol() 66 off += len; in kallsyms_expand_symbol() 72 while (len) { in kallsyms_expand_symbol() 75 len--; in kallsyms_expand_symbol() 119 int i, len; in get_symbol_offset() local 134 len = *name; in get_symbol_offset() 140 if ((len & 0x80) != 0) in get_symbol_offset() [all …]
|
D | compat.c | 111 unsigned len, struct cpumask *new_mask) in compat_get_user_cpu_mask() argument 115 if (len < cpumask_size()) in compat_get_user_cpu_mask() 117 else if (len > cpumask_size()) in compat_get_user_cpu_mask() 118 len = cpumask_size(); in compat_get_user_cpu_mask() 121 return compat_get_bitmap(k, user_mask_ptr, len * 8); in compat_get_user_cpu_mask() 125 unsigned int, len, in COMPAT_SYSCALL_DEFINE3() argument 134 retval = compat_get_user_cpu_mask(user_mask_ptr, len, new_mask); in COMPAT_SYSCALL_DEFINE3() 144 COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len, in COMPAT_SYSCALL_DEFINE3() argument 150 if ((len * BITS_PER_BYTE) < nr_cpu_ids) in COMPAT_SYSCALL_DEFINE3() 152 if (len & (sizeof(compat_ulong_t)-1)) in COMPAT_SYSCALL_DEFINE3() [all …]
|
D | sysctl.c | 150 size_t len; in _proc_do_string() local 161 len = strlen(data); in _proc_do_string() 162 if (len > maxlen - 1) in _proc_do_string() 163 len = maxlen - 1; in _proc_do_string() 165 if (*ppos > len) in _proc_do_string() 167 len = *ppos; in _proc_do_string() 170 len = 0; in _proc_do_string() 175 while ((p - buffer) < *lenp && len < maxlen - 1) { in _proc_do_string() 179 data[len++] = c; in _proc_do_string() 181 data[len] = 0; in _proc_do_string() [all …]
|
D | kexec_elf.c | 119 static int elf_read_ehdr(const char *buf, size_t len, struct elfhdr *ehdr) in elf_read_ehdr() argument 123 if (len < sizeof(*buf_ehdr)) { in elf_read_ehdr() 178 return elf_is_ehdr_sane(ehdr, len) ? 0 : -ENOEXEC; in elf_read_ehdr() 202 static int elf_read_phdr(const char *buf, size_t len, in elf_read_phdr() argument 242 return elf_is_phdr_sane(phdr, len) ? 0 : -ENOEXEC; in elf_read_phdr() 251 static int elf_read_phdrs(const char *buf, size_t len, in elf_read_phdrs() argument 270 ret = elf_read_phdr(buf, len, elf_info, i); in elf_read_phdrs() 296 static int elf_read_from_buffer(const char *buf, size_t len, in elf_read_from_buffer() argument 302 ret = elf_read_ehdr(buf, len, ehdr); in elf_read_from_buffer() 309 ret = elf_read_phdrs(buf, len, elf_info); in elf_read_from_buffer() [all …]
|
D | stacktrace.c | 79 unsigned int len; member 86 if (c->len >= c->size) in stack_trace_consume_entry() 93 c->store[c->len++] = addr; in stack_trace_consume_entry() 94 return c->len < c->size; in stack_trace_consume_entry() 123 return c.len; in stack_trace_save() 152 return c.len; in stack_trace_save_tsk() 176 return c.len; in stack_trace_save_regs() 212 return ret ? ret : c.len; in stack_trace_save_tsk_reliable() 238 return c.len; in stack_trace_save_user()
|
D | audit.c | 833 nlh->nlmsg_len = skb->len; in kauditd_send_multicast_skb() 1226 u32 len; in audit_receive_msg() local 1476 len = 0; in audit_receive_msg() 1478 err = security_secid_to_secctx(audit_sig_sid, &ctx, &len); in audit_receive_msg() 1482 sig_data = kmalloc(struct_size(sig_data, ctx, len), GFP_KERNEL); in audit_receive_msg() 1485 security_release_secctx(ctx, len); in audit_receive_msg() 1491 memcpy(sig_data->ctx, ctx, len); in audit_receive_msg() 1492 security_release_secctx(ctx, len); in audit_receive_msg() 1495 sig_data, struct_size(sig_data, ctx, len)); in audit_receive_msg() 1563 int len; in audit_receive() local [all …]
|
/kernel/trace/ |
D | trace_seq.c | 83 unsigned int save_len = s->seq.len; in trace_seq_printf() 97 s->seq.len = save_len; in trace_seq_printf() 114 unsigned int save_len = s->seq.len; in trace_seq_bitmask() 124 s->seq.len = save_len; in trace_seq_bitmask() 143 unsigned int save_len = s->seq.len; in trace_seq_vprintf() 154 s->seq.len = save_len; in trace_seq_vprintf() 177 unsigned int save_len = s->seq.len; in trace_seq_bprintf() 188 s->seq.len = save_len; in trace_seq_bprintf() 207 unsigned int len = strlen(str); in trace_seq_puts() local 214 if (len > TRACE_SEQ_BUF_LEFT(s)) { in trace_seq_puts() [all …]
|
D | trace_events_filter.c | 459 int len; in predicate_parse() local 513 len = parse_pred(next, data, ptr - str, pe, &prog[N].pred); in predicate_parse() 514 if (len < 0) { in predicate_parse() 515 ret = len; in predicate_parse() 518 ptr = next + len; in predicate_parse() 760 int len; in filter_pchar() local 762 len = strlen(str) + 1; /* including tailing '\0' */ in filter_pchar() 763 cmp = pred->regex.match(str, &pred->regex, len); in filter_pchar() 891 static int regex_match_full(char *str, struct regex *r, int len) in regex_match_full() argument 894 if (!len) in regex_match_full() [all …]
|
D | trace_events_synth.c | 198 unsigned int len; in synth_field_string_size() local 210 len = end - start; in synth_field_string_size() 211 if (len > 3) in synth_field_string_size() 214 if (len == 0) in synth_field_string_size() 217 strncpy(buf, start, len); in synth_field_string_size() 218 buf[len] = '\0'; in synth_field_string_size() 398 u32 offset, data_offset, len; in print_synth_event() local 403 len = offset >> 16; in print_synth_event() 406 end = (void *)p + len - (sizeof(long) - 1); in print_synth_event() 452 unsigned int len = 0; in trace_string() local [all …]
|
D | trace_events_inject.c | 17 trace_inject_entry(struct trace_event_file *file, void *rec, int len) in trace_inject_entry() argument 24 entry = trace_event_buffer_reserve(&fbuffer, file, len); in trace_inject_entry() 26 memcpy(entry, rec, len); in trace_inject_entry() 27 written = len; in trace_inject_entry() 42 int len; in parse_field() local 53 len = i - s; in parse_field() 54 if (!len) in parse_field() 57 field_name = kmemdup_nul(str + s, len, GFP_KERNEL); in parse_field() 124 len = i - s; in parse_field() 125 if (len >= MAX_FILTER_STR_VAL) in parse_field() [all …]
|
D | trace_probe.c | 64 int len = *(u32 *)data >> 16; in PRINT_TYPE_FUNC_NAME() local 66 if (!len) in PRINT_TYPE_FUNC_NAME() 168 int i, len = 0, pos = 0; in __trace_probe_log_err() local 176 pos = len; in __trace_probe_log_err() 177 len += strlen(trace_probe_log.argv[i]) + 1; in __trace_probe_log_err() 179 command = kzalloc(len, GFP_KERNEL); in __trace_probe_log_err() 189 pos = len; in __trace_probe_log_err() 196 len = strlen(trace_probe_log.argv[i]); in __trace_probe_log_err() 198 p[len] = ' '; in __trace_probe_log_err() 199 p += len + 1; in __trace_probe_log_err() [all …]
|
D | trace_events_user.c | 187 int len = sizeof(USER_EVENTS_SYSTEM) + 1; in user_event_group_system_name() local 199 system_name = kmalloc(len, GFP_KERNEL); in user_event_group_system_name() 204 snprintf(system_name, len, "%s", USER_EVENTS_SYSTEM); in user_event_group_system_name() 512 int len, size = -EINVAL; in user_event_parse_field() local 521 len = str_has_prefix(field, "unsigned "); in user_event_parse_field() 522 if (len) in user_event_parse_field() 525 len = str_has_prefix(field, "struct "); in user_event_parse_field() 526 if (len) { in user_event_parse_field() 531 len = str_has_prefix(field, "__data_loc unsigned "); in user_event_parse_field() 532 if (len) in user_event_parse_field() [all …]
|
D | trace_probe_kernel.h | 24 int ret, len = 0; in kern_fetch_store_strlen() local 33 ret = copy_from_kernel_nofault(&c, (u8 *)addr + len, 1); in kern_fetch_store_strlen() 34 len++; in kern_fetch_store_strlen() 35 } while (c && ret == 0 && len < MAX_STRING_SIZE); in kern_fetch_store_strlen() 37 return (ret < 0) ? ret : len; in kern_fetch_store_strlen()
|
/kernel/power/ |
D | wakelock.c | 42 int len = 0; in pm_show_wakelocks() local 49 len += sysfs_emit_at(buf, len, "%s ", wl->name); in pm_show_wakelocks() 52 len += sysfs_emit_at(buf, len, "\n"); in pm_show_wakelocks() 55 return len; in pm_show_wakelocks() 147 static struct wakelock *wakelock_lookup_add(const char *name, size_t len, in wakelock_lookup_add() argument 159 diff = strncmp(name, wl->name, len); in wakelock_lookup_add() 161 if (wl->name[len]) in wakelock_lookup_add() 182 wl->name = kstrndup(name, len, GFP_KERNEL); in wakelock_lookup_add() 208 size_t len; in pm_wake_lock() local 217 len = str - buf; in pm_wake_lock() [all …]
|
D | main.c | 157 int len; in decode_suspend_state() local 160 len = p ? p - buf : n; in decode_suspend_state() 165 if (label && len == strlen(label) && !strncmp(buf, label, len)) in decode_suspend_state() 274 int len; in pm_test_store() local 277 len = p ? p - buf : n; in pm_test_store() 283 if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) { in pm_test_store() 598 int len; in decode_state() local 601 len = p ? p - buf : n; in decode_state() 604 if (len == 4 && str_has_prefix(buf, "disk")) in decode_state() 611 if (label && len == strlen(label) && !strncmp(buf, label, len)) in decode_state()
|
/kernel/debug/kdb/ |
D | kdb_io.c | 204 int len = strlen(buffer); in kdb_read() local 217 if (len > 0) { in kdb_read() 218 cp += len; in kdb_read() 219 if (*(buffer+len-1) == '\n') in kdb_read() 327 len = strlen(p_tmp); in kdb_read() 348 *(p_tmp + len) = '\0'; in kdb_read() 359 strncpy(cp, p_tmp+len, len_tmp-len + 1); in kdb_read() 360 len = len_tmp - len; in kdb_read() 362 cp += len; in kdb_read() 363 lastchar += len; in kdb_read() [all …]
|
D | kdb_main.c | 880 int len; in parse_grep() local 899 len = strlen(cp); in parse_grep() 900 if (len == 0) { in parse_grep() 921 len = strlen(cp); in parse_grep() 923 if (*(cp+len-1) == '$') { in parse_grep() 925 *(cp+len-1) = '\0'; in parse_grep() 927 len = strlen(cp); in parse_grep() 928 if (!len) in parse_grep() 930 if (len >= KDB_GREP_STRLEN) { in parse_grep() 1199 size_t len = strlen(buf); in drop_newline() local [all …]
|
/kernel/printk/ |
D | printk.c | 129 size_t len; in __control_devkmsg() local 134 len = str_has_prefix(str, "on"); in __control_devkmsg() 135 if (len) { in __control_devkmsg() 137 return len; in __control_devkmsg() 140 len = str_has_prefix(str, "off"); in __control_devkmsg() 141 if (len) { in __control_devkmsg() 143 return len; in __control_devkmsg() 146 len = str_has_prefix(str, "ratelimit"); in __control_devkmsg() 147 if (len) { in __control_devkmsg() 149 return len; in __control_devkmsg() [all …]
|
D | braille.c | 14 size_t len; in _braille_console_setup() local 16 len = str_has_prefix(*str, "brl,"); in _braille_console_setup() 17 if (len) { in _braille_console_setup() 19 *str += len; in _braille_console_setup() 23 len = str_has_prefix(*str, "brl="); in _braille_console_setup() 24 if (len) { in _braille_console_setup() 25 *brl_options = *str + len; in _braille_console_setup()
|
/kernel/rcu/ |
D | rcu_segcblist.c | 22 rclp->len = 0; in rcu_cblist_init() 32 WRITE_ONCE(rclp->len, rclp->len + 1); in rcu_cblist_enqueue() 52 drclp->len = srclp->len; in rcu_cblist_flush_enqueue() 59 WRITE_ONCE(srclp->len, 1); in rcu_cblist_flush_enqueue() 74 rclp->len--; in rcu_cblist_dequeue() 85 atomic_long_set(&rsclp->len, v); in rcu_segcblist_set_len() 87 WRITE_ONCE(rsclp->len, v); in rcu_segcblist_set_len() 100 long len = 0; in rcu_segcblist_n_segment_cbs() local 104 len += rcu_segcblist_get_seglen(rsclp, i); in rcu_segcblist_n_segment_cbs() 106 return len; in rcu_segcblist_n_segment_cbs() [all …]
|
/kernel/entry/ |
D | syscall_user_dispatch.c | 39 if (likely(instruction_pointer(regs) - sd->offset < sd->len)) in syscall_user_dispatch() 72 unsigned long len, char __user *selector) in set_syscall_user_dispatch() argument 76 if (offset || len || selector) in set_syscall_user_dispatch() 86 if (offset && offset + len <= offset) in set_syscall_user_dispatch() 99 current->syscall_dispatch.len = len; in set_syscall_user_dispatch()
|
/kernel/events/ |
D | internal.h | 139 size = min(handle->size, len); \ 143 len -= written; \ 156 } while (len && written == size); \ 158 return len; \ 164 const void *buf, unsigned long len) \ 169 const void *buf, unsigned long len) in __output_custom() argument 171 unsigned long orig_len = len; in __output_custom() 173 orig_len - len, size) in __output_custom()
|
/kernel/module/ |
D | signing.c | 53 size_t sig_len, modlen = info->len; in mod_verify_sig() 69 info->len = modlen; in mod_verify_sig() 90 info->len > markerlen && in module_sig_check() 91 memcmp(mod + info->len - markerlen, MODULE_SIG_STRING, markerlen) == 0) { in module_sig_check() 93 info->len -= markerlen; in module_sig_check()
|
/kernel/debug/ |
D | gdbstub.c | 195 void gdbstub_msg_write(const char *s, int len) in gdbstub_msg_write() argument 201 if (len == 0) in gdbstub_msg_write() 202 len = strlen(s); in gdbstub_msg_write() 208 while (len > 0) { in gdbstub_msg_write() 212 if ((len << 1) > (BUFMAX - 2)) in gdbstub_msg_write() 215 wcount = len; in gdbstub_msg_write() 224 len -= wcount; in gdbstub_msg_write() 773 int len = strlen(remcom_in_buffer + 6); in gdb_cmd_query() local 775 if ((len % 2) != 0) { in gdb_cmd_query() 780 remcom_out_buffer, len); in gdb_cmd_query() [all …]
|