~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/mm/mremap.c

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *      mm/mremap.c
  3  *
  4  *      (C) Copyright 1996 Linus Torvalds
  5  *
  6  *      Address space accounting code   <alan@lxorguk.ukuu.org.uk>
  7  *      (C) Copyright 2002 Red Hat Inc, All Rights Reserved
  8  */
  9 
 10 #include <linux/mm.h>
 11 #include <linux/hugetlb.h>
 12 #include <linux/shm.h>
 13 #include <linux/ksm.h>
 14 #include <linux/mman.h>
 15 #include <linux/swap.h>
 16 #include <linux/capability.h>
 17 #include <linux/fs.h>
 18 #include <linux/swapops.h>
 19 #include <linux/highmem.h>
 20 #include <linux/security.h>
 21 #include <linux/syscalls.h>
 22 #include <linux/mmu_notifier.h>
 23 #include <linux/sched/sysctl.h>
 24 #include <linux/uaccess.h>
 25 
 26 #include <asm/cacheflush.h>
 27 #include <asm/tlbflush.h>
 28 
 29 #include "internal.h"
 30 
 31 static pmd_t *get_old_pmd(struct mm_struct *mm, unsigned long addr)
 32 {
 33         pgd_t *pgd;
 34         pud_t *pud;
 35         pmd_t *pmd;
 36 
 37         pgd = pgd_offset(mm, addr);
 38         if (pgd_none_or_clear_bad(pgd))
 39                 return NULL;
 40 
 41         pud = pud_offset(pgd, addr);
 42         if (pud_none_or_clear_bad(pud))
 43                 return NULL;
 44 
 45         pmd = pmd_offset(pud, addr);
 46         if (pmd_none(*pmd))
 47                 return NULL;
 48 
 49         return pmd;
 50 }
 51 
 52 static pmd_t *alloc_new_pmd(struct mm_struct *mm, struct vm_area_struct *vma,
 53                             unsigned long addr)
 54 {
 55         pgd_t *pgd;
 56         pud_t *pud;
 57         pmd_t *pmd;
 58 
 59         pgd = pgd_offset(mm, addr);
 60         pud = pud_alloc(mm, pgd, addr);
 61         if (!pud)
 62                 return NULL;
 63 
 64         pmd = pmd_alloc(mm, pud, addr);
 65         if (!pmd)
 66                 return NULL;
 67 
 68         VM_BUG_ON(pmd_trans_huge(*pmd));
 69 
 70         return pmd;
 71 }
 72 
 73 static pte_t move_soft_dirty_pte(pte_t pte)
 74 {
 75         /*
 76          * Set soft dirty bit so we can notice
 77          * in userspace the ptes were moved.
 78          */
 79 #ifdef CONFIG_MEM_SOFT_DIRTY
 80         if (pte_present(pte))
 81                 pte = pte_mksoft_dirty(pte);
 82         else if (is_swap_pte(pte))
 83                 pte = pte_swp_mksoft_dirty(pte);
 84         else if (pte_file(pte))
 85                 pte = pte_file_mksoft_dirty(pte);
 86 #endif
 87         return pte;
 88 }
 89 
 90 static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
 91                 unsigned long old_addr, unsigned long old_end,
 92                 struct vm_area_struct *new_vma, pmd_t *new_pmd,
 93                 unsigned long new_addr, bool need_rmap_locks)
 94 {
 95         struct address_space *mapping = NULL;
 96         struct anon_vma *anon_vma = NULL;
 97         struct mm_struct *mm = vma->vm_mm;
 98         pte_t *old_pte, *new_pte, pte;
 99         spinlock_t *old_ptl, *new_ptl;
100         bool force_flush = false;
101         unsigned long len = old_end - old_addr;
102 
103         /*
104          * When need_rmap_locks is true, we take the i_mmap_mutex and anon_vma
105          * locks to ensure that rmap will always observe either the old or the
106          * new ptes. This is the easiest way to avoid races with
107          * truncate_pagecache(), page migration, etc...
108          *
109          * When need_rmap_locks is false, we use other ways to avoid
110          * such races:
111          *
112          * - During exec() shift_arg_pages(), we use a specially tagged vma
113          *   which rmap call sites look for using is_vma_temporary_stack().
114          *
115          * - During mremap(), new_vma is often known to be placed after vma
116          *   in rmap traversal order. This ensures rmap will always observe
117          *   either the old pte, or the new pte, or both (the page table locks
118          *   serialize access to individual ptes, but only rmap traversal
119          *   order guarantees that we won't miss both the old and new ptes).
120          */
121         if (need_rmap_locks) {
122                 if (vma->vm_file) {
123                         mapping = vma->vm_file->f_mapping;
124                         mutex_lock(&mapping->i_mmap_mutex);
125                 }
126                 if (vma->anon_vma) {
127                         anon_vma = vma->anon_vma;
128                         anon_vma_lock_write(anon_vma);
129                 }
130         }
131 
132         /*
133          * We don't have to worry about the ordering of src and dst
134          * pte locks because exclusive mmap_sem prevents deadlock.
135          */
136         old_pte = pte_offset_map_lock(mm, old_pmd, old_addr, &old_ptl);
137         new_pte = pte_offset_map(new_pmd, new_addr);
138         new_ptl = pte_lockptr(mm, new_pmd);
139         if (new_ptl != old_ptl)
140                 spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
141         arch_enter_lazy_mmu_mode();
142 
143         for (; old_addr < old_end; old_pte++, old_addr += PAGE_SIZE,
144                                    new_pte++, new_addr += PAGE_SIZE) {
145                 if (pte_none(*old_pte))
146                         continue;
147                 pte = ptep_get_and_clear(mm, old_addr, old_pte);
148                 /*
149                  * If we are remapping a valid PTE, make sure
150                  * to flush TLB before we drop the PTL for the PTE.
151                  *
152                  * NOTE! Both old and new PTL matter: the old one
153                  * for racing with page_mkclean(), the new one to
154                  * make sure the physical page stays valid until
155                  * the TLB entry for the old mapping has been
156                  * flushed.
157                  */
158                 if (pte_present(pte))
159                         force_flush = true;
160                 pte = move_pte(pte, new_vma->vm_page_prot, old_addr, new_addr);
161                 pte = move_soft_dirty_pte(pte);
162                 set_pte_at(mm, new_addr, new_pte, pte);
163         }
164 
165         arch_leave_lazy_mmu_mode();
166         if (force_flush)
167                 flush_tlb_range(vma, old_end - len, old_end);
168         if (new_ptl != old_ptl)
169                 spin_unlock(new_ptl);
170         pte_unmap(new_pte - 1);
171         pte_unmap_unlock(old_pte - 1, old_ptl);
172         if (anon_vma)
173                 anon_vma_unlock_write(anon_vma);
174         if (mapping)
175                 mutex_unlock(&mapping->i_mmap_mutex);
176 }
177 
178 #define LATENCY_LIMIT   (64 * PAGE_SIZE)
179 
180 unsigned long move_page_tables(struct vm_area_struct *vma,
181                 unsigned long old_addr, struct vm_area_struct *new_vma,
182                 unsigned long new_addr, unsigned long len,
183                 bool need_rmap_locks)
184 {
185         unsigned long extent, next, old_end;
186         pmd_t *old_pmd, *new_pmd;
187         unsigned long mmun_start;       /* For mmu_notifiers */
188         unsigned long mmun_end;         /* For mmu_notifiers */
189 
190         old_end = old_addr + len;
191         flush_cache_range(vma, old_addr, old_end);
192 
193         mmun_start = old_addr;
194         mmun_end   = old_end;
195         mmu_notifier_invalidate_range_start(vma->vm_mm, mmun_start, mmun_end);
196 
197         for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
198                 cond_resched();
199                 next = (old_addr + PMD_SIZE) & PMD_MASK;
200                 /* even if next overflowed, extent below will be ok */
201                 extent = next - old_addr;
202                 if (extent > old_end - old_addr)
203                         extent = old_end - old_addr;
204                 old_pmd = get_old_pmd(vma->vm_mm, old_addr);
205                 if (!old_pmd)
206                         continue;
207                 new_pmd = alloc_new_pmd(vma->vm_mm, vma, new_addr);
208                 if (!new_pmd)
209                         break;
210                 if (pmd_trans_huge(*old_pmd)) {
211                         int err = 0;
212                         if (extent == HPAGE_PMD_SIZE) {
213                                 VM_BUG_ON_VMA(vma->vm_file || !vma->anon_vma,
214                                               vma);
215                                 /* See comment in move_ptes() */
216                                 if (need_rmap_locks)
217                                         anon_vma_lock_write(vma->anon_vma);
218                                 err = move_huge_pmd(vma, new_vma, old_addr,
219                                                     new_addr, old_end,
220                                                     old_pmd, new_pmd);
221                                 if (need_rmap_locks)
222                                         anon_vma_unlock_write(vma->anon_vma);
223                         }
224                         if (err > 0) {
225                                 continue;
226                         } else if (!err) {
227                                 split_huge_page_pmd(vma, old_addr, old_pmd);
228                         }
229                         VM_BUG_ON(pmd_trans_huge(*old_pmd));
230                 }
231                 if (pmd_none(*new_pmd) && __pte_alloc(new_vma->vm_mm, new_vma,
232                                                       new_pmd, new_addr))
233                         break;
234                 next = (new_addr + PMD_SIZE) & PMD_MASK;
235                 if (extent > next - new_addr)
236                         extent = next - new_addr;
237                 if (extent > LATENCY_LIMIT)
238                         extent = LATENCY_LIMIT;
239                 move_ptes(vma, old_pmd, old_addr, old_addr + extent,
240                           new_vma, new_pmd, new_addr, need_rmap_locks);
241         }
242 
243         mmu_notifier_invalidate_range_end(vma->vm_mm, mmun_start, mmun_end);
244 
245         return len + old_addr - old_end;        /* how much done */
246 }
247 
248 static unsigned long move_vma(struct vm_area_struct *vma,
249                 unsigned long old_addr, unsigned long old_len,
250                 unsigned long new_len, unsigned long new_addr, bool *locked)
251 {
252         struct mm_struct *mm = vma->vm_mm;
253         struct vm_area_struct *new_vma;
254         unsigned long vm_flags = vma->vm_flags;
255         unsigned long new_pgoff;
256         unsigned long moved_len;
257         unsigned long excess = 0;
258         unsigned long hiwater_vm;
259         int split = 0;
260         int err;
261         bool need_rmap_locks;
262 
263         /*
264          * We'd prefer to avoid failure later on in do_munmap:
265          * which may split one vma into three before unmapping.
266          */
267         if (mm->map_count >= sysctl_max_map_count - 3)
268                 return -ENOMEM;
269 
270         /*
271          * Advise KSM to break any KSM pages in the area to be moved:
272          * it would be confusing if they were to turn up at the new
273          * location, where they happen to coincide with different KSM
274          * pages recently unmapped.  But leave vma->vm_flags as it was,
275          * so KSM can come around to merge on vma and new_vma afterwards.
276          */
277         err = ksm_madvise(vma, old_addr, old_addr + old_len,
278                                                 MADV_UNMERGEABLE, &vm_flags);
279         if (err)
280                 return err;
281 
282         new_pgoff = vma->vm_pgoff + ((old_addr - vma->vm_start) >> PAGE_SHIFT);
283         new_vma = copy_vma(&vma, new_addr, new_len, new_pgoff,
284                            &need_rmap_locks);
285         if (!new_vma)
286                 return -ENOMEM;
287 
288         moved_len = move_page_tables(vma, old_addr, new_vma, new_addr, old_len,
289                                      need_rmap_locks);
290         if (moved_len < old_len) {
291                 /*
292                  * On error, move entries back from new area to old,
293                  * which will succeed since page tables still there,
294                  * and then proceed to unmap new area instead of old.
295                  */
296                 move_page_tables(new_vma, new_addr, vma, old_addr, moved_len,
297                                  true);
298                 vma = new_vma;
299                 old_len = new_len;
300                 old_addr = new_addr;
301                 new_addr = -ENOMEM;
302         }
303 
304         /* Conceal VM_ACCOUNT so old reservation is not undone */
305         if (vm_flags & VM_ACCOUNT) {
306                 vma->vm_flags &= ~VM_ACCOUNT;
307                 excess = vma->vm_end - vma->vm_start - old_len;
308                 if (old_addr > vma->vm_start &&
309                     old_addr + old_len < vma->vm_end)
310                         split = 1;
311         }
312 
313         /*
314          * If we failed to move page tables we still do total_vm increment
315          * since do_munmap() will decrement it by old_len == new_len.
316          *
317          * Since total_vm is about to be raised artificially high for a
318          * moment, we need to restore high watermark afterwards: if stats
319          * are taken meanwhile, total_vm and hiwater_vm appear too high.
320          * If this were a serious issue, we'd add a flag to do_munmap().
321          */
322         hiwater_vm = mm->hiwater_vm;
323         vm_stat_account(mm, vma->vm_flags, vma->vm_file, new_len>>PAGE_SHIFT);
324 
325         if (do_munmap(mm, old_addr, old_len) < 0) {
326                 /* OOM: unable to split vma, just get accounts right */
327                 vm_unacct_memory(excess >> PAGE_SHIFT);
328                 excess = 0;
329         }
330         mm->hiwater_vm = hiwater_vm;
331 
332         /* Restore VM_ACCOUNT if one or two pieces of vma left */
333         if (excess) {
334                 vma->vm_flags |= VM_ACCOUNT;
335                 if (split)
336                         vma->vm_next->vm_flags |= VM_ACCOUNT;
337         }
338 
339         if (vm_flags & VM_LOCKED) {
340                 mm->locked_vm += new_len >> PAGE_SHIFT;
341                 *locked = true;
342         }
343 
344         return new_addr;
345 }
346 
347 static struct vm_area_struct *vma_to_resize(unsigned long addr,
348         unsigned long old_len, unsigned long new_len, unsigned long *p)
349 {
350         struct mm_struct *mm = current->mm;
351         struct vm_area_struct *vma = find_vma(mm, addr);
352 
353         if (!vma || vma->vm_start > addr)
354                 goto Efault;
355 
356         if (is_vm_hugetlb_page(vma))
357                 goto Einval;
358 
359         /* We can't remap across vm area boundaries */
360         if (old_len > vma->vm_end - addr)
361                 goto Efault;
362 
363         /* Need to be careful about a growing mapping */
364         if (new_len > old_len) {
365                 unsigned long pgoff;
366 
367                 if (vma->vm_flags & (VM_DONTEXPAND | VM_PFNMAP))
368                         goto Efault;
369                 pgoff = (addr - vma->vm_start) >> PAGE_SHIFT;
370                 pgoff += vma->vm_pgoff;
371                 if (pgoff + (new_len >> PAGE_SHIFT) < pgoff)
372                         goto Einval;
373         }
374 
375         if (vma->vm_flags & VM_LOCKED) {
376                 unsigned long locked, lock_limit;
377                 locked = mm->locked_vm << PAGE_SHIFT;
378                 lock_limit = rlimit(RLIMIT_MEMLOCK);
379                 locked += new_len - old_len;
380                 if (locked > lock_limit && !capable(CAP_IPC_LOCK))
381                         goto Eagain;
382         }
383 
384         if (!may_expand_vm(mm, (new_len - old_len) >> PAGE_SHIFT))
385                 goto Enomem;
386 
387         if (vma->vm_flags & VM_ACCOUNT) {
388                 unsigned long charged = (new_len - old_len) >> PAGE_SHIFT;
389                 if (security_vm_enough_memory_mm(mm, charged))
390                         goto Efault;
391                 *p = charged;
392         }
393 
394         return vma;
395 
396 Efault: /* very odd choice for most of the cases, but... */
397         return ERR_PTR(-EFAULT);
398 Einval:
399         return ERR_PTR(-EINVAL);
400 Enomem:
401         return ERR_PTR(-ENOMEM);
402 Eagain:
403         return ERR_PTR(-EAGAIN);
404 }
405 
406 static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
407                 unsigned long new_addr, unsigned long new_len, bool *locked)
408 {
409         struct mm_struct *mm = current->mm;
410         struct vm_area_struct *vma;
411         unsigned long ret = -EINVAL;
412         unsigned long charged = 0;
413         unsigned long map_flags;
414 
415         if (new_addr & ~PAGE_MASK)
416                 goto out;
417 
418         if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
419                 goto out;
420 
421         /* Check if the location we're moving into overlaps the
422          * old location at all, and fail if it does.
423          */
424         if ((new_addr <= addr) && (new_addr+new_len) > addr)
425                 goto out;
426 
427         if ((addr <= new_addr) && (addr+old_len) > new_addr)
428                 goto out;
429 
430         ret = do_munmap(mm, new_addr, new_len);
431         if (ret)
432                 goto out;
433 
434         if (old_len >= new_len) {
435                 ret = do_munmap(mm, addr+new_len, old_len - new_len);
436                 if (ret && old_len != new_len)
437                         goto out;
438                 old_len = new_len;
439         }
440 
441         vma = vma_to_resize(addr, old_len, new_len, &charged);
442         if (IS_ERR(vma)) {
443                 ret = PTR_ERR(vma);
444                 goto out;
445         }
446 
447         map_flags = MAP_FIXED;
448         if (vma->vm_flags & VM_MAYSHARE)
449                 map_flags |= MAP_SHARED;
450 
451         ret = get_unmapped_area(vma->vm_file, new_addr, new_len, vma->vm_pgoff +
452                                 ((addr - vma->vm_start) >> PAGE_SHIFT),
453                                 map_flags);
454         if (ret & ~PAGE_MASK)
455                 goto out1;
456 
457         ret = move_vma(vma, addr, old_len, new_len, new_addr, locked);
458         if (!(ret & ~PAGE_MASK))
459                 goto out;
460 out1:
461         vm_unacct_memory(charged);
462 
463 out:
464         return ret;
465 }
466 
467 static int vma_expandable(struct vm_area_struct *vma, unsigned long delta)
468 {
469         unsigned long end = vma->vm_end + delta;
470         if (end < vma->vm_end) /* overflow */
471                 return 0;
472         if (vma->vm_next && vma->vm_next->vm_start < end) /* intersection */
473                 return 0;
474         if (get_unmapped_area(NULL, vma->vm_start, end - vma->vm_start,
475                               0, MAP_FIXED) & ~PAGE_MASK)
476                 return 0;
477         return 1;
478 }
479 
480 /*
481  * Expand (or shrink) an existing mapping, potentially moving it at the
482  * same time (controlled by the MREMAP_MAYMOVE flag and available VM space)
483  *
484  * MREMAP_FIXED option added 5-Dec-1999 by Benjamin LaHaise
485  * This option implies MREMAP_MAYMOVE.
486  */
487 SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
488                 unsigned long, new_len, unsigned long, flags,
489                 unsigned long, new_addr)
490 {
491         struct mm_struct *mm = current->mm;
492         struct vm_area_struct *vma;
493         unsigned long ret = -EINVAL;
494         unsigned long charged = 0;
495         bool locked = false;
496 
497         if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
498                 return ret;
499 
500         if (flags & MREMAP_FIXED && !(flags & MREMAP_MAYMOVE))
501                 return ret;
502 
503         if (addr & ~PAGE_MASK)
504                 return ret;
505 
506         old_len = PAGE_ALIGN(old_len);
507         new_len = PAGE_ALIGN(new_len);
508 
509         /*
510          * We allow a zero old-len as a special case
511          * for DOS-emu "duplicate shm area" thing. But
512          * a zero new-len is nonsensical.
513          */
514         if (!new_len)
515                 return ret;
516 
517         down_write(&current->mm->mmap_sem);
518 
519         if (flags & MREMAP_FIXED) {
520                 ret = mremap_to(addr, old_len, new_addr, new_len,
521                                 &locked);
522                 goto out;
523         }
524 
525         /*
526          * Always allow a shrinking remap: that just unmaps
527          * the unnecessary pages..
528          * do_munmap does all the needed commit accounting
529          */
530         if (old_len >= new_len) {
531                 ret = do_munmap(mm, addr+new_len, old_len - new_len);
532                 if (ret && old_len != new_len)
533                         goto out;
534                 ret = addr;
535                 goto out;
536         }
537 
538         /*
539          * Ok, we need to grow..
540          */
541         vma = vma_to_resize(addr, old_len, new_len, &charged);
542         if (IS_ERR(vma)) {
543                 ret = PTR_ERR(vma);
544                 goto out;
545         }
546 
547         /* old_len exactly to the end of the area..
548          */
549         if (old_len == vma->vm_end - addr) {
550                 /* can we just expand the current mapping? */
551                 if (vma_expandable(vma, new_len - old_len)) {
552                         int pages = (new_len - old_len) >> PAGE_SHIFT;
553 
554                         if (vma_adjust(vma, vma->vm_start, addr + new_len,
555                                        vma->vm_pgoff, NULL)) {
556                                 ret = -ENOMEM;
557                                 goto out;
558                         }
559 
560                         vm_stat_account(mm, vma->vm_flags, vma->vm_file, pages);
561                         if (vma->vm_flags & VM_LOCKED) {
562                                 mm->locked_vm += pages;
563                                 locked = true;
564                                 new_addr = addr;
565                         }
566                         ret = addr;
567                         goto out;
568                 }
569         }
570 
571         /*
572          * We weren't able to just expand or shrink the area,
573          * we need to create a new one and move it..
574          */
575         ret = -ENOMEM;
576         if (flags & MREMAP_MAYMOVE) {
577                 unsigned long map_flags = 0;
578                 if (vma->vm_flags & VM_MAYSHARE)
579                         map_flags |= MAP_SHARED;
580 
581                 new_addr = get_unmapped_area(vma->vm_file, 0, new_len,
582                                         vma->vm_pgoff +
583                                         ((addr - vma->vm_start) >> PAGE_SHIFT),
584                                         map_flags);
585                 if (new_addr & ~PAGE_MASK) {
586                         ret = new_addr;
587                         goto out;
588                 }
589 
590                 ret = move_vma(vma, addr, old_len, new_len, new_addr, &locked);
591         }
592 out:
593         if (ret & ~PAGE_MASK)
594                 vm_unacct_memory(charged);
595         up_write(&current->mm->mmap_sem);
596         if (locked && new_len > old_len)
597                 mm_populate(new_addr + old_len, new_len - old_len);
598         return ret;
599 }
600 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp