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:   Mon, 13 Feb 2017 16:35:10 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Dmitry Safonov <dsafonov@...tuozzo.com>
cc:     linux-kernel@...r.kernel.org, 0x7f454c46@...il.com,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...e.de>, x86@...nel.org,
        linux-mm@...ck.org
Subject: Re: [PATCHv4 2/5] x86/mm: introduce mmap{,_legacy}_base

On Mon, 13 Feb 2017, Dmitry Safonov wrote:
> On 02/11/2017 05:13 PM, Thomas Gleixner wrote:
> > > -static unsigned long mmap_base(unsigned long rnd)
> > > +static unsigned long mmap_base(unsigned long rnd, unsigned long
> > > task_size)
> > >  {
> > > 	unsigned long gap = rlimit(RLIMIT_STACK);
> > 	unsigned long gap_min, gap_max;
> > 
> > 	/* Add comment what this means */
> > 	gap_min = SIZE_128M + stack_maxrandom_size(task_size);
> > 	/* Explain that ' /6 * 5' magic */
> > 	gap_max = (task_size / 6) * 5;
> 
> So, I can't find about those limits on a gap size:
> They were introduced by commit 8913d55b6c58 ("i386 virtual memory
> layout rework").
> All I could find is that 128Mb limit was more limit on virtual adress
> space than on a memory available those days.
> And 5/6 of task_size looks like heuristic value.
> So I'm not sure, what to write in comments:
> that rlimit on stack can't be bigger than 5/6 of task_size?
> That looks obvious from the code.

So just leave it alone. 5/6 is pulled from thin air and 128M probably as
well. I hoped there would be some reasonable explanation ....

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ