All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Ingo Molnar <mingo@kernel.org>, James Morse <james.morse@arm.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Matt Redfearn <matt.redfearn@imgtec.com>,
	Yves-Alexis Perez <corsac@debian.org>,
	Emrah Demir <ed@abdsec.com>, Jonathan Corbet <corbet@lwn.net>,
	"x86@kernel.org" <x86@kernel.org>,
	Len Brown <len.brown@intel.com>, Borislav Petkov <bp@suse.de>,
	Andy Lutomirski <luto@kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: [kernel-hardening] Re: [PATCH v2] kaslr: allow kASLR to be default over Hibernation
Date: Thu, 14 Apr 2016 22:34:44 +0200	[thread overview]
Message-ID: <20160414203444.GC3856@amd> (raw)
In-Reply-To: <CAGXu5jKNKV2RaPCw+m3R-e7irmmP0eRBBq9RKY0mcH5A1Nsx6g@mail.gmail.com>

On Thu 2016-04-14 13:14:07, Kees Cook wrote:
> On Thu, Apr 14, 2016 at 1:01 PM, Pavel Machek <pavel@denx.de> wrote:
> > Hi!
> >
> >> Since kASLR and Hibernation can not currently coexist at runtime
> >> on x86, the default behavior was to disable kASLR by default when
> >> CONFIG_HIBERNATION was present (to retain original behavior).
> >>
> >> The behavior of kASLR on arm64 (and soon MIPS) is to be enabled by
> >> default when selected at build time. Since arm64 Hibernation does not
> >> conflict with kASLR, this fixes the hibernation argument parsing to be
> >> x86-specific. Additionally, since end users want to be able to select
> >> kASLR on x86 by default at build time, create CONFIG_RANDOMIZE_BASE_ON
> >> that is present only on x86.
> >>
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > I believe this is bad idea. arm64 shows that kaslr and hibernation can
> > coexist, and hibernation is still useful when your battery runs out.
> 
> What? I'm confused -- this patch leaves the x86 behavior as-is by
> default but allows hibernation to work with arm64. (For example, right
> now, if you boot arm64 with "kaslr" kernel argument, hibernation will
> get needlessly disabled.)

So it is very different from the PATCH v1, still it shares the
subject?

This is the part I don't like:

> >> Since kASLR and Hibernation can not currently coexist at runtime
> >> on x86, the default behavior was to disable kASLR by default when
> >> CONFIG_HIBERNATION was present (to retain original behavior).

Now I notice that it is quite unclear if it actually changes
anything...

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@denx.de>
To: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Ingo Molnar <mingo@kernel.org>, James Morse <james.morse@arm.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Matt Redfearn <matt.redfearn@imgtec.com>,
	Yves-Alexis Perez <corsac@debian.org>,
	Emrah Demir <ed@abdsec.com>, Jonathan Corbet <corbet@lwn.net>,
	"x86@kernel.org" <x86@kernel.org>,
	Len Brown <len.brown@intel.com>, Borislav Petkov <bp@suse.de>,
	Andy Lutomirski <luto@kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: Re: [PATCH v2] kaslr: allow kASLR to be default over Hibernation
Date: Thu, 14 Apr 2016 22:34:44 +0200	[thread overview]
Message-ID: <20160414203444.GC3856@amd> (raw)
In-Reply-To: <CAGXu5jKNKV2RaPCw+m3R-e7irmmP0eRBBq9RKY0mcH5A1Nsx6g@mail.gmail.com>

On Thu 2016-04-14 13:14:07, Kees Cook wrote:
> On Thu, Apr 14, 2016 at 1:01 PM, Pavel Machek <pavel@denx.de> wrote:
> > Hi!
> >
> >> Since kASLR and Hibernation can not currently coexist at runtime
> >> on x86, the default behavior was to disable kASLR by default when
> >> CONFIG_HIBERNATION was present (to retain original behavior).
> >>
> >> The behavior of kASLR on arm64 (and soon MIPS) is to be enabled by
> >> default when selected at build time. Since arm64 Hibernation does not
> >> conflict with kASLR, this fixes the hibernation argument parsing to be
> >> x86-specific. Additionally, since end users want to be able to select
> >> kASLR on x86 by default at build time, create CONFIG_RANDOMIZE_BASE_ON
> >> that is present only on x86.
> >>
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > I believe this is bad idea. arm64 shows that kaslr and hibernation can
> > coexist, and hibernation is still useful when your battery runs out.
> 
> What? I'm confused -- this patch leaves the x86 behavior as-is by
> default but allows hibernation to work with arm64. (For example, right
> now, if you boot arm64 with "kaslr" kernel argument, hibernation will
> get needlessly disabled.)

So it is very different from the PATCH v1, still it shares the
subject?

This is the part I don't like:

> >> Since kASLR and Hibernation can not currently coexist at runtime
> >> on x86, the default behavior was to disable kASLR by default when
> >> CONFIG_HIBERNATION was present (to retain original behavior).

Now I notice that it is quite unclear if it actually changes
anything...

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2016-04-14 20:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 22:16 [kernel-hardening] [PATCH v2] kaslr: allow kASLR to be default over Hibernation Kees Cook
2016-04-12 22:16 ` Kees Cook
2016-04-14 20:01 ` [kernel-hardening] " Pavel Machek
2016-04-14 20:01   ` Pavel Machek
2016-04-14 20:14   ` [kernel-hardening] " Kees Cook
2016-04-14 20:14     ` Kees Cook
2016-04-14 20:34     ` Pavel Machek [this message]
2016-04-14 20:34       ` Pavel Machek
2016-04-14 22:42       ` [kernel-hardening] " Kees Cook
2016-04-14 22:42         ` Kees Cook
2016-04-15  9:20         ` [kernel-hardening] " Ingo Molnar
2016-04-15  9:20           ` Ingo Molnar
2016-04-15 13:06         ` [kernel-hardening] " Pavel Machek
2016-04-15 13:06           ` Pavel Machek
2016-04-15 16:25         ` [kernel-hardening] " Emrah Demir
2016-04-15 16:25           ` Emrah Demir
2016-04-16 19:58           ` [kernel-hardening] " Pavel Machek
2016-04-16 19:58             ` Pavel Machek

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=20160414203444.GC3856@amd \
    --to=pavel@denx.de \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bp@suse.de \
    --cc=corbet@lwn.net \
    --cc=corsac@debian.org \
    --cc=ed@abdsec.com \
    --cc=james.morse@arm.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=len.brown@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=matt.redfearn@imgtec.com \
    --cc=mingo@kernel.org \
    --cc=rafael@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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 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.