Received: by 10.213.65.16 with SMTP id m16csp268101imf; Mon, 12 Mar 2018 03:12:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELsFMztuLe99jgig1ZGeCp05XcRytif/4PUpEGIk1Uv4UDn14Qv2RMYv3Lp3f619AsTxrUo0 X-Received: by 10.98.163.67 with SMTP id s64mr7461088pfe.67.1520849548075; Mon, 12 Mar 2018 03:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520849548; cv=none; d=google.com; s=arc-20160816; b=P+phqOkbKjNlQ2ZoIfirwEV6DOGSgUtVbZ07Dms+sTVEPi81IyXf6nT3WfBYE26UNI kGK0mColCG1ac7v7dqdJAohfDMVnUPRyC6SP661P97b5au6LLYbqh/84YhY5wHR3Pb01 7+xC2wIUz238jxKVFvSW0I7AmVxca6/sx3rgTvpqQSAlLfBn+tLiBqh+JrLw8kymgZC+ xuN9ReQgOUag0Q8WL1GzYsk/YIS97Od1/5+iGB7LZ8Ex7Vki3uVjId2nXzVJssXrKUfY sFH+RDN7jjoBX/TsC5bOVqbTd72AicQhUak+YTQpyjgwgq+giiwyjjqjnfDas3PfSrHQ Se7Q== 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=5g95oDUICy9Nug8K+Go7EYLuMkcemieJzOmQUiwQ980=; b=I8FG1TfMSuN5dO56N5RMW+IoMGCwSPFdOyMwBiDAUJxPD/81aDHKBaOLS69ddlAOwg 1ql0g9VqVBOqHQ6vCNgzb2zlZ1UW4GWiwmzhOhfyAkVlZcN+QXzVbijMaR0DEVebeH39 3LhCXTKWPJkHY6J0TR72tE3QxOGTkpcQTRS5ywsP/VC3z6nY/C66FjUOxOaY1trcx8ih sYD5QST2h99pf6Yqs3Z5cg1eNgFSTQgYlWNzQbmNIg3h42la8hAibPDnY64mCxncx0Hc CKD4lVKZd0v3ylcDJCDLhw2U9XMDm6CpeCrokmhzLWALiw5kfht/4Vw0M5xTBe3R1mpH 0NVA== 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 18si5539482pfj.366.2018.03.12.03.12.14; Mon, 12 Mar 2018 03:12:28 -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 S1752647AbeCLKKh (ORCPT + 99 others); Mon, 12 Mar 2018 06:10:37 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37840 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752096AbeCLKKg (ORCPT ); Mon, 12 Mar 2018 06:10:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 718A7401DEAB; Mon, 12 Mar 2018 10:10:35 +0000 (UTC) Received: from localhost (ovpn-8-17.pek2.redhat.com [10.72.8.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B6812026E03; Mon, 12 Mar 2018 10:10:33 +0000 (UTC) Date: Mon, 12 Mar 2018 18:10:31 +0800 From: Baoquan He To: Ingo Molnar Cc: Chao Fan , linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, keescook@chromium.org, yasu.isimatu@gmail.com, indou.takao@jp.fujitsu.com, lcapitulino@redhat.com Subject: Re: [PATCH v9 0/5] x86/KASLR: Add parameter kaslr_boot_mem=nn[KMG]@ss[KMG] Message-ID: <20180312101031.GH18656@localhost.localdomain> References: <20180228105105.11487-1-fanc.fnst@cn.fujitsu.com> <20180312093557.gxypr66vrbftz3v3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312093557.gxypr66vrbftz3v3@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 12 Mar 2018 10:10:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 12 Mar 2018 10:10:35 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'bhe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ingo, On 03/12/18 at 10:35am, Ingo Molnar wrote: > > * Chao Fan wrote: > > > Long time no reply, rebase the patchset, change the parameter name > > from 'kaslr_mem' to 'kaslr_boot_mem'. There's no more code change. > > > > ***Background: > > People reported that kaslr may randomly chooses some positions > > which are located in movable memory regions. This will break memory > > hotplug feature. > > [...] > > > ***Solutions: > > Introduce a new kernel parameter 'kaslr_boot_mem=nn@ss' to let users to > > specify the memory regions where kernel can be allowed to randomize > > safely. > > Manual solutions like that are pretty suboptimal to users, aren't they? > > In what way does memory hotplug feature 'break'? Does it crash or misbehave? Or > simply does it not allow the movement of the affected memory region, while still > allowing the rest to be moved? AFAIT, if kernel is randomized into the movable memory region, the affected memory region can not be hot added/removed since it has kernel data. Surely, the system can still work, the unaffected part still can be moved. Still it will cause regression on memory hotplug. Mainly we parse SRAT table to get the ranges of memory provided by hot-added memory devices in initmem_init(), that's very late. During boot, we don't know it. Chao ever posted patches to grab SRAT at decompressing stage, the code is very complicated and not elegant, ACPI maintainer NACKed that. Thanks Baoquan