[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190206141753.GE7314@zn.tnic>
Date: Wed, 6 Feb 2019 15:17:53 +0100
From: Borislav Petkov <bp@...en8.de>
To: Julian Stecklina <jsteckli@...zon.de>
Cc: Julian Stecklina <js@...en8.de>, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, hpa@...or.com,
linux-kernel@...r.kernel.org, jschoenh@...zon.de,
Dave Jiang <dave.jiang@...el.com>,
Kees Cook <keescook@...omium.org>, Baoquan He <bhe@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] x86/boot: increase maximum number of avoided KASLR
regions
On Wed, Feb 06, 2019 at 01:50:57PM +0100, Julian Stecklina wrote:
> Because at this point, we are not in a good position to handle an
> unlimited amount of regions.
We could save only the regions which are ok to kaslr into. And we do,
apparently:
static struct slot_area slot_areas[MAX_SLOT_AREA];
but I guess there was a reason to do the mem_avoid thing too instead of
collecting only OK ranges directly. Maybe Kees will know.
> As for the choice of "16", I took our usecase and multiplied it by two.
> FWIW, this could be even larger.
Because our kernel is not fat enough huh?
Btw, you missed a spot:
static unsigned long find_random_phys_addr(unsigned long minimum,
unsigned long image_size)
{
/* Check if we had too many memmaps. */
if (memmap_too_large) {
debug_putstr("Aborted memory entries scan (more than 4 memmap= args)!\n");
^^^^^^^^^^^^^
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists