Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2228605imm; Mon, 16 Jul 2018 04:40:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpetloQSaEZafx9qvdW9S1Ij4kIDIuPv03w9oZDa3aoB3bqxgKP29Ps0dhVyxMYgak7rz89t X-Received: by 2002:a17:902:246a:: with SMTP id m39-v6mr16377097plg.141.1531741214964; Mon, 16 Jul 2018 04:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531741214; cv=none; d=google.com; s=arc-20160816; b=dEJelBo98nscjLnEWcc1B29dsKiWxu3W6CHQFzx5KsNNt+A1IliIzvEboAv6Ikfwbp JycNT9Xxfrd/zLCx2Q5ZoP88EYftTl/OQKtuYFXvth4PuwLsBXOxfvRd0W1wbJRleun0 NDpX6rxNcvANnGcQK/bB7jrwJE+fbvwUHymI4mWIhecH1nNqXn0HoQpVTOEHT3m2b+49 GfNE8I2fct04+28ZgCn7oBoMywElra4irWs76yXZFf9GwTM+r64bItTY23eihcZ+srbJ 4FjNTgn+NArwxp4nc8f1QqGA6LHB8EyD1kILKSYB0Bek/KIPN8f3GIJwOEi+WLcPB8tu 0rwg== 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:arc-authentication-results; bh=o6WZfvjhzlHf4BbEcaRP4RoRtE0kJqCtvhURrtiYAiI=; b=pMdYTH1kMF4Dro49p3MetKPlTx5l8Gkz9ppWOoRWKMywFMMi2UhQehRDhYRlgzJ+W5 OWPpxIcv94dEkz1eXQiBWJfOPPGc3LfSMirbTr+UO8Oyrv1jsB8teyJqja4QgMQHDSYv dbxP8Z71UA3ggQ+Thn4DGZd+afLJujm9VxMWeGC1FsRRtHExo/ZzHmBWZKvk74sDQKki 6qapQoP6Xvk7g4R3krcauKF7UkybRy41OuzwJyv8uwVQUtVdbVj1bKXehkgKxxThHyrZ bZpr1NfgrqA4oz2ixxlKv7xLhBYPMUfq28dABX59CKMFYABU0lTofjUyZC6OySce1/KX qjgg== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59-v6si30583729plf.500.2018.07.16.04.40.00; Mon, 16 Jul 2018 04:40: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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730897AbeGPMFt (ORCPT + 99 others); Mon, 16 Jul 2018 08:05:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:53802 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728833AbeGPMFt (ORCPT ); Mon, 16 Jul 2018 08:05:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 65715AD54; Mon, 16 Jul 2018 11:38:46 +0000 (UTC) Date: Mon, 16 Jul 2018 13:38:45 +0200 From: Michal Hocko To: Baoquan He Cc: Chao Fan , Dou Liyang , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org, yasu.isimatu@gmail.com, keescook@chromium.org, indou.takao@jp.fujitsu.com, caoj.fnst@cn.fujitsu.com, vbabka@suse.cz, mgorman@techsingularity.net Subject: Re: Bug report about KASLR and ZONE_MOVABLE Message-ID: <20180716113845.GM17280@dhcp22.suse.cz> References: <20180711094244.GA2019@localhost.localdomain> <20180711104158.GE2070@MiWiFi-R3L-srv> <20180711104944.GG1969@MiWiFi-R3L-srv> <20180711124008.GF2070@MiWiFi-R3L-srv> <72721138-ba6a-32c9-3489-f2060f40a4c9@cn.fujitsu.com> <20180712060115.GD6742@localhost.localdomain> <20180712123228.GK32648@dhcp22.suse.cz> <20180712235240.GH2070@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180712235240.GH2070@MiWiFi-R3L-srv> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 13-07-18 07:52:40, Baoquan He wrote: > Hi Michal, > > On 07/12/18 at 02:32pm, Michal Hocko wrote: [...] > > I am not able to find the beginning of the email thread right now. Could > > you summarize what is the actual problem please? > > The bug is found on x86 now. > > When added "kernelcore=" or "movablecore=" into kernel command line, > kernel memory is spread evenly among nodes. However, this is right when > KASLR is not enabled, then kernel will be at 16M of place in x86 arch. > If KASLR enabled, it could be put any place from 16M to 64T randomly. > > Consider a scenario, we have 10 nodes, and each node has 20G memory, and > we specify "kernelcore=50%", means each node will take 10G for > kernelcore, 10G for movable area. But this doesn't take kernel position > into consideration. E.g if kernel is put at 15G of 2nd node, namely > node1. Then we think on node1 there's 10G for kernelcore, 10G for > movable, in fact there's only 5G available for movable, just after > kernel. OK, I guess I see that part. But who is going to use movablecore along with KASLR enabled? I mean do we really have to support those two obscure command line parameters for KASLR? In fact I would be much more concerned about memory hotplug and pre-defined movable nodes. Does the current KASLR code work in that case? -- Michal Hocko SUSE Labs