From: Borislav Petkov <bp@alien8.de>
To: Julian Stecklina <jsteckli@amazon.de>
Cc: Julian Stecklina <js@alien8.de>,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
hpa@zytor.com, linux-kernel@vger.kernel.org, jschoenh@amazon.de,
Dave Jiang <dave.jiang@intel.com>,
Kees Cook <keescook@chromium.org>, Baoquan He <bhe@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 2/2] x86/boot: increase maximum number of avoided KASLR regions
Date: Wed, 6 Feb 2019 15:17:53 +0100 [thread overview]
Message-ID: <20190206141753.GE7314@zn.tnic> (raw)
In-Reply-To: <ciirm8womdaxn2.fsf@u54ee758033e858cfa736.ant.amazon.com>
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.
next prev parent reply other threads:[~2019-02-06 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-30 16:40 [PATCH 1/2] x86/boot: fix KASL when memmap range manipulation is used Julian Stecklina
2019-01-30 16:40 ` [PATCH 2/2] x86/boot: increase maximum number of avoided KASLR regions Julian Stecklina
2019-02-05 14:44 ` Borislav Petkov
2019-02-06 12:50 ` Julian Stecklina
2019-02-06 14:17 ` Borislav Petkov [this message]
2019-02-06 15:29 ` Kees Cook
2019-02-06 17:53 ` Borislav Petkov
2019-02-11 9:09 ` [PATCH 1/2] x86/boot: fix KASL when memmap range manipulation is used Baoquan He
2019-02-11 9:54 ` Julian Stecklina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190206141753.GE7314@zn.tnic \
--to=bp@alien8.de \
--cc=bhe@redhat.com \
--cc=dave.jiang@intel.com \
--cc=hpa@zytor.com \
--cc=js@alien8.de \
--cc=jschoenh@amazon.de \
--cc=jsteckli@amazon.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox