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, 29 Dec 2015 12:48:44 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, Linux MM <linux-mm@...ck.org>,
	Quentin Casasnovas <quentin.casasnovas@...cle.com>,
	Vegard Nossum <vegard.nossum@...cle.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...uxfoundation.org>,
	Willy Tarreau <w@....eu>,
	Andy Lutomirski <luto@...capital.net>,
	Kees Cook <keescook@...gle.com>,
	Vladimir Davydov <vdavydov@...tuozzo.com>,
	Konstantin Khlebnikov <koct9i@...il.com>,
	Pavel Emelyanov <xemul@...tuozzo.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH RFC] mm: Rework virtual memory accounting

On Mon, Dec 28, 2015 at 03:10:02PM -0800, Andrew Morton wrote:
> On Tue, 29 Dec 2015 00:10:15 +0300 Cyrill Gorcunov <gorcunov@...il.com> wrote:
...
> 
> This clashes with
> mm-mmapc-remove-redundant-local-variables-for-may_expand_vm.patch,
> below.  I resolved it thusly:
> 
> bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
> {
> 	if (mm->total_vm + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT)
> 		return false;
> 
> 	if ((flags & (VM_WRITE | VM_SHARED | (VM_STACK_FLAGS &
> 				(VM_GROWSUP | VM_GROWSDOWN)))) == VM_WRITE)
> 		return mm->data_vm + npages <= rlimit(RLIMIT_DATA);
> 
> 	return true;
> }

Thanks, Andrew!
--
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