lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Dec 2011 02:01:32 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Kees Cook <keescook@...omium.org>,
	LKML <linux-kernel@...r.kernel.org>, Tejun Heo <tj@...nel.org>,
	Andrew Vagin <avagin@...nvz.org>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	Vasiliy Kulikov <segoon@...nwall.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Alexey Dobriyan <adobriyan@...il.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Emelyanov <xemul@...allels.com>,
	Michael Kerrisk <mtk.manpages@...il.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ