From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752958AbcDOQ6c (ORCPT ); Fri, 15 Apr 2016 12:58:32 -0400 Received: from bumble.birch.relay.mailchannels.net ([23.83.209.25]:47442 "EHLO bumble.birch.relay.mailchannels.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933AbcDOQ6a (ORCPT ); Fri, 15 Apr 2016 12:58:30 -0400 X-Sender-Id: wwwh|x-authuser|ed@abdsec.com X-Sender-Id: wwwh|x-authuser|ed@abdsec.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|ed@abdsec.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1460737521615:3038459462 X-MC-Ingress-Time: 1460737521614 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 15 Apr 2016 12:25:19 -0400 From: Emrah Demir To: Kees Cook Cc: Pavel Machek , Linus Torvalds , "Rafael J. Wysocki" , Ingo Molnar , James Morse , Ard Biesheuvel , Matt Redfearn , Yves-Alexis Perez , 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, keescook@google.com Subject: Re: [PATCH v2] kaslr: allow kASLR to be default over Hibernation In-Reply-To: References: <20160412221659.GA18102@www.outflux.net> <20160414200102.GB3856@amd> <20160414203444.GC3856@amd> Message-ID: User-Agent: Roundcube Webmail/1.0.6 X-AuthUser: ed@abdsec.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-04-14 18:42, Kees Cook wrote: > On Thu, Apr 14, 2016 at 1:34 PM, Pavel Machek wrote: >> 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. >>> > >>> > 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 what about making new kernel parameters. "hibernate" and "nohibernate" This way before decompression it will look at the parameters and depend on parameters it will act differently "kaslr" "nohibernate" --> kASLR will enable, no hibernate "nokaslr" "nohibernate" --> Neither of them will work "kaslr" "hiberante" ---> Owner has to face consequences(ARM has advantages) "nokaslr" "hibernate" ---> kASLR disabled and hibernate will works. Before writing something I want to know your ideas. -Emrah