Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 35) sorted by relevance

12

/kernel/
Dkfifo.c120 unsigned char *buffer, unsigned int len) in __kfifo_put() argument
124 len = min(len, fifo->size - fifo->in + fifo->out); in __kfifo_put()
134 l = min(len, fifo->size - (fifo->in & (fifo->size - 1))); in __kfifo_put()
138 memcpy(fifo->buffer, buffer + l, len - l); in __kfifo_put()
147 fifo->in += len; in __kfifo_put()
149 return len; in __kfifo_put()
166 unsigned char *buffer, unsigned int len) in __kfifo_get() argument
170 len = min(len, fifo->in - fifo->out); in __kfifo_get()
180 l = min(len, fifo->size - (fifo->out & (fifo->size - 1))); in __kfifo_get()
184 memcpy(buffer + l, fifo->buffer, len - l); in __kfifo_get()
[all …]
Dsysctl.c2101 size_t len; in _proc_do_string() local
2111 len = 0; in _proc_do_string()
2113 while (len < *lenp) { in _proc_do_string()
2118 len++; in _proc_do_string()
2120 if (len >= maxlen) in _proc_do_string()
2121 len = maxlen-1; in _proc_do_string()
2122 if(copy_from_user(data, buffer, len)) in _proc_do_string()
2124 ((char *) data)[len] = 0; in _proc_do_string()
2127 len = strlen(data); in _proc_do_string()
2128 if (len > maxlen) in _proc_do_string()
[all …]
Daudit.c276 u32 len; in audit_log_config_change() local
278 rc = security_secid_to_secctx(sid, &ctx, &len); in audit_log_config_change()
284 security_release_secctx(ctx, len); in audit_log_config_change()
518 int len = NLMSG_SPACE(size); in audit_make_reply() local
523 skb = alloc_skb(len, GFP_KERNEL); in audit_make_reply()
635 u32 len; in audit_log_common_recv_msg() local
646 rc = security_secid_to_secctx(sid, &ctx, &len); in audit_log_common_recv_msg()
651 security_release_secctx(ctx, len); in audit_log_common_recv_msg()
670 u32 len; in audit_receive_msg() local
862 err = security_secid_to_secctx(audit_sig_sid, &ctx, &len); in audit_receive_msg()
[all …]
Dprintk.c257 int log_buf_copy(char *dest, int idx, int len) in log_buf_copy() argument
271 if (len > max - idx) in log_buf_copy()
272 len = max - idx; in log_buf_copy()
273 ret = len; in log_buf_copy()
275 while (len-- > 0) in log_buf_copy()
276 dest[len] = LOG_BUF(idx + len); in log_buf_copy()
300 int do_syslog(int type, char __user *buf, int len) in do_syslog() argument
318 if (!buf || len < 0) in do_syslog()
321 if (!len) in do_syslog()
323 if (!access_ok(VERIFY_WRITE, buf, len)) { in do_syslog()
[all …]
Dkallsyms.c82 int len, skipped_first = 0; in kallsyms_expand_symbol() local
87 len = *data; in kallsyms_expand_symbol()
92 off += len + 1; in kallsyms_expand_symbol()
96 while(len) { in kallsyms_expand_symbol()
99 len--; in kallsyms_expand_symbol()
307 int len; in sprint_symbol() local
315 len = strlen(buffer); in sprint_symbol()
316 buffer += len; in sprint_symbol()
319 len += sprintf(buffer, "+%#lx/%#lx [%s]", in sprint_symbol()
322 len += sprintf(buffer, "+%#lx/%#lx", offset, size); in sprint_symbol()
[all …]
Dptrace.c266 int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len) in ptrace_readdata() argument
270 while (len > 0) { in ptrace_readdata()
274 this_len = (len > sizeof(buf)) ? sizeof(buf) : len; in ptrace_readdata()
286 len -= retval; in ptrace_readdata()
291 int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len) in ptrace_writedata() argument
295 while (len > 0) { in ptrace_writedata()
299 this_len = (len > sizeof(buf)) ? sizeof(buf) : len; in ptrace_writedata()
311 len -= retval; in ptrace_writedata()
Dauditsc.c922 unsigned len; in audit_log_task_context() local
930 error = security_secid_to_secctx(sid, &ctx, &len); in audit_log_task_context()
938 security_release_secctx(ctx, len); in audit_log_task_context()
983 u32 len; in audit_log_pid_context() local
992 if (security_secid_to_secctx(sid, &ctx, &len)) { in audit_log_pid_context()
997 security_release_secctx(ctx, len); in audit_log_pid_context()
1028 size_t len, len_left, to_send; in audit_log_single_execve_arg() local
1034 len_left = len = strnlen_user(p, MAX_ARG_STRLEN) - 1; in audit_log_single_execve_arg()
1042 if (unlikely((len == -1) || len > MAX_ARG_STRLEN - 1)) { in audit_log_single_execve_arg()
1079 len_left = len; in audit_log_single_execve_arg()
[all …]
Dsys.c1189 unsigned int len = cp_count * sizeof(*grouplist); in groups_to_user() local
1191 if (copy_to_user(grouplist, group_info->blocks[i], len)) in groups_to_user()
1209 unsigned int len = cp_count * sizeof(*grouplist); in groups_from_user() local
1211 if (copy_from_user(group_info->blocks[i], grouplist, len)) in groups_from_user()
1418 SYSCALL_DEFINE2(sethostname, char __user *, name, int, len) in SYSCALL_DEFINE2() argument
1425 if (len < 0 || len > __NEW_UTS_LEN) in SYSCALL_DEFINE2()
1429 if (!copy_from_user(tmp, name, len)) { in SYSCALL_DEFINE2()
1432 memcpy(u->nodename, tmp, len); in SYSCALL_DEFINE2()
1433 memset(u->nodename + len, 0, sizeof(u->nodename) - len); in SYSCALL_DEFINE2()
1442 SYSCALL_DEFINE2(gethostname, char __user *, name, int, len) in SYSCALL_DEFINE2() argument
[all …]
Dparams.c294 int len; in param_array() local
301 len = strcspn(val, ","); in param_array()
304 save = val[len]; in param_array()
305 ((char *)val)[len] = '\0'; in param_array()
311 val += len+1; in param_array()
417 const char *buf, size_t len) in param_attr_store() argument
427 return len; in param_attr_store()
675 const char *buf, size_t len) in module_attr_store() argument
687 ret = attribute->store(attribute, mk->mod, buf, len); in module_attr_store()
Drelay.c1221 size_t len, in subbuf_splice_actor() argument
1251 if (len > (subbuf_size - read_start % subbuf_size)) in subbuf_splice_actor()
1252 len = subbuf_size - read_start % subbuf_size; in subbuf_splice_actor()
1263 if (!len) in subbuf_splice_actor()
1266 this_len = min_t(unsigned long, len, PAGE_SIZE - poff); in subbuf_splice_actor()
1277 spd.partial[spd.nr_pages].len = this_len; in subbuf_splice_actor()
1280 len -= this_len; in subbuf_splice_actor()
1307 size_t len, in relay_file_splice_read() argument
1317 while (len && !spliced) { in relay_file_splice_read()
1318 ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret); in relay_file_splice_read()
[all …]
Dconfigs.c59 size_t len, loff_t * offset) in ikconfig_read_current() argument
61 return simple_read_from_buffer(buf, len, offset, in ikconfig_read_current()
Dauditfilter.c225 char *audit_unpack_string(void **bufp, size_t *remain, size_t len) in audit_unpack_string() argument
229 if (!*bufp || (len == 0) || (len > *remain)) in audit_unpack_string()
235 if (len > PATH_MAX) in audit_unpack_string()
238 str = kmalloc(len + 1, GFP_KERNEL); in audit_unpack_string()
242 memcpy(str, *bufp, len); in audit_unpack_string()
243 str[len] = 0; in audit_unpack_string()
244 *bufp += len; in audit_unpack_string()
245 *remain -= len; in audit_unpack_string()
264 static int audit_to_watch(struct audit_krule *krule, char *path, int len, in audit_to_watch() argument
272 if (path[0] != '/' || path[len-1] == '/' || in audit_to_watch()
[all …]
Dtaskstats.c340 int len; in parse() local
345 len = nla_len(na); in parse()
346 if (len > TASKSTATS_CPUMASK_MAXLEN) in parse()
348 if (len < 1) in parse()
350 data = kmalloc(len, GFP_KERNEL); in parse()
353 nla_strlcpy(data, na, len); in parse()
Dprofile.c455 int len = cpumask_scnprintf(page, count, data); in prof_cpu_mask_read_proc() local
456 if (count - len < 2) in prof_cpu_mask_read_proc()
458 len += sprintf(page + len, "\n"); in prof_cpu_mask_read_proc()
459 return len; in prof_cpu_mask_read_proc()
Dcompat.c459 unsigned len, struct cpumask *new_mask) in compat_get_user_cpu_mask() argument
463 if (len < cpumask_size()) in compat_get_user_cpu_mask()
465 else if (len > cpumask_size()) in compat_get_user_cpu_mask()
466 len = cpumask_size(); in compat_get_user_cpu_mask()
469 return compat_get_bitmap(k, user_mask_ptr, len * 8); in compat_get_user_cpu_mask()
473 unsigned int len, in compat_sys_sched_setaffinity() argument
482 retval = compat_get_user_cpu_mask(user_mask_ptr, len, new_mask); in compat_sys_sched_setaffinity()
492 asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len, in compat_sys_sched_getaffinity() argument
503 if (len < min_length) in compat_sys_sched_getaffinity()
Dfutex_compat.c119 compat_size_t len) in compat_sys_set_robust_list() argument
124 if (unlikely(len != sizeof(*head))) in compat_sys_set_robust_list()
Dkgdb.c770 static void kgdb_msg_write(const char *s, int len) in kgdb_msg_write() argument
780 while (len > 0) { in kgdb_msg_write()
784 if ((len << 1) > (BUFMAX - 2)) in kgdb_msg_write()
787 wcount = len; in kgdb_msg_write()
796 len -= wcount; in kgdb_msg_write()
Dmodule.c1862 unsigned long len, in load_module() argument
1882 umod, len, uargs); in load_module()
1883 if (len < sizeof(*hdr)) in load_module()
1888 if (len > 64 * 1024 * 1024 || (hdr = vmalloc(len)) == NULL) in load_module()
1897 if (copy_from_user(hdr, umod, len) != 0) { in load_module()
1912 if (len < hdr->e_shoff + hdr->e_shnum * sizeof(Elf_Shdr)) in load_module()
1922 && len < sechdrs[i].sh_offset + sechdrs[i].sh_size) in load_module()
2310 printk(KERN_ERR "Module len %lu truncated\n", len); in load_module()
2317 unsigned long, len, const char __user *, uargs) in SYSCALL_DEFINE3() argument
2331 mod = load_module(umod, len, uargs); in SYSCALL_DEFINE3()
/kernel/trace/
Dtrace.c346 int len = (PAGE_SIZE - 1) - s->len; in trace_seq_printf() local
350 if (!len) in trace_seq_printf()
354 ret = vsnprintf(s->buffer + s->len, len, fmt, ap); in trace_seq_printf()
358 if (ret >= len) in trace_seq_printf()
361 s->len += ret; in trace_seq_printf()
363 return len; in trace_seq_printf()
379 int len = strlen(str); in trace_seq_puts() local
381 if (len > ((PAGE_SIZE - 1) - s->len)) in trace_seq_puts()
384 memcpy(s->buffer + s->len, str, len); in trace_seq_puts()
385 s->len += len; in trace_seq_puts()
[all …]
Dtrace_functions_graph.c117 int len; in print_graph_proc() local
128 len = strlen(comm) + strlen(pid_str) + 1; in print_graph_proc()
130 if (len < TRACE_GRAPH_PROCINFO_LENGTH) in print_graph_proc()
131 spaces = TRACE_GRAPH_PROCINFO_LENGTH - len; in print_graph_proc()
285 int ret, len; in print_graph_duration() local
295 len = strlen(msecs_str); in print_graph_duration()
298 if (len < 7) { in print_graph_duration()
299 snprintf(nsecs_str, 8 - len, "%03lu", nsecs_rem); in print_graph_duration()
303 len += strlen(nsecs_str); in print_graph_duration()
311 for (i = len; i < 7; i++) { in print_graph_duration()
Dftrace.c1042 ftrace_match(unsigned char *buff, int len, int enable) in ftrace_match() argument
1056 len--; in ftrace_match()
1059 for (i = 0; i < len; i++) { in ftrace_match()
1064 search_len = len - (i + 1); in ftrace_match()
1220 ftrace_set_regex(unsigned char *buf, int len, int reset, int enable) in ftrace_set_regex() argument
1229 ftrace_match(buf, len, enable); in ftrace_set_regex()
1242 void ftrace_set_filter(unsigned char *buf, int len, int reset) in ftrace_set_filter() argument
1244 ftrace_set_regex(buf, len, reset, 1); in ftrace_set_filter()
1257 void ftrace_set_notrace(unsigned char *buf, int len, int reset) in ftrace_set_notrace() argument
1259 ftrace_set_regex(buf, len, reset, 0); in ftrace_set_notrace()
/kernel/power/
Dwakelock.c86 static int print_lock_stat(char *buf, int len, struct wake_lock *lock) in print_lock_stat() argument
115 n = snprintf(buf, len, in print_lock_stat()
123 return n > len ? len : n; in print_lock_stat()
132 int len = 0; in wakelocks_read_proc() local
137 len += snprintf(page + len, count - len, in wakelocks_read_proc()
141 len += print_lock_stat(page + len, count - len, lock); in wakelocks_read_proc()
145 len += print_lock_stat(page + len, count - len, lock); in wakelocks_read_proc()
149 if (len == count) in wakelocks_read_proc()
150 memcpy(page + len - strlen(TOO_MAY_LOCKS_WARNING), in wakelocks_read_proc()
156 return len; in wakelocks_read_proc()
Dmain.c96 int len; in pm_test_store() local
100 len = p ? p - buf : n; in pm_test_store()
106 if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) { in pm_test_store()
523 int len; in state_store() local
527 len = p ? p - buf : n; in state_store()
530 if (len == 4 && !strncmp(buf, "disk", len)) { in state_store()
537 if (*s && len == strlen(*s) && !strncmp(buf, *s, len)) in state_store()
Ddisk.c779 int len; in disk_store() local
784 len = p ? p - buf : n; in disk_store()
788 if (len == strlen(hibernation_modes[i]) in disk_store()
789 && !strncmp(buf, hibernation_modes[i], len)) { in disk_store()
/kernel/time/
Dclocksource.c410 int len; in sysfs_override_clocksource() local
426 len = strlen(override_name); in sysfs_override_clocksource()
427 if (len) { in sysfs_override_clocksource()
433 if (strlen(cs->name) == len && in sysfs_override_clocksource()

12