Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp120655img; Mon, 25 Feb 2019 19:09:36 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibcz/Km0IhA6vQGbkKAd8qu9Rti0gdqjAvXMhMY4poD1h61DUtkk0x6B3Ymxh9u3YeNj3ce X-Received: by 2002:aa7:8243:: with SMTP id e3mr9484483pfn.40.1551150576613; Mon, 25 Feb 2019 19:09:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551150576; cv=none; d=google.com; s=arc-20160816; b=efNm29dtHd9dVPQBJFyRwr1Qs+qA5sZEefbaOcPuCVwck2CDbGVZllwDFbGB3BMWw/ /EWvvQTLc9FREqdn+3ulmcjm3O5ut/hL8R1+dYo8zjDxG4AH+eXITOBBKxz/qRdaxEZl zvZPkwGZJFjgRfOwXnELmV8KIubL+b/U1xTDSNfTjyRgnvTzjJvNIDwxp9URmVUPi/M1 YfV9hcZbHqeytmHwXA2IJadZPwqX5SQGON2287ylL6slSZBrjCdkqNWsO2qMPbyW3PTV bZ7jpRYQlEyjpfKfe9fcSEda8pWCcdkTvWLWPz4r7OA32G4i6NaMJpLF9fNgmPDGdtJV rNxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QrVuMGJ672M75OLe5IMZvP3xNwwtC0OfvA+VYUx4w/s=; b=WmGeFj5BViXh7AN9Ec03hsi3J8MshOy+hB6yuB046xeml35y3l3z15ZnGqH9h7o5rw g+mIne84VDsSGJFqx4HKelgtU87uyHDJr6gIzbwyVVfgRxmH3+rKXRoad+3CsTIludR3 sUBNShfAlQcO04eiN5RB2wRaLrFNhqz2B+IPc3RCB2uzRHN14q+lHL4TZ/1j55Fw6Ma4 eZTeZdVPy5xK7kivXT7V7kC0v0TBiYiOC3mSx9Dr1UYm0w71HgZEtEp9bfIXyZhJc4sd OKZartBY7XWVf3bHaLBnBQzHIABppbNsuieST/JaiWP19oMFZ6qLMMZSL4qPZwJbUxm0 N6GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dw5s3xw9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si1459309plx.421.2019.02.25.19.09.21; Mon, 25 Feb 2019 19:09:36 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Dw5s3xw9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726275AbfBZDIz (ORCPT + 99 others); Mon, 25 Feb 2019 22:08:55 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:46499 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfBZDIy (ORCPT ); Mon, 25 Feb 2019 22:08:54 -0500 Received: by mail-io1-f65.google.com with SMTP id k21so9329841ior.13 for ; Mon, 25 Feb 2019 19:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QrVuMGJ672M75OLe5IMZvP3xNwwtC0OfvA+VYUx4w/s=; b=Dw5s3xw9drkFLFHuHW73GWhnABEzlNGHOAjgZbydTCDtq1jUpZJJGucKYzxieDVQol JQ/2cUyk5Xq8w1b1hqn9UcQxk8LZLU3Wda7RV3rD3cU0ClN6PladenA+A4FIg/3NAYRf U4pQYUqx3kiQGgvbh+txBHfPs8bmsppq0wA8Vup26hEywkqIoM9bZU4N1ey1sXR0hGtT NucC2MYf6bed3+xQduaj3ThvAtmg/vNVXKtX3kwYLUmkhVdMSb/caHsPp/+I5Xf92hc6 XqLhWtshSZjB6juyNIkYQbhG/gTPufIvqJnVddhI/KKcWimpK3huq0/LAfK/Vn/j1XeZ 8o8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QrVuMGJ672M75OLe5IMZvP3xNwwtC0OfvA+VYUx4w/s=; b=macNwA1FGwtmvETvRx69R3wxrgDDEtH0KqltP4PV5ptb5SropXLA6k2fWLtPsHzaVJ vy3cBhsIcyrLfc2cni3HvIHyAIHT8/sab1oaHneRNijx0PFRklhU/YYi/VbJ/jhK/7Le Or7m+Rk2KAhP9Yrc3TKOTj3kOYsR9Ok8yy4KfAXjeTRxgaGuvulJQ/hmrJOqzlyUKhw/ J/L76DO8Vgwkd8vrcaDgy+yyi4OS9bj/0uRQ8D+kbcMMOsYZf17tTCNLwOZRTZVbQqt7 vXXBdaTXo5j+043si+IkjKGiuZ3b3bmMpWGYpnSAfgY/Wey2SqY5zvrQdSeCfaoh1Uqx Cc+Q== X-Gm-Message-State: AHQUAuYXDzdm7h4gO0KgBctEbpWhX6/hI2pGBxxcFWUB9dPXJrXmk/MD b6u/AwxQHuSUp9m5Jj/EO3d2d18cgrcYExorIQ== X-Received: by 2002:a6b:ca87:: with SMTP id a129mr10449779iog.281.1551150533602; Mon, 25 Feb 2019 19:08:53 -0800 (PST) MIME-Version: 1.0 References: <1551081596-2856-1-git-send-email-kernelfans@gmail.com> <20190225094522.GC26145@zn.tnic> In-Reply-To: <20190225094522.GC26145@zn.tnic> From: Pingfan Liu Date: Tue, 26 Feb 2019 11:08:42 +0800 Message-ID: Subject: Re: [PATCH] x86/boot/KASLR: skip the specified crashkernel reserved region To: Borislav Petkov Cc: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Baoquan He , Will Deacon , Nicolas Pitre , Chao Fan , "Kirill A. Shutemov" , Ard Biesheuvel , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 25, 2019 at 5:45 PM 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 Yes, you get it. > 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. > I follow Baoquan's opinion. Due to the randomness caused by KASLR, a user may be surprised to find crashkernel=x@y not working sometime. If kernel can help them out of this corner automatically, then no need to bother them with the message to use alternative method crashkernel=M. Anyway it is a cheap method already used by other options like hugepages and memmap in handle_mem_options(). If commitment, then do it without failure. Or just removing crashkernel=x@y option on x86. Thanks and regards, Pingfan > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.