Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4439622imc; Mon, 25 Feb 2019 05:05:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IZdHZ23t3xzO/zw0QQXUGzNLntJFjRizRki3OCkbOloK52HvRDFlcmdpR0+YgCEq9mM8th6 X-Received: by 2002:a63:2141:: with SMTP id s1mr18540795pgm.363.1551099952076; Mon, 25 Feb 2019 05:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551099952; cv=none; d=google.com; s=arc-20160816; b=jJfsL61ESzZ+nLT1p7mXl7K9seUcQE/isWEZqVPChe7rgt1TuIb6OFwMHevPc5BT8k ZwZG+2thOn9UVm7CuXsqf4Z940AvaKiUQw5L0LlLJrXc/SMZ6Dl/UgwW/nJya4qoTpQs iXTmJq8tz299GJWeJkG9qb+4BCBjsBHXa5UG9AZ9MvXDDYvzcIeNC8FCGNMCChGxmM85 0NVgXhsZ5f0QCGHK9frud7XRx8PaWXrDQ1namk/CNnXnCElDVwSDie+HDi8/+mr3o79M O0tb29BjRZvzYNoxAGaSGfyEISr9bWOJ+2qg7Luc0KXv7f2tAKlzb25UTIO+JcfRCcuE FPYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bZKbv1pyhrN3inE5ofL3QTUGIjsSGzHnEmhWXJ5v6e4=; b=z1CCEQsh0IBChU1h0WNQc4/n7/bCNKtCgntO+Hy7+ixBk3LpAH70O4upJvngQSu3QZ Wk9ZHKSpwbALclCJyjVQYdbH2JAun+XP+6zgOn5v0VnRIfRTHmO6Uo/EWCth9vfmqW0j InG0yOIVJ2QDUWITyDhTkXSp8Xv9djNOZg019rRTR07egO+ij5+BN91BMJQcJuVF+uZb DDVRwl0h7MIJ3WIg+6JSoPm2mUm3fX/mDukHe9PI1bZlAoVKbc0rN2+mclT8QrHVje2W nhhGak8l3v3DDCbcRC3mPyE2wD3rGRNOwfzKxCMFLG8fKx1s6P1lkeqAkCpJ1h0pG4TO uILw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si9011190pgf.439.2019.02.25.05.05.35; Mon, 25 Feb 2019 05:05:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbfBYNFN (ORCPT + 99 others); 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