Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4558679ybi; Tue, 30 Jul 2019 04:12:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDU7dFfkLnB7BqPZB/3nHYV2b6LSAAEbPG1zGBswVcTn7kf3fc6ze6uv9Fjm/dfoktxSax X-Received: by 2002:a17:902:3103:: with SMTP id w3mr116810663plb.84.1564485171233; Tue, 30 Jul 2019 04:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564485171; cv=none; d=google.com; s=arc-20160816; b=CcjndxaWeXrTNuE2o+5xnTVB7qheviUrRRfyRbAHbwguNxU6Xcl/X9u4wb0KlBdcme 7PqqLGR1jaXvrYwX8h6VRRnVEqueSAibXEDJV9vyhlT7nEkLpx0/nalgTVBUhuKV60ff O6kBTVVGl2JVBRlPXeQ2czs09mZ9qMNVgAdn0qQlCEdnvRk6riIEzGhYT3c7oSctmvC8 qO4KVgl3S+zy79XaC+c6KDcGR9UM5FgCpJ+7QjtRYWiphs7hG+rWXALywrgbSNrKxtdP Ghyr8WUjXRIX7NtTCG7Lwz+ka0ZkV+PiPrFEk+ox5yy+ehsBiYlklJVrQ33Q86RX0P27 +iag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zrJuLYMZl8yMmLQ5arOArSoM6UnoE7nwuZhDCSwICX0=; b=ERQc5QOxHx1Hzqkg4sh7odHJXzvbjJiIV8tz04UaUgjavuqxxEWKFAzdc4eqXjKRLm D7HHWSZnvccIt6aNTDtaBCRHv/e5nhWbtciDVWUqS7G1nOEa7DJ/9WtYpt/R2NOogj7U 5ndUdUTrZZW8ui6fBYfOjCpzepu89oaLIw/fzOvHVutfiLq4cT/snA3Rm0TltBb6gdO9 TGcUu9uBu/4OAvujChvHXxU68I7RnJJQoaJ/WoqluZZcGen46wnwzJnE5IPRXynxGQxz 90AZ0ayWISeNV2lx23CB7dPJ6tKvM9PuHqZdXXpReSIlRpNXc4REbeTE3sz/QLNM3XVX S3ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=TZx1YxNl; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb11si29773275plb.100.2019.07.30.04.12.36; Tue, 30 Jul 2019 04:12:51 -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=@c-s.fr header.s=mail header.b=TZx1YxNl; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbfG3JZT (ORCPT + 99 others); Tue, 30 Jul 2019 05:25:19 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:6815 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728874AbfG3JZT (ORCPT ); Tue, 30 Jul 2019 05:25:19 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 45yWP822ftz9v4h5; Tue, 30 Jul 2019 11:25:16 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=TZx1YxNl; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 2dAfY6oCGoGF; Tue, 30 Jul 2019 11:25:16 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 45yWP80hbTz9v4gw; Tue, 30 Jul 2019 11:25:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1564478716; bh=zrJuLYMZl8yMmLQ5arOArSoM6UnoE7nwuZhDCSwICX0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=TZx1YxNl+aHzIHCeqfmgQSCd37IikeHQti8c8Fz4QiJ6R+8tmJ1SHzF52QfxLtJ7a Jc9Jgy6ywynV3j+rHAxx2wHaH7ltod/8M33uPbFB23wrwhmxyKJSSr58SR2MpAC9jj CNopfNTl5IWzOVK1RX/lo3kMNNv/gA904RkCznsI= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 34B238B800; Tue, 30 Jul 2019 11:25:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id OL1JeO5h3g0d; Tue, 30 Jul 2019 11:25:17 +0200 (CEST) Received: from [172.25.230.101] (po15451.idsi0.si.c-s.fr [172.25.230.101]) by messagerie.si.c-s.fr (Postfix) with ESMTP id F2E5F8B74F; Tue, 30 Jul 2019 11:25:16 +0200 (CEST) Subject: Re: [PATCH v2 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c To: Jason Yan , mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, diana.craciun@nxp.com, benh@kernel.crashing.org, paulus@samba.org, npiggin@gmail.com, keescook@chromium.org, kernel-hardening@lists.openwall.com Cc: linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com, yebin10@huawei.com, thunder.leizhen@huawei.com, jingxiangfeng@huawei.com, fanchengyang@huawei.com, zhaohongjiang@huawei.com References: <20190730074225.39544-1-yanaijie@huawei.com> <20190730074225.39544-3-yanaijie@huawei.com> From: Christophe Leroy Message-ID: <98a0a18c-0a77-1ab1-d40a-f7de0b9c9009@c-s.fr> Date: Tue, 30 Jul 2019 11:25:16 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190730074225.39544-3-yanaijie@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 30/07/2019 à 09:42, Jason Yan a écrit : > These two variables are both defined in init_32.c and init_64.c. Move > them to init-common.c. > > Signed-off-by: Jason Yan > Cc: Diana Craciun > Cc: Michael Ellerman > Cc: Christophe Leroy > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Nicholas Piggin > Cc: Kees Cook Reviewed-by: Christophe Leroy > --- > arch/powerpc/mm/init-common.c | 5 +++++ > arch/powerpc/mm/init_32.c | 5 ----- > arch/powerpc/mm/init_64.c | 5 ----- > 3 files changed, 5 insertions(+), 10 deletions(-) > > diff --git a/arch/powerpc/mm/init-common.c b/arch/powerpc/mm/init-common.c > index a84da92920f7..152ae0d21435 100644 > --- a/arch/powerpc/mm/init-common.c > +++ b/arch/powerpc/mm/init-common.c > @@ -21,6 +21,11 @@ > #include > #include > > +phys_addr_t memstart_addr = (phys_addr_t)~0ull; > +EXPORT_SYMBOL_GPL(memstart_addr); > +phys_addr_t kernstart_addr; > +EXPORT_SYMBOL_GPL(kernstart_addr); > + > static bool disable_kuep = !IS_ENABLED(CONFIG_PPC_KUEP); > static bool disable_kuap = !IS_ENABLED(CONFIG_PPC_KUAP); > > diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c > index b04896a88d79..872df48ae41b 100644 > --- a/arch/powerpc/mm/init_32.c > +++ b/arch/powerpc/mm/init_32.c > @@ -56,11 +56,6 @@ > phys_addr_t total_memory; > phys_addr_t total_lowmem; > > -phys_addr_t memstart_addr = (phys_addr_t)~0ull; > -EXPORT_SYMBOL(memstart_addr); > -phys_addr_t kernstart_addr; > -EXPORT_SYMBOL(kernstart_addr); > - > #ifdef CONFIG_RELOCATABLE > /* Used in __va()/__pa() */ > long long virt_phys_offset; > diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c > index a44f6281ca3a..c836f1269ee7 100644 > --- a/arch/powerpc/mm/init_64.c > +++ b/arch/powerpc/mm/init_64.c > @@ -63,11 +63,6 @@ > > #include > > -phys_addr_t memstart_addr = ~0; > -EXPORT_SYMBOL_GPL(memstart_addr); > -phys_addr_t kernstart_addr; > -EXPORT_SYMBOL_GPL(kernstart_addr); > - > #ifdef CONFIG_SPARSEMEM_VMEMMAP > /* > * Given an address within the vmemmap, determine the pfn of the page that >