| /kernel/ |
| A D | relay.c | 203 *per_cpu_ptr(chan->buf, buf->cpu) = NULL; in relay_destroy_buf() 303 buf->data = buf->start; in __relay_reset() 311 relay_subbuf_start(buf, buf->data, NULL); in __relay_reset() 340 if ((buf = *per_cpu_ptr(chan->buf, i))) in relay_reset() 411 *per_cpu_ptr(chan->buf, 0) = buf; in relay_open_buf() 453 *per_cpu_ptr(chan->buf, cpu) = buf; in relay_prepare_cpu() 521 *per_cpu_ptr(chan->buf, i) = buf; in relay_open() 530 if ((buf = *per_cpu_ptr(chan->buf, i))) in relay_open() 633 buf = *per_cpu_ptr(chan->buf, cpu); in relay_subbufs_consumed() 693 if ((buf = *per_cpu_ptr(chan->buf, i))) in relay_flush() [all …]
|
| A D | ksysfs.c | 71 const char *buf, size_t count) in uevent_helper_store() argument 75 memcpy(uevent_helper, buf, count); in uevent_helper_store() 92 const char *buf, size_t count) in profiling_store() argument 110 profile_setup((char *)buf); in profiling_store() 146 return sysfs_emit(buf, "%zd\n", size); in kexec_crash_size_show() 150 const char *buf, size_t count) in kexec_crash_size_store() argument 155 if (kstrtoul(buf, 0, &cnt)) in kexec_crash_size_store() 183 return sysfs_emit(buf, "%u\n", sz); in crash_elfcorehdr_size_show() 208 const char *buf, size_t count) in rcu_expedited_store() argument 225 const char *buf, size_t count) in rcu_normal_store() argument [all …]
|
| A D | vmcore_info.c | 37 struct elf_note *note = (struct elf_note *)buf; in append_elf_note() 43 memcpy(buf, name, note->n_namesz); in append_elf_note() 45 memcpy(buf, data, data_len); in append_elf_note() 48 return buf; in append_elf_note() 51 void final_note(Elf_Word *buf) in final_note() argument 53 memset(buf, 0, sizeof(struct elf_note)); in final_note() 58 u32 *buf = vmcoreinfo_note; in update_vmcoreinfo_note() local 62 buf = append_elf_note(buf, VMCOREINFO_NOTE_NAME, 0, vmcoreinfo_data, in update_vmcoreinfo_note() 64 final_note(buf); in update_vmcoreinfo_note() 91 char buf[0x50]; in vmcoreinfo_append_str() local [all …]
|
| A D | reboot.c | 1077 struct kobj_attribute *attr, char *buf) in hw_protection_show() argument 1079 return sysfs_emit(buf, "%s\n", in hw_protection_show() 1218 return sysfs_emit(buf, "%s\n", val); in mode_show() 1221 const char *buf, size_t count) in mode_store() argument 1251 const char *buf, size_t count) in force_store() argument 1258 if (kstrtobool(buf, &res)) in force_store() 1295 return sysfs_emit(buf, "%s\n", val); in type_show() 1298 const char *buf, size_t count) in type_store() argument 1328 return sysfs_emit(buf, "%d\n", reboot_cpu); in cpu_show() 1331 const char *buf, size_t count) in cpu_store() argument [all …]
|
| A D | kexec_elf.c | 129 memcpy(ehdr->e_ident, buf, sizeof(ehdr->e_ident)); in elf_read_ehdr() 144 buf_ehdr = (struct elfhdr *) buf; in elf_read_ehdr() 202 static int elf_read_phdr(const char *buf, size_t len, in elf_read_phdr() argument 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() 302 ret = elf_read_ehdr(buf, len, ehdr); in elf_read_from_buffer() 306 elf_info->buffer = buf; in elf_read_from_buffer() 309 ret = elf_read_phdrs(buf, len, elf_info); in elf_read_from_buffer() 333 ret = elf_read_from_buffer(buf, len, ehdr, elf_info); in kexec_build_elf_info() 365 int kexec_elf_probe(const char *buf, unsigned long len) in kexec_elf_probe() argument [all …]
|
| A D | panic.c | 215 static int __init setup_panic_sys_info(char *buf) in setup_panic_sys_info() argument 218 panic_print = sys_info_parse_param(buf); in setup_panic_sys_info() 368 static char buf[1024]; in vpanic() local 419 len = vscnprintf(buf, sizeof(buf), fmt, args); in vpanic() 421 if (len && buf[len - 1] == '\n') in vpanic() 422 buf[len - 1] = '\0'; in vpanic() 424 pr_emerg("Kernel panic - not syncing: %s\n", buf); in vpanic() 438 kgdb_panic(buf); in vpanic() 463 kmsg_dump_desc(KMSG_DUMP_PANIC, buf); in vpanic() 637 static char buf[sizeof(taint_flags)]; in _print_tainted() local [all …]
|
| A D | watch_queue.c | 58 struct pipe_buffer *buf) in watch_queue_pipe_buf_release() argument 68 bit = buf->offset + buf->len; in watch_queue_pipe_buf_release() 73 page = buf->page; in watch_queue_pipe_buf_release() 102 struct pipe_buffer *buf; in post_one_notification() local 126 buf = pipe_buf(pipe, head); in post_one_notification() 127 buf->page = page; in post_one_notification() 130 buf->offset = offset; in post_one_notification() 131 buf->len = len; in post_one_notification() 132 buf->flags = PIPE_BUF_FLAG_WHOLE; in post_one_notification() 149 buf = pipe_buf(pipe, head - 1); in post_one_notification() [all …]
|
| /kernel/power/ |
| A D | main.c | 125 char *buf) in pm_async_show() argument 149 char *buf) in mem_sleep_show() argument 267 char *buf) in pm_test_show() argument 615 char *buf) in pm_wakeup_irq_show() argument 682 char *buf) in state_show() argument 795 char *buf) in wakeup_count_show() argument 837 char *buf) in autosleep_show() argument 864 && strcmp(buf, "off") && strcmp(buf, "off\n")) in autosleep_store() 880 char *buf) in wake_lock_show() argument 897 char *buf) in wake_unlock_show() argument [all …]
|
| A D | hibernate.c | 1180 char *buf) in disk_show() argument 1213 buf[count - 1] = '\n'; in disk_show() 1219 const char *buf, size_t n) in disk_store() argument 1231 p = memchr(buf, '\n', n); in disk_store() 1232 len = p ? p - buf : n; in disk_store() 1271 char *buf) in resume_show() argument 1278 const char *buf, size_t n) in resume_store() argument 1289 if (len && buf[len-1] == '\n') in resume_store() 1343 rc = kstrtoull(buf, 0, &offset); in resume_offset_store() 1354 char *buf) in image_size_show() argument [all …]
|
| A D | wakelock.c | 38 ssize_t pm_show_wakelocks(char *buf, bool show_active) in pm_show_wakelocks() argument 49 len += sysfs_emit_at(buf, len, "%s ", wl->name); in pm_show_wakelocks() 55 len += sysfs_emit_at(buf, len, "\n"); in pm_show_wakelocks() 206 int pm_wake_lock(const char *buf) in pm_wake_lock() argument 208 const char *str = buf; in pm_wake_lock() 220 len = str - buf; in pm_wake_lock() 233 wl = wakelock_lookup_add(buf, len, true); in pm_wake_lock() 254 int pm_wake_unlock(const char *buf) in pm_wake_unlock() argument 263 len = strlen(buf); in pm_wake_unlock() 267 if (buf[len-1] == '\n') in pm_wake_unlock() [all …]
|
| /kernel/trace/ |
| A D | trace_boot.c | 29 char buf[MAX_BUF_LEN]; in trace_boot_set_instance_options() local 34 if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0) { in trace_boot_set_instance_options() 86 char buf[MAX_BUF_LEN]; in trace_boot_enable_events() local 90 if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0) { in trace_boot_enable_events() 106 char buf[MAX_BUF_LEN]; in trace_boot_add_kprobe_event() local 143 char buf[MAX_BUF_LEN]; in trace_boot_add_synth_event() local 410 if (buf == end) { in trace_boot_compose_hist_cmd() 467 char buf[MAX_BUF_LEN]; in trace_boot_init_one_event() local 489 if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0) in trace_boot_init_one_event() 497 if (strscpy(buf, p, ARRAY_SIZE(buf)) < 0) in trace_boot_init_one_event() [all …]
|
| A D | trace_probe_tmpl.h | 11 *(u8 *)buf = (u8)val; in fetch_store_raw() 14 *(u16 *)buf = (u16)val; in fetch_store_raw() 17 *(u32 *)buf = (u32)val; in fetch_store_raw() 21 *(u64 *)buf = (u64)val; in fetch_store_raw() 24 *(unsigned long *)buf = val; in fetch_store_raw() 33 *(u8 *)buf <<= code->lshift; in fetch_apply_bitfield() 34 *(u8 *)buf >>= code->rshift; in fetch_apply_bitfield() 37 *(u16 *)buf <<= code->lshift; in fetch_apply_bitfield() 38 *(u16 *)buf >>= code->rshift; in fetch_apply_bitfield() 41 *(u32 *)buf <<= code->lshift; in fetch_apply_bitfield() [all …]
|
| A D | kprobe_event_gen_test.c | 88 char *buf; in test_gen_kprobe_cmd() local 92 buf = kzalloc(MAX_DYNEVENT_CMD_LEN, GFP_KERNEL); in test_gen_kprobe_cmd() 93 if (!buf) in test_gen_kprobe_cmd() 97 kprobe_event_cmd_init(&cmd, buf, MAX_DYNEVENT_CMD_LEN); in test_gen_kprobe_cmd() 143 kfree(buf); in test_gen_kprobe_cmd() 159 char *buf; in test_gen_kretprobe_cmd() local 163 buf = kzalloc(MAX_DYNEVENT_CMD_LEN, GFP_KERNEL); in test_gen_kretprobe_cmd() 164 if (!buf) in test_gen_kretprobe_cmd() 168 kprobe_event_cmd_init(&cmd, buf, MAX_DYNEVENT_CMD_LEN); in test_gen_kretprobe_cmd() 208 kfree(buf); in test_gen_kretprobe_cmd()
|
| A D | synth_event_gen_test.c | 49 char *buf; in test_gen_synth_cmd() local 53 buf = kzalloc(MAX_DYNEVENT_CMD_LEN, GFP_KERNEL); in test_gen_synth_cmd() 54 if (!buf) in test_gen_synth_cmd() 58 synth_event_cmd_init(&cmd, buf, MAX_DYNEVENT_CMD_LEN); in test_gen_synth_cmd() 124 kfree(buf); in test_gen_synth_cmd() 140 char *buf; in test_empty_synth_event() local 144 buf = kzalloc(MAX_DYNEVENT_CMD_LEN, GFP_KERNEL); in test_empty_synth_event() 145 if (!buf) in test_empty_synth_event() 149 synth_event_cmd_init(&cmd, buf, MAX_DYNEVENT_CMD_LEN); in test_empty_synth_event() 229 kfree(buf); in test_empty_synth_event()
|
| A D | trace.c | 2423 buf->time_start = buffer_ftrace_now(buf, buf->cpu); in tracing_reset_online_cpus() 2442 buf->time_start = buffer_ftrace_now(buf, buf->cpu); in tracing_reset_all_cpus() 5340 if (buf) in apply_trace_boot_options() 6398 r = snprintf(buf, sizeof(buf), "%ld\n", in tracing_nsecs_read() 7880 len = snprintf(buf, sizeof(buf), "%llu\n", val); in trace_min_max_read() 8714 char *buf; in tracing_read_dyn_info() local 8721 if (!buf) in tracing_read_dyn_info() 8735 kfree(buf); in tracing_read_dyn_info() 9011 char *buf; in trace_options_read() local 9118 char *buf; in trace_options_core_read() local [all …]
|
| A D | blktrace.c | 154 char *buf; in __blk_trace_note_message() local 419 char buf[16]; in blk_dropped_read() local 421 snprintf(buf, sizeof(buf), "%zu\n", dropped); in blk_dropped_read() 423 return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); in blk_dropped_read() 1621 char *buf); 1679 if (buf == NULL) in blk_trace_str2mask() 1681 s = strstrip(buf); in blk_trace_str2mask() 1702 kfree(buf); in blk_trace_str2mask() 1710 char *p = buf; in blk_trace_mask2str() 1720 return p - buf; in blk_trace_mask2str() [all …]
|
| /kernel/module/ |
| A D | stats.c | 278 char *buf; in read_file_mod_stats() local 301 buf = kzalloc(size, GFP_KERNEL); in read_file_mod_stats() 302 if (buf == NULL) in read_file_mod_stats() 306 len = scnprintf(buf, size, "%25s\t%u\n", "Mods ever loaded", live_mod_count); in read_file_mod_stats() 331 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Average mod size", in read_file_mod_stats() 349 len += scnprintf(buf + len, size - len, "%25s\t%lu\n", "Avg fail kread bytes", in read_file_mod_stats() 379 len += scnprintf(buf + len, size - len, "Duplicate failed modules:\n"); in read_file_mod_stats() 380 len += scnprintf(buf + len, size - len, "%25s\t%15s\t%25s\n", in read_file_mod_stats() 388 len += scnprintf(buf + len, size - len, "%25s\t%15lu\t%25s\n", mod_fail->name, in read_file_mod_stats() 394 ret = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_mod_stats() [all …]
|
| A D | decompress.c | 71 if (buf[3] & 0x08) { in module_gzip_header_len() 79 } while (buf[len++] != '\0'); in module_gzip_header_len() 86 const void *buf, size_t size) in module_gzip_decompress() argument 94 gzip_hdr_len = module_gzip_header_len(buf, size); in module_gzip_decompress() 100 s.next_in = buf + gzip_hdr_len; in module_gzip_decompress() 150 const void *buf, size_t size) in module_xz_decompress() argument 160 memcmp(buf, signature, sizeof(signature))) { in module_xz_decompress() 170 xz_buf.in = buf; in module_xz_decompress() 208 const void *buf, size_t size) in module_zstd_decompress() argument 227 zstd_buf.src = buf; in module_zstd_decompress() [all …]
|
| A D | tracking.c | 50 char buf[MODULE_FLAGS_BUF_SIZE]; in print_unloaded_tainted_modules() local 58 l = module_flags_taint(mod_taint->taints, buf); in print_unloaded_tainted_modules() 59 buf[l++] = '\0'; in print_unloaded_tainted_modules() 60 pr_cont(" %s(%s):%llu", mod_taint->name, buf, in print_unloaded_tainted_modules() 88 char buf[MODULE_FLAGS_BUF_SIZE]; in unloaded_tainted_modules_seq_show() local 92 l = module_flags_taint(mod_taint->taints, buf); in unloaded_tainted_modules_seq_show() 93 buf[l++] = '\0'; in unloaded_tainted_modules_seq_show() 95 seq_printf(m, "%s (%s) %llu", mod_taint->name, buf, mod_taint->count); in unloaded_tainted_modules_seq_show()
|
| /kernel/bpf/ |
| A D | stream.c | 35 char buf[]; member 131 return (struct bpf_stream_elem *)&stream_page->buf[consumed]; in bpf_stream_page_push_elem() 162 const int max_len = ARRAY_SIZE((struct bpf_bprintf_buffers){}.buf); in bpf_stream_elem_alloc() 322 ret = copy_to_user(buf + pos, elem->str + cons_len, in bpf_stream_read() 349 return bpf_stream_read(stream, buf, len); in bpf_prog_stream_read() 383 ret = bstr_printf(data.buf, MAX_BPRINTF_BUF, fmt__str, data.bin_args); in bpf_stream_vprintk() 385 ret = bpf_stream_push_str(stream, data.buf, ret); in bpf_stream_vprintk() 436 struct bpf_bprintf_buffers *buf; in bpf_stream_stage_printk() local 440 if (bpf_try_get_buffers(&buf)) in bpf_stream_stage_printk() 444 ret = vsnprintf(buf->buf, ARRAY_SIZE(buf->buf), fmt, args); in bpf_stream_stage_printk() [all …]
|
| A D | stackmap.c | 407 void *buf, u32 size, u64 flags, bool may_fault) in __bpf_get_stack() argument 469 struct bpf_stack_build_id *id_offs = buf; in __bpf_get_stack() 475 memcpy(buf, ips, copy_len); in __bpf_get_stack() 483 stack_map_get_build_id_offset(buf, trace_nr, user, may_fault); in __bpf_get_stack() 486 memset(buf + copy_len, 0, size - copy_len); in __bpf_get_stack() 492 memset(buf, 0, size); in __bpf_get_stack() 496 BPF_CALL_4(bpf_get_stack, struct pt_regs *, regs, void *, buf, u32, size, in BPF_CALL_4() argument 539 res = __bpf_get_stack(regs, task, NULL, buf, size, flags, may_fault); in __bpf_get_task_stack() 545 BPF_CALL_4(bpf_get_task_stack, struct task_struct *, task, void *, buf, in BPF_CALL_4() argument 580 void *, buf, u32, size, u64, flags) in BPF_CALL_4() argument [all …]
|
| /kernel/kcsan/ |
| A D | report.c | 201 char buf[64]; in skip_report() local 202 int len = scnprintf(buf, sizeof(buf), "%ps", (void *)top_frame); in skip_report() 204 if (!strnstr(buf, "rcu_", len) && in skip_report() 205 !strnstr(buf, "_rcu", len) && in skip_report() 206 !strnstr(buf, "_srcu", len)) in skip_report() 270 snprintf(buf, sizeof(buf), "task %i", task_id); in get_thread_desc() 271 return buf; in get_thread_desc() 279 char buf[64]; in get_stack_skipnr() local 284 len = scnprintf(buf, sizeof(buf), "%ps", (void *)stack_entries[skip]); in get_stack_skipnr() 287 if (strnstr(buf, "tsan_", len) || in get_stack_skipnr() [all …]
|
| /kernel/printk/ |
| A D | printk.c | 688 char *p = buf, *e = buf + size; in msg_add_ext_text() 702 return p - buf; in msg_add_ext_text() 785 if (buf == NULL) in devkmsg_write() 788 buf[len] = '\0'; in devkmsg_write() 790 kfree(buf); in devkmsg_write() 803 line = buf; in devkmsg_write() 819 kfree(buf); in devkmsg_write() 1695 buf += n; in syslog_print() 2504 char buf[512]; in early_printk() local 2511 n = vscnprintf(buf, sizeof(buf), fmt, ap); in early_printk() [all …]
|
| /kernel/sched/ |
| A D | debug.c | 130 char buf[64]; in sched_feat_write() local 141 buf[cnt] = 0; in sched_feat_write() 175 char buf[16]; in sched_scaling_write() local 223 char buf[16]; in sched_dynamic_write() local 232 buf[cnt] = 0; in sched_dynamic_write() 483 char buf[32]; in debugfs_fair_server_init() local 485 snprintf(buf, sizeof(buf), "cpu%lu", cpu); in debugfs_fair_server_init() 621 snprintf(buf, sizeof(buf), "cpu%d", cpu); in update_sched_domain_debugfs() 629 snprintf(buf, sizeof(buf), "domain%d", i); in update_sched_domain_debugfs() 720 char *bufend = buf + sizeof(buf) - 3; \ [all …]
|
| /kernel/locking/ |
| A D | qspinlock_stat.h | 39 char buf[64]; in lockevent_read() local 80 len = snprintf(buf, sizeof(buf) - 1, "%llu.%02llu\n", in lockevent_read() 91 len = snprintf(buf, sizeof(buf) - 1, "%llu\n", sum); in lockevent_read() 94 return simple_read_from_buffer(user_buf, count, ppos, buf, len); in lockevent_read()
|