Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp243883pxu; Thu, 7 Jan 2021 03:56:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzw0QMX4v3hYE45+WC38Vgfql9uSYAxnxRxWmV6dhyBOfrmWZtUbjGUTgsSitI6CiojUGpz X-Received: by 2002:a17:906:e250:: with SMTP id gq16mr5834794ejb.382.1610020582404; Thu, 07 Jan 2021 03:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610020582; cv=none; d=google.com; s=arc-20160816; b=qnn7nUppi7epUx8MRWshp4RT2povwRr6NgU4pcMSSzbWEGUppzUONTF6PD4WEss8bl g3M0Qy2KKQQhOlfsb83+N2mMpubQwxi7gqMSrnCBe5UOzslkW8qC8xJODF+S3RsVgiha oQHG8X3EndVIUdifuxWSnocjHmSdisID1zP/0MM4TK3VBAmLi8rtnuAIk7L85TqcV+eV hOg8eG0dPCa5OqsC8jKTZ2V9kD1xe3gHDjxKvPcssYrFCzh4vh/O/GGvP90rfA4esH5C j+PiEmtC88Ajhw58s7Z8hSyHo1StGXJhcQyFbrbVa4NbUkziE1jZ91enY3OOepW1hGN0 TwMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=Hhk9OJTluJ5KWBmdxz+W1q3+eakKWb3hNy44poTwuNA=; b=L4c3OPP5vHf4Tau1kJ6LSPrhWWIkQd1dCo3s0CmXpS8MwVEpTgQFKR3+51QumlMsy5 EhJ2KQ2ZRtdQ8y7elMQ8Q1vxercGbcTTr26JDPKSHwodJ31RG2m0a+pi872Wb2eNydjE 9cT1n316elJPuUq2lMsCCEii0QGmbdKf3EB7dUIWLd3I86nQgUrxbDATvMxnXNvVRWMK IxpMRQBN9KYwoTGFNEWdqHD2L9I0q3uP6IZ8lehyeMmlM529UEEqF5dYTD8x3JQuha/m w2K5fQL8UBBnlHIPqRyhtev4fjf3ZNqe1JAdkVQX+kLH/6CPO9XRwU2YxMyOXb+E5oDx g5mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=fNwtMedX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si2193050ejn.161.2021.01.07.03.55.58; Thu, 07 Jan 2021 03:56:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=fNwtMedX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726607AbhAGLy0 (ORCPT + 99 others); Thu, 7 Jan 2021 06:54:26 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:37994 "EHLO mail-40136.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbhAGLyZ (ORCPT ); Thu, 7 Jan 2021 06:54:25 -0500 Date: Thu, 07 Jan 2021 11:53:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610020422; bh=Hhk9OJTluJ5KWBmdxz+W1q3+eakKWb3hNy44poTwuNA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=fNwtMedXF25w4D6Gc1wLYSdha5TARfQofG7W6sH6yPib5LZRmgURbBVzk1GIMlfWk RnP9ou4sSMskz1rH4uBe7POGLY1F32+MNcEp9InxtiU2CjIezDI3cz3TLTuGK0cam1 WyuK2Ws01tAPY76x3JayCG891EFgtEeClWTBQrqaBebr9aJMcsCwgpo8YRSZVa1Bx0 BCahPws6NjHgnggJMnLv/oALCPKcoL/CXZGmiMe7ukhY/TMW1+KxGc9O93ruQsuh1C 31Pi7pmPccs2tr0svhaT3alr/YCjFoU1RD8iuguGZKN7aJLbM5m8v2yv0RLCeTK4ZT geiXsjq9EMiSA== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Arnd Bergmann , Kees Cook , Nathan Chancellor , Nick Desaulniers , Fangrui Song , Huacai Chen , Pei Huang , Jiaxun Yang , Alexander Lobakin , Sami Tolvanen , Ingo Molnar , Ralf Baechle , Corey Minyard , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org, clang-built-linux@googlegroups.com Reply-To: Alexander Lobakin Subject: [PATCH v3 mips-next 1/7] MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section Message-ID: <20210107115329.281266-1-alobakin@pm.me> In-Reply-To: <20210107115120.281008-1-alobakin@pm.me> References: <20210107115120.281008-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MIPS uses its own declaration of rwdata, and thus it should be kept in sync with the asm-generic one. Currently PAGE_ALIGNED_DATA() is missing from the linker script, which emits the following ld warnings: mips-alpine-linux-musl-ld: warning: orphan section `.data..page_aligned' from `arch/mips/kernel/vdso.o' being placed in section `.data..page_aligned' mips-alpine-linux-musl-ld: warning: orphan section `.data..page_aligned' from `arch/mips/vdso/vdso-image.o' being placed in section `.data..page_aligned' Add the necessary declaration, so the mentioned structures will be placed in vmlinux as intended: ffffffff80630580 D __end_once ffffffff80630580 D __start___dyndbg ffffffff80630580 D __start_once ffffffff80630580 D __stop___dyndbg ffffffff80634000 d mips_vdso_data ffffffff80638000 d vdso_data ffffffff80638580 D _gp ffffffff8063c000 T __init_begin ffffffff8063c000 D _edata ffffffff8063c000 T _sinittext -> ffffffff805a4000 D __end_init_task ffffffff805a4000 D __nosave_begin ffffffff805a4000 D __nosave_end ffffffff805a4000 d mips_vdso_data ffffffff805a8000 d vdso_data ffffffff805ac000 D mmlist_lock ffffffff805ac080 D tasklist_lock Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook --- arch/mips/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.= S index 5e97e9d02f98..83e27a181206 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -90,6 +90,7 @@ SECTIONS =20 =09=09INIT_TASK_DATA(THREAD_SIZE) =09=09NOSAVE_DATA +=09=09PAGE_ALIGNED_DATA(PAGE_SIZE) =09=09CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) =09=09READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) =09=09DATA_DATA --=20 2.30.0