From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751207AbdFGEfj (ORCPT ); Wed, 7 Jun 2017 00:35:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbdFGEfh (ORCPT ); Wed, 7 Jun 2017 00:35:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 055BCDF870 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bhe@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 055BCDF870 Date: Wed, 7 Jun 2017 12:35:33 +0800 From: Baoquan He To: linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Russ Anderson , Dimitri Sivanich , "travis@sgi.com" , Mike Travis , Frank Ramsay , Thomas Garnier , Kees Cook , Andrew Morton , Masahiro Yamada Subject: Re: [PATCH v2 0/2] x86/mm/KASLR: Do not adapt size of the direct mapping section for SGI UV system Message-ID: <20170607043533.GA6341@x1> References: <1495281758-11320-1-git-send-email-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1495281758-11320-1-git-send-email-bhe@redhat.com> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 07 Jun 2017 04:35:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, PING! Is there any further comment or suggetion about this patchset? Thanks Baoquan On 05/20/17 at 08:02pm, Baoquan He wrote: > This is v2 post. > > This patchset is trying to fix a bug that SGI UV system casually hang > during boot with KASLR enabled. The root cause is that mm KASLR adapts > size of the direct mapping section only based on the system RAM size. > Then later when map SGI UV MMIOH region into the direct mapping during > rest_init() invocation, it might go beyond of the directing mapping > section and step into VMALLOC or VMEMMAP area, then BUG_ON triggered. > > The fix is adding a helper function is_early_uv_system to check UV system > earlier, then call the helper function in kernel_randomize_memory() to > check if it's a SGI UV system, if yes, we keep the size of direct mapping > section to be 64TB just as nokslr. > > With this fix, SGI UV system can have 64TB direct mapping size always, > and the starting address of direct mapping/vmalloc/vmemmap and the padding > between them can still be randomized to enhance the system security. > > v1->v2: > 1. Mike suggested making is_early_uv_system() an inline function and be > put in include/asm/uv/uv.h so that they can adjust them easier in the > future. > > 2. Split the v1 code into uv part and mm KASLR part as Mike suggested. > > Baoquan He (2): > x86/UV: Introduce a helper function to check UV system at earlier > stage > x86/mm/KASLR: Do not adapt the size of the direct mapping section for > SGI UV system > > arch/x86/include/asm/uv/uv.h | 6 ++++++ > arch/x86/mm/kaslr.c | 3 ++- > 2 files changed, 8 insertions(+), 1 deletion(-) > > -- > 2.5.5 >