Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp521903ybi; Fri, 7 Jun 2019 11:58:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZwG6f0iVHVpSI4cv9ZzZhgDP29q667/OJIf+1rwhAczWeuQmmNBIe4qyb5oG4PPByRkj7 X-Received: by 2002:a17:90a:c481:: with SMTP id j1mr7401718pjt.96.1559933917983; Fri, 07 Jun 2019 11:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559933917; cv=none; d=google.com; s=arc-20160816; b=aFIx7wV9DBwimpIUxV3Cvm/7LhwlJ5KNeRhO7GCJQa76LBrvcfNxlpCCn2w7g4chbR 4GI1O/dT16gt3A3JdjtYPmg4MwG9UMi+Q62RupAiwp4W3FtyXcmvzBtdpcb7sijU7uWa JcEjVTuzmvUm+ii453r4FPvLTAznoC1dk/2iH1h/+ZtkKSL4xwh6fVWACoQcs6TT2TJZ VNGbSJ0seyWKENDRzDaRq9krra3jCBBHXtDzWJ14SO2OeboRQu8SFdzouy+QD/j57w1d ry2RQHmnadJNEj84gXHwPekmCxcqx+t3CP8O9hd8qJqXbVbzlSFXNE6B1PqyF00zK+L0 B5Tg== 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=T0oiUeJJ4yH6JALjOP9aRLwwDXx5xLU0ccWzcZC6ki4=; b=KPqJEcFrJJ/zoL/ainZ0UGTPhqkfJSvfThJOQQUq3LZHQXTT1A2ldM+/UP+J0RSDym vSBX7VFQJSL8crM24mvuYtbWswSVOvyvHP8haBKtjuyiypTCUqwX31naQNXBDy7a49vy hqtEnOgfGxOXGcAgfM28jXcJepYznl5XuDoKipr4ZUpM16ElEwp7OSfxKGLGQ0w8jIEp DRF7yDChfiWjP80LZezjylbZhF9/RX4DuSBjZ5qZs7yguhmqCVgRqtSSFX5sY8WuDpdu dj6O6pj79UCNiBRFuBhiSmr9wPPpeLr208wOboLDRvLPxzc/zn+lrMrwtvXUR0pauZ6S qQSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=g+D00ICT; 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 f17si2133474pjq.14.2019.06.07.11.58.21; Fri, 07 Jun 2019 11:58:37 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=g+D00ICT; 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 S1730432AbfFGRaS (ORCPT + 99 others); Fri, 7 Jun 2019 13:30:18 -0400 Received: from mail.skyhub.de ([5.9.137.197]:38676 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729355AbfFGRaR (ORCPT ); Fri, 7 Jun 2019 13:30:17 -0400 Received: from zn.tnic (p200300EC2F066300951FA2F4E0AD5C5F.dip0.t-ipconnect.de [IPv6:2003:ec:2f06:6300:951f:a2f4:e0ad:5c5f]) (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 5767C1EC0997; Fri, 7 Jun 2019 19:30:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1559928616; 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=T0oiUeJJ4yH6JALjOP9aRLwwDXx5xLU0ccWzcZC6ki4=; b=g+D00ICTFdwzwW2g2mw6pYLS2tw6CFd78aj88RlbG+UudJFX5v1G2Qr50L2t370gSzDuah fbf1AxA1DawepNa5oYEDfZWdYREuWnV0rHFi2VZ3k1whhodsJAZip5vYDtMhH8QziCP7+l EYhRUyv7hXiaT2CQkn/t6NX+JFZ2ngU= Date: Fri, 7 Jun 2019 19:30:16 +0200 From: Borislav Petkov To: Dave Young , Pingfan Liu Cc: kexec@lists.infradead.org, Baoquan He , Andrew Morton , Mike Rapoport , yinghai@kernel.org, vgoyal@redhat.com, Randy Dunlap , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr Message-ID: <20190607173016.GM20269@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> <20190128095809.GC3732@dhcp-128-65.nay.redhat.com> <20190128101831.GA27154@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190128101831.GA27154@zn.tnic> 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 Mon, Jan 28, 2019 at 11:18:31AM +0100, Borislav Petkov wrote: > On Mon, Jan 28, 2019 at 05:58:09PM +0800, Dave Young wrote: > > Another reason is in case ,high we will need automatically reserve a > > region in low area for swiotlb. So for example one use > > crashkernel=256M,high, actual reserved memory is 256M above 4G and > > another 256M under 4G for swiotlb. Normally it is not necessary for > > most people. Thus we can not make ,high as default. > > And how is the poor user to figure out that we decided for her/him that > swiotlb reservation is something not necessary for most people and thus > we fail the crashkernel= reservation? > > IOW, that "logic" above doesn't make a whole lot of sense to me from > user friendliness perspective. So to show what I mean: I'm trying to reserve a crash kernel region on a box here. I tried: crashkernel=64M@16M as it is stated in Documentation/kdump/kdump.txt. Box said: [ 0.000000] crashkernel reservation failed - memory is in use. Oh great. Then I tried: crashkernel=64M@64M Box said: [ 0.000000] crashkernel reservation failed - memory is in use. So I simply did: crashkernel=64M and the box said: [ 0.000000] Reserving 64MB of memory at 3392MB for crashkernel (System RAM: 16271MB) So I could've gone a long time poking at the memory to find a suitable address. So do you see what I mean with making this as user-friendly and as robust as possible? In this case I don't care about *where* my crash kernel is - I only want to have one loaded *somewhere*. And the same strategy should be applied to other reservation attempts - we should try hard to reserve and if we cannot reserve, then try an alternating range. I even think that crashkernel=X@Y should not simply fail if Y is occupied but keep trying and say [ 0.000000] Reserving 64MB of memory at alternative address 3392MB for crashkernel (System RAM: 16271MB) and only fail when the user doesn't really want the kernel to try hard by booting with crashkernel=X@Y,strict But that's for another day. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.