Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3424487ybi; Mon, 29 Jul 2019 06:22:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfVEoVblSXOXvqTXHakC0q0ypJQP63eIlLO8GDOWsnDVnEIQWyQ2i3ijiaOiiUUJ/hC08x X-Received: by 2002:a17:90a:1b48:: with SMTP id q66mr107496806pjq.83.1564406523796; Mon, 29 Jul 2019 06:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564406523; cv=none; d=google.com; s=arc-20160816; b=qmkFfip60VziQ1wLuyw55PbsndTZgGCDkN66Ho7IM1nQfcABRYagRAxS7NZKSHGzrL VxyQttiCuw6oIUANeQFs1Xd6pebQWPCBymtr+JPOvu1CioL4i/lzw6wZ1VOrUwkbNHFe 55LZoTmTVgIIHXuPbyeXUOZew3TXQyVM+augRil4DofhDezIB116zAoduHWTW7csX1qj WG0RrfdTg/kVkfKJ2NKQdgfzky5YaqwIoA1kp5ym88k8qTO24kOHilL1QQItSaHCB1ok ASSoc1fAATr6yKoJY4qss1bZx6hIFS2xG/gvr6YAgnFIDm0za/HNH/XMiWH26iLgei+c 6fRQ== 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=Q6zyw4EZJ5gEddzqQzUfic9Tvl1l+HpodOi7ui8iTfk=; b=REnf5RFgIUTdn0R6eeALZ+Z4mkBwF8FbwXwC5PUCoyxDIQU41tnOoH+z++M+jS0EM5 /JZUJG/EebyqdGjuMqg7563mC132bI/EONox9p3MBTfbjWlah80/ShatrubCoehQn101 CmM2dBLbI8PYRGR0r/3vnff7S2T2lNXFoItdoFFlO6Vs34m0SCPZdJsiw14tLg3/USQw UpdDKGXRKXFvwZnnx3X74ZevqvdlYDYHBTkQ1lf6r2tIY/KnH+AcaJMyLsLZ3QJYF2/Z 3f6q900tJBz4YuvwkGLNG+PYQLihB02NaER3yDaGPAYH4cUfK7KoUlEwqYfGbbhzQaLT UULg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=leQUpB9X; 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 b6si25111143pge.44.2019.07.29.06.21.48; Mon, 29 Jul 2019 06:22:03 -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=leQUpB9X; 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 S2387547AbfG2LAE (ORCPT + 99 others); Mon, 29 Jul 2019 07:00:04 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:9306 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387424AbfG2LAD (ORCPT ); Mon, 29 Jul 2019 07:00:03 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 45xxXs1Mfbz9v9MV; Mon, 29 Jul 2019 12:59:57 +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=leQUpB9X; 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 pqQ-asZwJxQ2; Mon, 29 Jul 2019 12:59:57 +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 45xxXs04sfz9v9MP; Mon, 29 Jul 2019 12:59:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1564397997; bh=Q6zyw4EZJ5gEddzqQzUfic9Tvl1l+HpodOi7ui8iTfk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=leQUpB9Xqg7PNZa+MMm508ZZMjjdEQ6GYlCSGxwOOFuR2y9NMrKz2TKUAy8cfIEfk ypofah6XTB1nRdPum1An5DrULnmuHjws9Rf6JkUJuvYLTh04QOwqiznc8+E2zLJKYR 8D4lvMcw5Dm3rVjq6ATjqK+f0LVsO6abMnMOJKvI= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D4D758B7CB; Mon, 29 Jul 2019 13:00:01 +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 wz0I_dwkhhke; Mon, 29 Jul 2019 13:00:01 +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 9DD3E8B7B3; Mon, 29 Jul 2019 13:00:01 +0200 (CEST) Subject: Re: [RFC PATCH 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 References: <20190717080621.40424-1-yanaijie@huawei.com> <20190717080621.40424-3-yanaijie@huawei.com> From: Christophe Leroy Message-ID: <28797c00-8ab7-207b-554a-e8dc3a457c6a@c-s.fr> Date: Mon, 29 Jul 2019 13:00:01 +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: <20190717080621.40424-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 17/07/2019 à 10:06, 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..9273c38009cb 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(memstart_addr); > +phys_addr_t kernstart_addr; > +EXPORT_SYMBOL(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 >