Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1054659yba; Sat, 20 Apr 2019 20:58:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlDXO90QNKj82S9gB64Chqq3SWaaKUVVjl7aVMFnUqRZXdIeH4yN3f8zVer0emXYPHeiJI X-Received: by 2002:a63:5c53:: with SMTP id n19mr12348429pgm.193.1555819094156; Sat, 20 Apr 2019 20:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555819094; cv=none; d=google.com; s=arc-20160816; b=V3qgsTNgYbnIge7a5tbiJhyzy51Jk8OaRf63O2xwl1XQt7TItIaYm0VGPOicKWNNpD dIQZ9mlBvBOYWo6Ivll1eleRN1S3QoXQIDHxxNBiiaKP70SzU4hJYyEzOGrlqjcLUTwk 8NkTfLlYb2wF3icnN0B8VIysXEv8vSDbJEVPwFuIAa3uTox6eC0klkjSh5uS4FSsnNMq wk+GtfRAqWUqiEi+TnGkPX/lHXoA4HJ35JIFzgEhVeBR0OMC1F7jg8w2QhvLBI1dzimW qPHU/z6KN3T5VXcUEfH97z5Zi5FK+3QdKWDkNO2porObjUT8JNzrt+N9/E3xg30+1LcU bTCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:subject:to:from:date :user-agent:message-id; bh=uhdu/cYQuFkftpVGOVqsqbsXSyXQQGC0mGkWXNiPhUI=; b=fsWA7lowa8p8jdnzzLwDOXq0Ks93eCuX/m5SAyU8yD3uLft8UOZydR8QuggiwUjZNf tsQNjcdE2vvpjPWEBsA9956RAWEUrmT4oGrEiE+lp4/ViT5iH95hr/iLJqmyFKX1+CxP azSkywWX/l++A1I5rQFQPFjCJ1pQlAmYRd3+hJGWRvUH/mQ1r6o2xf6oQPPAN9CZ0jmL Xbg8SRf1RYLFAAhiD5eauSDpCpZ9vxXAUZSxhw85w3ziCV576n2yQlxdDHC1MlZ0n5mW z7/rqxMKaaR01KzqSaSvawY6H6l52EDj104EJ5HJeaReIyebveIbKSJ8UqwsgPeXf58Z FGNQ== 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 v12si8918709pga.148.2019.04.20.20.57.59; Sat, 20 Apr 2019 20:58:14 -0700 (PDT) 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 S1727161AbfDUDzx (ORCPT + 99 others); Sat, 20 Apr 2019 23:55:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49056 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbfDUDzw (ORCPT ); Sat, 20 Apr 2019 23:55:52 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14E6FC057F3E; Sun, 21 Apr 2019 03:55:52 +0000 (UTC) Received: from localhost (ovpn-12-33.pek2.redhat.com [10.72.12.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22A99608A6; Sun, 21 Apr 2019 03:55:48 +0000 (UTC) X-Mailbox-Line: From dyoung@redhat.com Sun Apr 21 11:53:03 2019 Message-ID: <20190421035058.943630505@redhat.com> User-Agent: quilt/0.66 Date: Sun, 21 Apr 2019 11:50:59 +0800 From: Dave Young To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, vgoyal@redhat.com, bhe@redhat.com, piliu@redhat.com, Yinghai Lu , Eric Biederman Subject: [PATCH 1/2] X86/kdump: move crashkernel=X to reserve under 4G by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sun, 21 Apr 2019 03:55:52 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kdump crashkernel low reservation is limited to under 896M even for X86_64. This obscure and miserable limitation exists for old kexec-tools compatibility, but the reason is not documented anywhere. Some more tests/investigations about the background: a) Previously old kexec-tools can only load purgatory to memory under 2G, Eric remove that limitation in 2012 in kexec-tools: Commit b4f9f8599679 ("kexec x86_64: Make purgatory relocatable anywhere in the 64bit address space.") b) back in 2013 Yinghai removed all the limitations in new kexec-tools, bzImage64 can be loaded to anywhere. Commit 82c3dd2280d2 ("kexec, x86_64: Load bzImage64 above 4G") c) test results with old kexec-tools with old and latest kernels. 1. old kexec-tools can not build with modern toolchain anymore, I built it in a RHEL6 vm 2. 2.0.0 kexec-tools does not work with latest kernel even with memory under 896M and give an error: "ELF core (kcore) parse failed", it needs below kexec-tools fix Commit ed15ba1b9977 ("build_mem_phdrs(): check if p_paddr is invalid") 3. even with patched kexec-tools which fixes 2), it still needs some other fixes to work correctly for kaslr enabled kernels. So the situation is: * old kexec-tools is already broken with latest kernels * we can not keep this limitations forever just for compatibility of very old kexec-tools. * If one must use old tools then he/she can choose crashkernel=X@Y * people have reported bugs crashkernel=384M failed because kaslr makes the 0-896M space sparse, * crashkernel can reserve in low or high area, it is natural to understand low as memory under 4G Hence drop the 896M limitation, and change crashkernel low reservation to reserve under 4G by default. Signed-off-by: Dave Young --- arch/x86/kernel/setup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- linux-x86.orig/arch/x86/kernel/setup.c +++ linux-x86/arch/x86/kernel/setup.c @@ -71,6 +71,7 @@ #include #include #include +#include #include #include