All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	kernel-hardening@lists.openwall.com, adurbin@google.com,
	Eric Northup <digitaleric@google.com>,
	jln@google.com, wad@google.com,
	Mathias Krause <minipli@googlemail.com>,
	Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Subject: [kernel-hardening] Re: [PATCH 3/7] x86, kaslr: find minimum safe relocation position
Date: Thu, 03 Oct 2013 15:23:39 -0700	[thread overview]
Message-ID: <524DEE6B.2060105@zytor.com> (raw)
In-Reply-To: <1380833605-26313-4-git-send-email-keescook@chromium.org>

On 10/03/2013 01:53 PM, Kees Cook wrote:
> Examine all the known unsafe areas and avoid them by just raising the
> minimum relocation position to be past them.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>

> +	/* Minimum location must be above all these regions: */

This is highly problematic.  The standard protocol is to hoist the
initramfs as high as possible in memory, so this may really unacceptably
restrict the available range.

It would be better to treat these the same as reserved regions in the
e820 map as far as the address space picking algorithm is concerned.

	-hpa

WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	kernel-hardening@lists.openwall.com, adurbin@google.com,
	Eric Northup <digitaleric@google.com>,
	jln@google.com, wad@google.com,
	Mathias Krause <minipli@googlemail.com>,
	Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Subject: Re: [PATCH 3/7] x86, kaslr: find minimum safe relocation position
Date: Thu, 03 Oct 2013 15:23:39 -0700	[thread overview]
Message-ID: <524DEE6B.2060105@zytor.com> (raw)
In-Reply-To: <1380833605-26313-4-git-send-email-keescook@chromium.org>

On 10/03/2013 01:53 PM, Kees Cook wrote:
> Examine all the known unsafe areas and avoid them by just raising the
> minimum relocation position to be past them.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>

> +	/* Minimum location must be above all these regions: */

This is highly problematic.  The standard protocol is to hoist the
initramfs as high as possible in memory, so this may really unacceptably
restrict the available range.

It would be better to treat these the same as reserved regions in the
e820 map as far as the address space picking algorithm is concerned.

	-hpa



  reply	other threads:[~2013-10-03 22:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03 20:53 [kernel-hardening] [PATCH v7 0/7] Kernel base address randomization on x86 Kees Cook
2013-10-03 20:53 ` Kees Cook
2013-10-03 20:53 ` [kernel-hardening] [PATCH 1/7] x86, boot: move CPU flags out of cpucheck Kees Cook
2013-10-03 20:53   ` Kees Cook
2014-01-29 12:01   ` [kernel-hardening] [PATCH] x86, boot: fix word-size assumptions in has_eflag() inline asm David Woodhouse
2014-01-29 12:01     ` David Woodhouse
2014-01-29 16:57     ` [kernel-hardening] " Kees Cook
2014-01-29 16:57       ` Kees Cook
2014-01-29 17:13     ` [tip:x86/build] x86, boot: Fix word-size assumptions in has_eflag () " tip-bot for David Woodhouse
2014-01-30  9:09       ` Ingo Molnar
2014-01-30 10:28         ` Woodhouse, David
2014-01-30 11:00         ` [PATCH v2] " David Woodhouse
2014-01-30 13:45           ` H. Peter Anvin
2014-01-30 14:08             ` David Woodhouse
2014-01-30 16:10           ` [tip:x86/build] " tip-bot for David Woodhouse
2014-01-30 23:01           ` [PATCH v2] " David Rientjes
2013-10-03 20:53 ` [kernel-hardening] [PATCH 2/7] x86, kaslr: return location from decompress_kernel Kees Cook
2013-10-03 20:53   ` Kees Cook
2013-10-03 20:53 ` [kernel-hardening] [PATCH 3/7] x86, kaslr: find minimum safe relocation position Kees Cook
2013-10-03 20:53   ` Kees Cook
2013-10-03 22:23   ` H. Peter Anvin [this message]
2013-10-03 22:23     ` H. Peter Anvin
2013-10-03 22:43     ` [kernel-hardening] " Kees Cook
2013-10-03 22:43       ` Kees Cook
2013-10-03 22:46       ` [kernel-hardening] " H. Peter Anvin
2013-10-03 22:46         ` H. Peter Anvin
2013-10-03 20:53 ` [kernel-hardening] [PATCH 4/7] x86, kaslr: select random base offset Kees Cook
2013-10-03 20:53   ` Kees Cook
2013-10-03 20:53 ` [kernel-hardening] [PATCH 5/7] x86, kaslr: select memory region from e820 maps Kees Cook
2013-10-03 20:53   ` Kees Cook
2013-10-03 20:53 ` [kernel-hardening] [PATCH 6/7] x86, kaslr: report kernel offset on panic Kees Cook
2013-10-03 20:53   ` Kees Cook
2013-10-03 20:53 ` [kernel-hardening] [PATCH 7/7] x86, kaslr: raise max positions to 1GiB on x86_64 Kees Cook
2013-10-03 20:53   ` Kees Cook

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=524DEE6B.2060105@zytor.com \
    --to=hpa@zytor.com \
    --cc=adurbin@google.com \
    --cc=digitaleric@google.com \
    --cc=jln@google.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minipli@googlemail.com \
    --cc=wad@google.com \
    --cc=x86@kernel.org \
    --cc=zhangyanfei@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.