Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp197870img; Mon, 25 Feb 2019 21:13:13 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia0ADLHr+cr0H08n2M7Gxwstg7fi5VOznwJzuAx52OClWoFIvr4yxDGWWrH+aJOaNRiOWpp X-Received: by 2002:a63:2d43:: with SMTP id t64mr22482567pgt.155.1551157993258; Mon, 25 Feb 2019 21:13:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551157993; cv=none; d=google.com; s=arc-20160816; b=scMJvixquZUMsktvDfUGGj3ep4+dSvO8IyJJAmeKixKgc5AgTdrTEVMyHeXB3MDdbp UKm4XNBJkY3ymhq5iCodf00EGy5W1G4Yzvq0FO6lu5tIoe8ieNnEngvyT9JNhTiSDcpE RuNggQIQdec4gR6Fmzs46QGMM0NzLl1AY1hM+2kWuc3w9M0luk6+Nhr6bAYzKP1fA/2S NfAGzorDvEVFbKypQfAt7ZSVsNI/Q+FkqyoLvjywcTPzM/Jj0PuGCuDlIK5h08tcPC4I YZR0jYqv2GJojCxQBp3OUqt4X3gMQSyBas5J6QKjnXGbXvgbkt82WhPc0o1z7hyzVPSP 1Ciw== 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=G3nV5UliG3V2V++93g9tl6o4wNm4U2lpd5cTgdopvUE=; b=xXPCC3I9F1cYKK503SwvoRI9L3qv5fvFWF0uHAKHHtF/lbVxDUcQLj8xigke1a9Tfj 4pZ6wxBaeSEguJuu/WV3JfaVO9/TqubuqHU69iH+Nr6gd5RPawlfdf2HS//fi33807s3 SmnRlEAWIGPjOO0AnYw5z0IgXyW/laKRysJX+QtjzLe3xLdP8vZtf7bbeg3yf06fyUaQ K2iW/+XMe9/ZLqQi0q187yLCdJeuTzTYnBD8u9cDwwByYCw6UpddZm5YSDtnqvls4pOb qH6VmCc2lPHFprbAvFgBFQ7s7VD/xB9D/eTYVPDeVGQjDQSWOoJw8pfl43QO+81DqqEb r0oQ== 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 62si8448068pla.154.2019.02.25.21.12.58; Mon, 25 Feb 2019 21:13:13 -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 S1726063AbfBZFL2 (ORCPT + 99 others); Tue, 26 Feb 2019 00:11:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbfBZFL1 (ORCPT ); Tue, 26 Feb 2019 00:11:27 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8C858FF4C; Tue, 26 Feb 2019 05:11:27 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-91.pek2.redhat.com [10.72.12.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 831D827CC6; Tue, 26 Feb 2019 05:11:21 +0000 (UTC) Date: Tue, 26 Feb 2019 13:11:17 +0800 From: Dave Young To: Baoquan He Cc: Borislav Petkov , 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: <20190226051117.GA5085@dhcp-128-65.nay.redhat.com> References: <1551081596-2856-1-git-send-email-kernelfans@gmail.com> <20190225094522.GC26145@zn.tnic> <20190225130452.GN14858@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190225130452.GN14858@MiWiFi-R3L-srv> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 26 Feb 2019 05:11:27 +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 09:05pm, Baoquan He wrote: > 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. I do not know the exact use cases, but long time ago the kernel is not relocatable this might be a reason. Even now, there could be some non linux use cases, if the loaded binary is not relocatable then the param is still useful. Also this is a general param instead of x86 only, some other arches still use it, and no crashkernel=X implemented. Thanks Dave