From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753038AbaFMKvl (ORCPT ); Fri, 13 Jun 2014 06:51:41 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:50832 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbaFMKvi (ORCPT ); Fri, 13 Jun 2014 06:51:38 -0400 Date: Fri, 13 Jun 2014 12:51:35 +0200 From: Pavel Machek To: Kees Cook Cc: "H. Peter Anvin" , LKML , Randy Dunlap , Thomas Gleixner , Ingo Molnar , "x86@kernel.org" , "Rafael J. Wysocki" , Len Brown , Wei Yongjun , "linux-doc@vger.kernel.org" , linux-pm@vger.kernel.org Subject: Re: [PATCH 0/2] make kASLR vs hibernation boot-time selectable Message-ID: <20140613105135.GA4876@amd.pavel.ucw.cz> References: <1402602419-27934-1-git-send-email-keescook@chromium.org> <539A0422.9010000@zytor.com> <539A0DC2.1010203@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > >>> Any way we can make them work together instead? > >> > >> I'm sure there is, but I don't know the solution. :) > >> > >> At the very least this gets us one step closer (we can build them together). > >> > > > > But it is really invasive. > > Well, I don't agree there. I actually would like to be able to turn > off hibernation support on distro kernels regardless of kASLR, so I > think this is really killing two birds with one stone. > > > I have to admit to being somewhat fuzzy on what the core problem with > > hibernation and kASLR is... in both cases there is a set of pages that > > need to be installed, some of which will overlap the loader kernel. > > What am I missing? > > I don't know how resume works, but I have assumed that the newly > loaded kernel stays in memory and pulls in the vmalloc, kmalloc, > modules, and userspace memory maps from disk. Since these things can > easily contain references to kernel text, if the newly loaded kernel > has moved with regard to the hibernated image, everything breaks. > IIUC, this is similar why you can't rebuild your kernel and resume > from a different version. x86-64 can resume from different kernel that did the suspend. kASLR should not be too different from that. (You just include kernel text in the hibernation image. It is small enough to do that.) Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html