/mm/ |
D | util.c | 26 size_t len; in kstrdup() local 32 len = strlen(s) + 1; in kstrdup() 33 buf = kmalloc_track_caller(len, gfp); in kstrdup() 35 memcpy(buf, s, len); in kstrdup() 48 size_t len; in kstrndup() local 54 len = strnlen(s, max); in kstrndup() 55 buf = kmalloc_track_caller(len+1, gfp); in kstrndup() 57 memcpy(buf, s, len); in kstrndup() 58 buf[len] = '\0'; in kstrndup() 71 void *kmemdup(const void *src, size_t len, gfp_t gfp) in kmemdup() argument [all …]
|
D | nommu.c | 883 unsigned long len) in find_vma_exact() argument 886 unsigned long end = addr + len; in find_vma_exact() 915 unsigned long len, in validate_mmap_request() argument 936 if (!len) in validate_mmap_request() 940 rlen = PAGE_ALIGN(len); in validate_mmap_request() 1149 unsigned long len, in do_mmap_private() argument 1182 order = get_order(len); in do_mmap_private() 1183 kdebug("alloc order %d for %lx", order, len); in do_mmap_private() 1192 point = len >> PAGE_SHIFT; in do_mmap_private() 1214 region->vm_end = region->vm_start + len; in do_mmap_private() [all …]
|
D | mmap.c | 53 #define arch_mmap_check(addr, len, flags) (0) argument 57 #define arch_rebalance_pgtables(addr, len) (addr) argument 298 static unsigned long do_brk(unsigned long addr, unsigned long len); 1276 unsigned long len) in mlock_future_check() argument 1282 locked = len >> PAGE_SHIFT; in mlock_future_check() 1297 unsigned long len, unsigned long prot, in do_mmap_pgoff() argument 1316 if (!len) in do_mmap_pgoff() 1323 len = PAGE_ALIGN(len); in do_mmap_pgoff() 1324 if (!len) in do_mmap_pgoff() 1328 if ((pgoff + (len >> PAGE_SHIFT)) < pgoff) in do_mmap_pgoff() [all …]
|
D | iov_iter.c | 452 size_t len; in get_pages_iovec() local 457 len = iov->iov_len - offset; in get_pages_iovec() 458 if (len > i->count) in get_pages_iovec() 459 len = i->count; in get_pages_iovec() 460 if (len > maxsize) in get_pages_iovec() 461 len = maxsize; in get_pages_iovec() 463 len += *start = addr & (PAGE_SIZE - 1); in get_pages_iovec() 464 if (len > maxpages * PAGE_SIZE) in get_pages_iovec() 465 len = maxpages * PAGE_SIZE; in get_pages_iovec() 467 n = (len + PAGE_SIZE - 1) / PAGE_SIZE; in get_pages_iovec() [all …]
|
D | mlock.c | 614 static int do_mlock(unsigned long start, size_t len, int on) in do_mlock() argument 621 VM_BUG_ON(len != PAGE_ALIGN(len)); in do_mlock() 622 end = start + len; in do_mlock() 672 int __mm_populate(unsigned long start, unsigned long len, int ignore_errors) in __mm_populate() argument 681 VM_BUG_ON(len != PAGE_ALIGN(len)); in __mm_populate() 682 end = start + len; in __mm_populate() 728 SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len) in SYSCALL_DEFINE2() argument 739 len = PAGE_ALIGN(len + (start & ~PAGE_MASK)); in SYSCALL_DEFINE2() 744 locked = len >> PAGE_SHIFT; in SYSCALL_DEFINE2() 752 error = do_mlock(start, len, 1); in SYSCALL_DEFINE2() [all …]
|
D | process_vm_access.c | 35 size_t len, in process_vm_rw_pages() argument 40 while (len && iov_iter_count(iter)) { in process_vm_rw_pages() 45 if (copy > len) in process_vm_rw_pages() 46 copy = len; in process_vm_rw_pages() 54 len -= copied; in process_vm_rw_pages() 78 unsigned long len, in process_vm_rw_single_vec() argument 93 if (len == 0) in process_vm_rw_single_vec() 95 nr_pages = (addr + len - 1) / PAGE_SIZE - addr / PAGE_SIZE + 1; in process_vm_rw_single_vec() 111 if (bytes > len) in process_vm_rw_single_vec() 112 bytes = len; in process_vm_rw_single_vec() [all …]
|
D | fadvise.c | 28 SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice) in SYSCALL_DEFINE4() argument 48 if (!mapping || len < 0) { in SYSCALL_DEFINE4() 70 endbyte = offset + len; in SYSCALL_DEFINE4() 71 if (!len || endbyte < len) in SYSCALL_DEFINE4() 151 SYSCALL_DEFINE4(fadvise64, int, fd, loff_t, offset, size_t, len, int, advice) in SYSCALL_DEFINE4() argument 153 return sys_fadvise64_64(fd, offset, len, advice); in SYSCALL_DEFINE4()
|
D | filemap_xip.c | 56 size_t len, in do_xip_mapping_read() argument 93 if (nr > len - copied) in do_xip_mapping_read() 94 nr = len - copied; in do_xip_mapping_read() 136 } while (copied < len); 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() 398 xip_file_write(struct file *filp, const char __user *buf, size_t len, in xip_file_write() argument 409 if (!access_ok(VERIFY_READ, buf, len)) { in xip_file_write() 415 count = len; in xip_file_write()
|
D | usercopy.c | 39 static noinline int check_stack_object(const void *obj, unsigned long len) in check_stack_object() argument 46 if (obj + len <= stack || stackend <= obj) in check_stack_object() 54 if (obj < stack || stackend < obj + len) in check_stack_object() 58 ret = arch_within_stack_frames(stack, stackend, obj, len); in check_stack_object() 65 static void report_usercopy(const void *ptr, unsigned long len, in report_usercopy() argument 70 to_user ? "from" : "to", ptr, type ? : "unknown", len); in report_usercopy()
|
D | shmem.c | 1479 loff_t pos, unsigned len, unsigned flags, in shmem_write_begin() argument 1490 if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size) in shmem_write_begin() 1499 loff_t pos, unsigned len, unsigned copied, in shmem_write_end() argument 1630 struct pipe_inode_info *pipe, size_t len, in shmem_file_splice_read() argument 1656 if (unlikely(left < len)) in shmem_file_splice_read() 1657 len = left; in shmem_file_splice_read() 1664 req_pages = (len + loff + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; in shmem_file_splice_read() 1688 if (!len) in shmem_file_splice_read() 1691 this_len = min_t(unsigned long, len, PAGE_CACHE_SIZE - loff); in shmem_file_splice_read() 1717 len = this_len; in shmem_file_splice_read() [all …]
|
D | slub.c | 4087 int len = 0; in list_locations() local 4121 if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100) 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() 4140 len += sprintf(buf + len, " pid=%ld-%ld", in list_locations() 4143 len += sprintf(buf + len, " pid=%ld", in list_locations() 4148 len < PAGE_SIZE - 60) { in list_locations() [all …]
|
D | msync.c | 31 SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) in SYSCALL_DEFINE3() argument 46 len = (len + ~PAGE_MASK) & PAGE_MASK; in SYSCALL_DEFINE3() 47 end = start + len; in SYSCALL_DEFINE3()
|
D | mincore.c | 268 SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len, in SYSCALL_DEFINE3() argument 280 if (!access_ok(VERIFY_READ, (void __user *) start, len)) in SYSCALL_DEFINE3() 284 pages = len >> PAGE_SHIFT; in SYSCALL_DEFINE3() 285 pages += (len & ~PAGE_MASK) != 0; in SYSCALL_DEFINE3()
|
D | cleancache.c | 187 int len = 0, maxlen = CLEANCACHE_KEY_MAX; in cleancache_get_key() local 194 len = (*fhfn)(inode, &key->u.fh[0], &maxlen, NULL); in cleancache_get_key() 195 if (len <= FILEID_ROOT || len == FILEID_INVALID) in cleancache_get_key()
|
D | mprotect.c | 335 SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, in SYSCALL_DEFINE3() argument 348 if (!len) in SYSCALL_DEFINE3() 350 len = PAGE_ALIGN(len); in SYSCALL_DEFINE3() 351 end = start + len; in SYSCALL_DEFINE3()
|
D | madvise.c | 469 size_t len; in SYSCALL_DEFINE3() local 481 len = (len_in + ~PAGE_MASK) & PAGE_MASK; in SYSCALL_DEFINE3() 484 if (len_in && !len) in SYSCALL_DEFINE3() 487 end = start + len; in SYSCALL_DEFINE3()
|
D | memory.c | 1788 int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len) in vm_iomap_memory() argument 1793 if (start + len < start) in vm_iomap_memory() 1800 len += start & ~PAGE_MASK; in vm_iomap_memory() 1802 pages = (len + ~PAGE_MASK) >> PAGE_SHIFT; in vm_iomap_memory() 3514 void *buf, int len, int write) in generic_access_phys() argument 3524 maddr = ioremap_prot(phys_addr, PAGE_ALIGN(len + offset), prot); in generic_access_phys() 3526 memcpy_toio(maddr + offset, buf, len); in generic_access_phys() 3528 memcpy_fromio(buf, maddr + offset, len); in generic_access_phys() 3531 return len; in generic_access_phys() 3541 unsigned long addr, void *buf, int len, int write) in __access_remote_vm() argument [all …]
|
D | mremap.c | 166 unsigned long new_addr, unsigned long len, in move_page_tables() argument 175 old_end = old_addr + len; in move_page_tables() 230 flush_tlb_range(vma, old_end-len, old_addr); in move_page_tables() 234 return len + old_addr - old_end; /* how much done */ in move_page_tables()
|
D | gup.c | 940 unsigned long addr, len, end; in __get_user_pages_fast() local 947 len = (unsigned long) nr_pages << PAGE_SHIFT; in __get_user_pages_fast() 948 end = start + len; in __get_user_pages_fast() 951 start, len))) in __get_user_pages_fast()
|
D | mempolicy.c | 1184 static long do_mbind(unsigned long start, unsigned long len, in do_mbind() argument 1205 len = (len + PAGE_SIZE - 1) & PAGE_MASK; in do_mbind() 1206 end = start + len; in do_mbind() 1228 start, start + len, mode, mode_flags, in do_mbind() 1347 SYSCALL_DEFINE6(mbind, unsigned long, start, unsigned long, len, in SYSCALL_DEFINE6() argument 1365 return do_mbind(start, len, mode, mode_flags, &nodes, flags); in SYSCALL_DEFINE6() 1562 COMPAT_SYSCALL_DEFINE6(mbind, compat_ulong_t, start, compat_ulong_t, len, in COMPAT_SYSCALL_DEFINE6() argument 1581 return sys_mbind(start, len, mode, nm, nr_bits+1, flags); in COMPAT_SYSCALL_DEFINE6()
|
D | zswap.c | 646 unsigned int dlen = PAGE_SIZE, len; in zswap_frontswap_store() local 686 len = dlen + sizeof(struct zswap_header); in zswap_frontswap_store() 687 ret = zpool_malloc(zswap_pool, len, __GFP_NORETRY | __GFP_NOWARN, in zswap_frontswap_store()
|
D | readahead.c | 574 unsigned long len = end - start + 1; in SYSCALL_DEFINE3() local 575 ret = do_readahead(mapping, f.file, start, len); in SYSCALL_DEFINE3()
|
D | kmemleak.c | 296 int i, len, remaining; in hex_dump_object() local 300 remaining = len = in hex_dump_object() 303 seq_printf(seq, " hex dump (first %d bytes):\n", len); in hex_dump_object() 304 for (i = 0; i < len; i += HEX_ROW_SIZE) { in hex_dump_object()
|
D | hugetlb.c | 1772 unsigned long count, size_t len) in __nr_hugepages_store_common() argument 1806 return len; in __nr_hugepages_store_common() 1814 size_t len) in nr_hugepages_store_common() argument 1826 return __nr_hugepages_store_common(obey_mempolicy, h, nid, count, len); in nr_hugepages_store_common() 1836 struct kobj_attribute *attr, const char *buf, size_t len) in nr_hugepages_store() argument 1838 return nr_hugepages_store_common(false, kobj, buf, len); in nr_hugepages_store() 1855 struct kobj_attribute *attr, const char *buf, size_t len) in nr_hugepages_mempolicy_store() argument 1857 return nr_hugepages_store_common(true, kobj, buf, len); in nr_hugepages_mempolicy_store()
|
D | filemap.c | 2340 loff_t pos, unsigned len, unsigned flags, in pagecache_write_begin() argument 2345 return aops->write_begin(file, mapping, pos, len, flags, in pagecache_write_begin() 2351 loff_t pos, unsigned len, unsigned copied, in pagecache_write_end() argument 2356 return aops->write_end(file, mapping, pos, len, copied, page, fsdata); in pagecache_write_end()
|