Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753900AbcDFVrJ (ORCPT ); Wed, 6 Apr 2016 17:47:09 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36684 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753318AbcDFVrI (ORCPT ); Wed, 6 Apr 2016 17:47:08 -0400 Date: Wed, 6 Apr 2016 22:49:55 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Yves-Alexis Perez , "kernel-hardening@lists.openwall.com" , Kees Cook , Emrah Demir , Dan Rosenberg , Dave Jones , Linux Kernel Mailing List , Pavel Machek Subject: Re: [kernel-hardening] Re: [PATCH] KERNEL: resource: Fix bug on leakage in /proc/iomem file Message-ID: <20160406204955.GA23336@gmail.com> References: <1459947782-5071-1-git-send-email-ed@abdsec.com> <5e5e7c7ced7bede343530ed1447d7453@abdsec.com> <1459968792.2818.22.camel@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1190 Lines: 30 * Linus Torvalds wrote: > So yeah, maybe swap partitions are still more common than I thought. And I > didn't even consider the possibility that people would hibernate a desktop like > you do. Also many distros will hibernate automatically on critically low battery (when suspend won't save the system). It would be much better to fix the kASLR/hibernation incompatibility ... Just a random guess: much of the hibernation incompatibility comes from the fact that on hibernation bootups the kASLR seed changes, which breaks hibernated kernel addresses, right? That should be easy to fix: if we added a kaslr_seed=xyz boot option, and added that parmeter automatically (without showing it in /proc/cmdline ;-) on hibernation bootups, we could solve much of the incompatibility, right? This means that the first 'cold' bootup would set the kASLR seed - and subsequent hibernated bootups would inherit it. That should be perfectly OK as long as we don't expose the seed somewhere. We could also write the kASLR seed to the hibernation image, but I don't think we have the value available early enough - a boot option is better. Thanks, Ingo