Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 21 of 21) sorted by relevance

/mm/
Dslub.c673 char buf[100]; in slab_err() local
676 vsnprintf(buf, sizeof(buf), fmt, args); in slab_err()
678 slab_bug(s, "%s", buf); in slab_err()
4084 static int list_locations(struct kmem_cache *s, char *buf, in list_locations() argument
4098 return sprintf(buf, "Out of memory\n"); in list_locations()
4123 len += sprintf(buf + len, "%7ld ", l->count); in list_locations()
4126 len += sprintf(buf + len, "%pS", (void *)l->addr); in list_locations()
4128 len += sprintf(buf + len, "<not-available>"); in list_locations()
4131 len += sprintf(buf + len, " age=%ld/%ld/%ld", in list_locations()
4136 len += sprintf(buf + len, " age=%ld", in list_locations()
[all …]
Diov_iter.c11 char __user *buf; in copy_to_iter_iovec() local
22 buf = iov->iov_base + skip; in copy_to_iter_iovec()
25 left = __copy_to_user(buf, from, copy); in copy_to_iter_iovec()
32 buf = iov->iov_base; in copy_to_iter_iovec()
34 left = __copy_to_user(buf, from, copy); in copy_to_iter_iovec()
56 char __user *buf; in copy_from_iter_iovec() local
67 buf = iov->iov_base + skip; in copy_from_iter_iovec()
70 left = __copy_from_user(to, buf, copy); in copy_from_iter_iovec()
77 buf = iov->iov_base; in copy_from_iter_iovec()
79 left = __copy_from_user(to, buf, copy); in copy_from_iter_iovec()
[all …]
Dhugetlb_cgroup.c257 char *buf, size_t nbytes, loff_t off) in hugetlb_cgroup_write() argument
263 buf = strstrip(buf); in hugetlb_cgroup_write()
275 ret = res_counter_memparse_write_strategy(buf, &val); in hugetlb_cgroup_write()
289 char *buf, size_t nbytes, loff_t off) in hugetlb_cgroup_reset() argument
311 static char *mem_fmt(char *buf, int size, unsigned long hsize) in mem_fmt() argument
314 snprintf(buf, size, "%luGB", hsize >> 30); in mem_fmt()
316 snprintf(buf, size, "%luMB", hsize >> 20); in mem_fmt()
318 snprintf(buf, size, "%luKB", hsize >> 10); in mem_fmt()
319 return buf; in mem_fmt()
324 char buf[32]; in __hugetlb_cgroup_file_init() local
[all …]
Dutil.c27 char *buf; in kstrdup() local
33 buf = kmalloc_track_caller(len, gfp); in kstrdup()
34 if (buf) in kstrdup()
35 memcpy(buf, s, len); in kstrdup()
36 return buf; in kstrdup()
49 char *buf; in kstrndup() local
55 buf = kmalloc_track_caller(len+1, gfp); in kstrndup()
56 if (buf) { in kstrndup()
57 memcpy(buf, s, len); in kstrndup()
58 buf[len] = '\0'; in kstrndup()
[all …]
Dhuge_memory.c251 struct kobj_attribute *attr, char *buf, in double_flag_show() argument
257 return sprintf(buf, "[always] madvise never\n"); in double_flag_show()
259 return sprintf(buf, "always [madvise] never\n"); in double_flag_show()
261 return sprintf(buf, "always madvise [never]\n"); in double_flag_show()
265 const char *buf, size_t count, in double_flag_store() argument
269 if (!memcmp("always", buf, in double_flag_store()
273 } else if (!memcmp("madvise", buf, in double_flag_store()
277 } else if (!memcmp("never", buf, in double_flag_store()
288 struct kobj_attribute *attr, char *buf) in enabled_show() argument
290 return double_flag_show(kobj, attr, buf, in enabled_show()
[all …]
Dfilemap_xip.c55 char __user *buf, in do_xip_mapping_read() argument
123 left = __copy_to_user(buf+copied, xip_mem+offset, nr); in do_xip_mapping_read()
125 left = __clear_user(buf + copied, nr); in do_xip_mapping_read()
147 xip_file_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos) in xip_file_read() argument
149 if (!access_ok(VERIFY_WRITE, buf, len)) in xip_file_read()
153 buf, len, ppos); in xip_file_read()
324 __xip_file_write(struct file *filp, const char __user *buf, in __xip_file_write() argument
366 __copy_from_user_nocache(xip_mem + offset, buf, bytes); in __xip_file_write()
375 buf += status; in __xip_file_write()
398 xip_file_write(struct file *filp, const char __user *buf, size_t len, in xip_file_write() argument
[all …]
Dksm.c2086 struct kobj_attribute *attr, char *buf) in sleep_millisecs_show() argument
2088 return sprintf(buf, "%u\n", ksm_thread_sleep_millisecs); in sleep_millisecs_show()
2093 const char *buf, size_t count) in sleep_millisecs_store() argument
2098 err = kstrtoul(buf, 10, &msecs); in sleep_millisecs_store()
2109 struct kobj_attribute *attr, char *buf) in pages_to_scan_show() argument
2111 return sprintf(buf, "%u\n", ksm_thread_pages_to_scan); in pages_to_scan_show()
2116 const char *buf, size_t count) in pages_to_scan_store() argument
2121 err = kstrtoul(buf, 10, &nr_pages); in pages_to_scan_store()
2132 char *buf) in run_show() argument
2134 return sprintf(buf, "%lu\n", ksm_run); in run_show()
[all …]
Dkmemleak.c1656 char buf[64]; in kmemleak_write() local
1660 buf_size = min(size, (sizeof(buf) - 1)); in kmemleak_write()
1661 if (strncpy_from_user(buf, user_buf, buf_size) < 0) in kmemleak_write()
1663 buf[buf_size] = 0; in kmemleak_write()
1669 if (strncmp(buf, "clear", 5) == 0) { in kmemleak_write()
1682 if (strncmp(buf, "off", 3) == 0) in kmemleak_write()
1684 else if (strncmp(buf, "stack=on", 8) == 0) in kmemleak_write()
1686 else if (strncmp(buf, "stack=off", 9) == 0) in kmemleak_write()
1688 else if (strncmp(buf, "scan=on", 7) == 0) in kmemleak_write()
1690 else if (strncmp(buf, "scan=off", 8) == 0) in kmemleak_write()
[all …]
Dvmalloc.c1876 static int aligned_vread(char *buf, char *addr, unsigned long count) in aligned_vread() argument
1902 memcpy(buf, map + offset, length); in aligned_vread()
1905 memset(buf, 0, length); in aligned_vread()
1908 buf += length; in aligned_vread()
1915 static int aligned_vwrite(char *buf, char *addr, unsigned long count) in aligned_vwrite() argument
1941 memcpy(map + offset, buf, length); in aligned_vwrite()
1945 buf += length; in aligned_vwrite()
1978 long vread(char *buf, char *addr, unsigned long count) in vread() argument
1982 char *vaddr, *buf_start = buf; in vread()
2005 *buf = '\0'; in vread()
[all …]
Dhugetlb.c1559 static char * __init memfmt(char *buf, unsigned long n) in memfmt() argument
1562 sprintf(buf, "%lu GB", n >> 30); in memfmt()
1564 sprintf(buf, "%lu MB", n >> 20); in memfmt()
1566 sprintf(buf, "%lu KB", n >> 10); in memfmt()
1567 return buf; in memfmt()
1575 char buf[32]; in report_hugepages() local
1577 memfmt(buf, huge_page_size(h)), in report_hugepages()
1755 struct kobj_attribute *attr, char *buf) in nr_hugepages_show_common() argument
1767 return sprintf(buf, "%lu\n", nr_huge_pages); in nr_hugepages_show_common()
1813 struct kobject *kobj, const char *buf, in nr_hugepages_store_common() argument
[all …]
Dbacking-dev.c164 const char *buf, size_t count) in read_ahead_kb_store() argument
170 ret = kstrtoul(buf, 10, &read_ahead_kb); in read_ahead_kb_store()
194 struct device_attribute *attr, const char *buf, size_t count) in min_ratio_store() argument
200 ret = kstrtouint(buf, 10, &ratio); in min_ratio_store()
213 struct device_attribute *attr, const char *buf, size_t count) in max_ratio_store() argument
219 ret = kstrtouint(buf, 10, &ratio); in max_ratio_store()
Dnommu.c287 long vread(char *buf, char *addr, unsigned long count) in vread() argument
290 if ((unsigned long) buf + count < count) in vread()
291 count = -(unsigned long) buf; in vread()
293 memcpy(buf, addr, count); in vread()
297 long vwrite(char *buf, char *addr, unsigned long count) in vwrite() argument
303 memcpy(addr, buf, count); in vwrite()
2006 unsigned long addr, void *buf, int len, int write) in __access_remote_vm() argument
2022 (void *) addr, buf, len); in __access_remote_vm()
2025 buf, (void *) addr, len); in __access_remote_vm()
2048 void *buf, int len, int write) in access_remote_vm() argument
[all …]
Dzsmalloc.c1090 char *buf = area->vm_buf; in __zs_map_object() local
1104 memcpy(buf, addr + off, sizes[0]); in __zs_map_object()
1107 memcpy(buf + sizes[0], addr, sizes[1]); in __zs_map_object()
1118 char *buf; in __zs_unmap_object() local
1124 buf = area->vm_buf; in __zs_unmap_object()
1126 buf = buf + ZS_HANDLE_SIZE; in __zs_unmap_object()
1136 memcpy(addr + off, buf, sizes[0]); in __zs_unmap_object()
1139 memcpy(addr, buf + sizes[0], sizes[1]); in __zs_unmap_object()
Dmemory.c3514 void *buf, int len, int write) in generic_access_phys() argument
3526 memcpy_toio(maddr + offset, buf, len); in generic_access_phys()
3528 memcpy_fromio(buf, maddr + offset, len); in generic_access_phys()
3541 unsigned long addr, void *buf, int len, int write) in __access_remote_vm() argument
3544 void *old_buf = buf; in __access_remote_vm()
3567 ret = vma->vm_ops->access(vma, addr, buf, in __access_remote_vm()
3582 maddr + offset, buf, bytes); in __access_remote_vm()
3586 buf, maddr + offset, bytes); in __access_remote_vm()
3592 buf += bytes; in __access_remote_vm()
3597 return buf - old_buf; in __access_remote_vm()
[all …]
Dzswap.c648 char *buf; in zswap_frontswap_store() local
699 buf = (u8 *)(zhdr + 1); in zswap_frontswap_store()
700 memcpy(buf, dst, dlen); in zswap_frontswap_store()
Dmemcontrol.c3953 char *buf, size_t nbytes, in mem_cgroup_force_empty_write() argument
4187 char *buf, size_t nbytes, loff_t off) in mem_cgroup_write() argument
4195 buf = strstrip(buf); in mem_cgroup_write()
4206 ret = res_counter_memparse_write_strategy(buf, &val); in mem_cgroup_write()
4219 ret = res_counter_memparse_write_strategy(buf, &val); in mem_cgroup_write()
4263 static ssize_t mem_cgroup_reset(struct kernfs_open_file *of, char *buf, in mem_cgroup_reset() argument
5001 char *buf, size_t nbytes, loff_t off) in memcg_write_event_control() argument
5014 buf = strstrip(buf); in memcg_write_event_control()
5016 efd = simple_strtoul(buf, &endp, 10); in memcg_write_event_control()
5019 buf = endp + 1; in memcg_write_event_control()
[all …]
Ddmapool.c68 show_pools(struct device *dev, struct device_attribute *attr, char *buf) in show_pools() argument
76 next = buf; in show_pools()
Dshmem.c2184 static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf) in shmem_statfs() argument
2188 buf->f_type = TMPFS_MAGIC; in shmem_statfs()
2189 buf->f_bsize = PAGE_CACHE_SIZE; in shmem_statfs()
2190 buf->f_namelen = NAME_MAX; in shmem_statfs()
2192 buf->f_blocks = sbinfo->max_blocks; in shmem_statfs()
2193 buf->f_bavail = in shmem_statfs()
2194 buf->f_bfree = sbinfo->max_blocks - in shmem_statfs()
2198 buf->f_files = sbinfo->max_inodes; in shmem_statfs()
2199 buf->f_ffree = sbinfo->free_inodes; in shmem_statfs()
Dbootmem.c43 static int __init bootmem_debug_setup(char *buf) in bootmem_debug_setup() argument
Dcompaction.c1525 const char *buf, size_t count) in sysfs_compact_node() argument
Dpage_alloc.c443 static int __init debug_guardpage_minorder_setup(char *buf) in debug_guardpage_minorder_setup() argument
447 if (kstrtoul(buf, 10, &res) < 0 || res > MAX_ORDER / 2) { in debug_guardpage_minorder_setup()