lkml.org 
[lkml]   [2011]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 3/3] [PATCH] prctl: Add PR_SET_MM codes to set up mm_struct entires v3
On Mon, Dec 12, 2011 at 01:53:23PM -0800, Andrew Morton wrote:
...
> >
> > +#ifdef CONFIG_CHECKPOINT_RESTORE
> > +static int prctl_set_mm(int opt, unsigned long addr,
> > + unsigned long arg4, unsigned long arg5)
> > +{
> > + unsigned long rlim = rlimit(RLIMIT_DATA);
> > + unsigned long vm_req_flags;
> > + unsigned long vm_bad_flags;
> > + struct vm_area_struct *vma;
> > + int error = 0;
> > +
> > + if (arg4 | arg5)
> > + return -EINVAL;
> > +
> > + if (!capable(CAP_SYS_ADMIN))
> > + return -EPERM;
> > +
> > + if (addr >= TASK_SIZE)
> > + return -EINVAL;
> > +
> > + down_read(&current->mm->mmap_sem);
>
> This may not be true of all compiler versions, but when I cache
> current->mm in a local, the code size is reduced rather a lot:
>
> akpm:/usr/src/25> size kernel/sys.o
> text data bss dec hex filename
> 22685 14376 7616 44677 ae85 kernel/sys.o
> 22489 14376 7616 44481 adc1 kernel/sys.o
>

Hmm, this is great and weird. Letme try...

Cyrill


\
 
 \ /
  Last update: 2011-12-12 23:03    [W:0.062 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site