From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH v2] kaslr: allow kASLR to be default over Hibernation Date: Thu, 14 Apr 2016 22:34:44 +0200 Message-ID: <20160414203444.GC3856@amd> References: <20160412221659.GA18102@www.outflux.net> <20160414200102.GB3856@amd> Reply-To: kernel-hardening@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Content-Disposition: inline In-Reply-To: To: Kees Cook Cc: Linus Torvalds , "Rafael J. Wysocki" , Ingo Molnar , James Morse , Ard Biesheuvel , Matt Redfearn , Yves-Alexis Perez , Emrah Demir , Jonathan Corbet , "x86@kernel.org" , Len Brown , Borislav Petkov , Andy Lutomirski , "linux-doc@vger.kernel.org" , Linux PM list , LKML , "kernel-hardening@lists.openwall.com" List-Id: linux-pm@vger.kernel.org On Thu 2016-04-14 13:14:07, Kees Cook wrote: > On Thu, Apr 14, 2016 at 1:01 PM, Pavel Machek 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 > > > > 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