Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp299712ima; Thu, 31 Jan 2019 17:05:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN4VSh+tx9f+HCSgcuLuia+MRTWxFSUJ+HI9PFsRFsm28h31Aw8X0aUJ+g5Mr/M/ENZ/4qUM X-Received: by 2002:a17:902:8f97:: with SMTP id z23mr37529223plo.283.1548983113289; Thu, 31 Jan 2019 17:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548983113; cv=none; d=google.com; s=arc-20160816; b=O4yihmsg1XvwZE98t8/R4KDzI8ArMU/bxfCzj5A5Po7bdsPRe6MJ9BOr6QKvD0RuKh B3fnnwLQ+JYrv9IXNnirBltQD9wHWFT9DilHmA8cbxQHqZcajWbk8hw9ksxvOVycCZc7 wH9TTZC9HhRYwN/h26upSaCJNOQJnmoCvvCu05Ma2I8ySMJh4NWOsHvyL4HGVQJp2bgC FiBVD5a2wF5OI4II0MIq683BHx2MpiMIMCBhPoUEMtBYwm8jRsM988gofISnu7cgfFZq mFsSv+bxbDnNXoHRjboWrIMZ20qUDldAVTrBPml2muCkmD/OURFzJ1uM57KC6zJeqDiE 3Nlg== 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:dkim-signature; bh=V7cFe6jdr8idNow2ocyuWL3XVGrMRuEFEUqKcnlSqoI=; b=a8vhWJVLHMp1eyMspwGKS7nsXTv1tG79RszYnfBzI0XZK5TWEG2BBcGDXeZkkeSG9H BCEUzubI8H1wojR/xLpGBa/Crplt4hosWGeS4MX1lXqsxu+S6n76VsDDtzBFwBZGVkG+ flp/LTRZbEyUj758hfCIyHzXOdbTEr77/xkIaUqfzjyYBKKEQxZwIci+lD9zvFz5QAlX RyHVnov8IfMXfSla2CqqM8Si7aeP9DWqWVZGlH0zuQ7BNyqhioewgzWJUk+F7u0HixHH suWxttcvE781+Ff0A8RHGuEsMGD+DeVLT1BqRyUyHPoQrD3nrmgwBzE3CG4caY52a4xY jK6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="dOaTz3H/"; 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=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si6089098plr.127.2019.01.31.17.04.28; Thu, 31 Jan 2019 17:05: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; dkim=pass header.i=@alien8.de header.s=dkim header.b="dOaTz3H/"; 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=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbfAaXru (ORCPT + 99 others); Thu, 31 Jan 2019 18:47:50 -0500 Received: from mail.skyhub.de ([5.9.137.197]:32836 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbfAaXru (ORCPT ); Thu, 31 Jan 2019 18:47:50 -0500 Received: from zn.tnic (p200300EC2BCC5900604F5F4DB2DDD4A2.dip0.t-ipconnect.de [IPv6:2003:ec:2bcc:5900:604f:5f4d:b2dd:d4a2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 683EC1EC00EE; Fri, 1 Feb 2019 00:47:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1548978468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=V7cFe6jdr8idNow2ocyuWL3XVGrMRuEFEUqKcnlSqoI=; b=dOaTz3H/KB9bvEBUHdhWm8XjhS5eTwvql5mpzwHwfhiX0+xL3HfGddX0aTglojdJzqUNIQ Yr6aGSVgEWF2qno+CSJlGCFd8uDAKLJZTuvflQlQPJSGzLhl8xRQskQVg3j9AV3p5W9ZmZ lT9qTtmAOfmLvCVX1wBuCdo+Q67HSmA= Date: Fri, 1 Feb 2019 00:47:40 +0100 From: Borislav Petkov To: Jerry Hoemann Cc: Dave Young , x86@kernel.org, Baoquan He , Randy Dunlap , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Pingfan Liu , Mike Rapoport , Andrew Morton , yinghai@kernel.org, vgoyal@redhat.com Subject: Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr Message-ID: <20190131234740.GO6749@zn.tnic> References: <1548047768-7656-1-git-send-email-kernelfans@gmail.com> <20190125103924.GB27998@zn.tnic> <20190125134518.GA23595@dhcp-128-65.nay.redhat.com> <20190125140823.GC27998@zn.tnic> <20190131075907.GB19091@dhcp-128-65.nay.redhat.com> <20190131105732.GC6749@zn.tnic> <20190131222732.GA946@anatevka> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190131222732.GA946@anatevka> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 31, 2019 at 03:27:32PM -0700, Jerry Hoemann wrote: > So even if a system administrator is diligent and tests > that a chosen kdump configuration works, that configuration > might not work on some random reboot 7 months in the future. Jerry, did you read the rest of the thread where I'm *actually* suggesting to make the allocation code more robust against such failures? Doesn't look like it... Now let's look at the code: The "high" allocation does: crash_base = memblock_find_in_range(CRASH_ALIGN, high ? CRASH_ADDR_HIGH_MAX : CRASH_ADDR_LOW_MAX, crash_size, CRASH_ALIGN); where high=true and CRASH_ADDR_HIGH_MAX on 64-bit is MAXMEM: # define CRASH_ADDR_HIGH_MAX MAXMEM The second fallback in the suggested patch does the same: + /* + * crashkernel=X reserve below 4G fails? Try MAXMEM + */ + if (!high && !crash_base) + crash_base = memblock_find_in_range(CRASH_ALIGN, + CRASH_ADDR_HIGH_MAX, + crash_size, CRASH_ALIGN); and yet I get back that falling back to "high" if the first allocation doesn't succeed is not something we should do by default because of reasons. But this patch *practically* *does* it. So no, until this hasn't been done cleanly and properly explained, we'll be in a holding pattern. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.