Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423371AbbD2O5D (ORCPT ); Wed, 29 Apr 2015 10:57:03 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39340 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423258AbbD2O4z (ORCPT ); Wed, 29 Apr 2015 10:56:55 -0400 Date: Wed, 29 Apr 2015 16:56:54 +0200 (CEST) From: Jiri Kosina To: Josh Poimboeuf cc: x86@kernel.org, Borislav Petkov , Kees Cook , Seth Jennings , Vojtech Pavlik , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH 2/2] livepatch: x86: make kASLR logic more accurate In-Reply-To: <20150428120902.GB16487@treble.redhat.com> Message-ID: References: <20150428120902.GB16487@treble.redhat.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1453 Lines: 36 On Tue, 28 Apr 2015, Josh Poimboeuf wrote: > On Mon, Apr 27, 2015 at 04:28:58PM +0200, Jiri Kosina wrote: > > We give up old_addr hint from the coming patch module in cases when kernel > > load base has been randomized (as in such case, the coming module has no > > idea about the exact randomization offset). > > > > We are currently too pessimistic, and give up immediately as soon as > > CONFIG_RANDOMIZE_BASE is set; this doesn't however directly imply that the > > load base has actually been randomized. There are config options that > > disable kASLR (such as hibernation), user could have disabled kaslr on > > kernel command-line, etc. > > > > The loader propagates the information whether kernel has been randomized > > through bootparams. This allows us to have the condition more accurate. > > > > On top of that, it seems unnecessary to give up old_addr hints even if > > randomization is active. The relocation offset can be computed using > > kaslr_ofsset(), and therefore old_addr can be adjusted accordingly. > > > > Signed-off-by: Jiri Kosina > > Acked-by: Josh Poimboeuf Applied to for-4.2/kaslr. Thanks, -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/