From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19B04C43381 for ; Mon, 25 Feb 2019 13:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D04D420842 for ; Mon, 25 Feb 2019 13:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbfBYNFN (ORCPT ); Mon, 25 Feb 2019 08:05:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31699 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbfBYNFN (ORCPT ); Mon, 25 Feb 2019 08:05:13 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD67C309304E; Mon, 25 Feb 2019 13:05:12 +0000 (UTC) Received: from localhost (ovpn-12-45.pek2.redhat.com [10.72.12.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C497D5D9CC; Mon, 25 Feb 2019 13:05:07 +0000 (UTC) Date: Mon, 25 Feb 2019 21:05:04 +0800 From: Baoquan He To: Borislav Petkov , dyoung@redhat.com Cc: Pingfan Liu , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Will Deacon , Nicolas Pitre , Chao Fan , "Kirill A. Shutemov" , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/boot/KASLR: skip the specified crashkernel reserved region Message-ID: <20190225130452.GN14858@MiWiFi-R3L-srv> References: <1551081596-2856-1-git-send-email-kernelfans@gmail.com> <20190225094522.GC26145@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190225094522.GC26145@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 25 Feb 2019 13:05:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/25/19 at 10:45am, Borislav Petkov wrote: > On Mon, Feb 25, 2019 at 03:59:56PM +0800, Pingfan Liu wrote: > > crashkernel=x@y option may fail to reserve the required memory region if > > KASLR puts kernel into the region. To avoid this uncertainty, making KASLR > > skip the required region. > > Lemme see if I understand this correctly: supplying crashkernel=X@Y > influences where KASLR would put the randomized kernel. And it should be > the other way around, IMHO. crashkernel= will have to "work" with KASLR > to find a suitable range and if the reservation at Y fails, then we tell > the user to try the more relaxed variant crashkernel=M. Hmm, asking user to try crashkernel=M is an option. Users may want to specify a region for crashkernel reservation, Just I forget in what case they want crashkernel=x@y set. In crashkernel=x@y specified case, we may truly need to avoid the already specified region. Not sure if Dave still remember it. If no need, removing it is also good. Thanks Baoquan