Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp265921pxu; Thu, 7 Jan 2021 04:35:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnFLkTCuZTUSU/Iu7PTB6307KLvK6X4yFIgclc+vWrKMXOf0e4CLXbScdM5u180KXbV6pc X-Received: by 2002:a17:906:9388:: with SMTP id l8mr6182014ejx.22.1610022935894; Thu, 07 Jan 2021 04:35:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610022935; cv=none; d=google.com; s=arc-20160816; b=TlzlOSuGD2Px/9qtHa88hu8l7p4LGNrCWcfafdxZoL89lnnfkLqKlCdNhDZblzC1SR OCPfwRH6FV6jfE9sxRhJCqR7kmY2k1//d4EmLn7mhDjdd4Xt9WX6khxP3wWRXv1P5+ME T1nAMb3z1ZsltM8VWIPhwkO/GufxssEIWsFQ4xQZ7O660NzI0q5TgWYrRmTgTHC3LBUK ketG6nQ53HD2ty+t+eM6F4sP55d6WznEv8kWo9KpdnatI1J0pwaDHci6anumeyFdRzz1 T6GJnxzPDrdVQtvexnYPCVMi1z/fkNCjLcHemu6l2FKWU5JFO87pF2Cm9fCqbIfrQ6wP Ve0g== 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 :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=cGGCdvWu4PwKRz1S12Mzu82QSX0n1m3RhliddwWOBIo=; b=wwAMU59RvlNZzcwVot6JL+iLN6el4xA4GZatqWhEgwP/rY8xpemJ651Xd7mR7jURXx FtLdnUVFH9FxKc270t3bf0TVrJzz4ELGnBAHWeA9vTYXi3eeieFfHeRNI59WsGnWOp+M n7TEna2r7cWsLBCGdzXRw2RrKeyDGmn2eV8YSb3d5cV3V6Rn23MlGTi1/cOeCe76aTUS gnLq6LN4PCPGHQL47V2KmWjB76ZthKyUc0B+efT61QF3pf1AvBaqHN9GHH+oDL2Ou7g9 u3R1WBsdnwAMB3nWnSCiReP5VORxrcratvoEVPji/Y2vcI8VtFuDeUIHpPBsRg897E5s yYYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=g46HgMEo; 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 j14si2188430ejy.327.2021.01.07.04.35.12; Thu, 07 Jan 2021 04:35:35 -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=g46HgMEo; 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 S1728107AbhAGMec (ORCPT + 99 others); Thu, 7 Jan 2021 07:34:32 -0500 Received: from mail2.protonmail.ch ([185.70.40.22]:31388 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728090AbhAGMeb (ORCPT ); Thu, 7 Jan 2021 07:34:31 -0500 X-Greylist: delayed 2405 seconds by postgrey-1.27 at vger.kernel.org; Thu, 07 Jan 2021 07:34:29 EST Date: Thu, 07 Jan 2021 12:33:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610022823; bh=cGGCdvWu4PwKRz1S12Mzu82QSX0n1m3RhliddwWOBIo=; h=Date:To:From:Cc:Reply-To:Subject:From; b=g46HgMEoNVFPYStTMl2U0tiPPlynTb67J8pWxwlfvVy6Em26mrnGfYXJ/NHnzF9C0 2l0iJxG1l6L2MQmeYZiPk5ENNdy7OPJYqqUNgs8l5ON/RdkT7ZICusXDnJal0o/X3i Tj4cO9W6AOsYzEJ0gxL2+BDdGBbhOUiaYSHhiaYiMvQthW9Prgz9YMLvzYTSsqwFzf Y1JjpqrCobMYSRQ+oCsp1mj+LhXd0yY23z00kpxeH166K/JShx6Ws84LoZP/ZUU6Ty 4BRvaE0wALd41ERV9FeUwIZ0F7w7LKZEhl03kCs89rDDh8rRI5ktvz8h0G0KHnV8m6 XoOQIqhKZCu+Q== 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 v4 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup Message-ID: <20210107123331.354075-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 This series hunts the problems discovered after manual enabling of ARCH_WANT_LD_ORPHAN_WARN. Notably: - adds the missing PAGE_ALIGNED_DATA() section affecting VDSO placement (marked for stable); - properly stops .eh_frame section generation. Compile and runtime tested on MIPS32R2 CPS board with no issues using two different toolkits: - Binutils 2.35.1, GCC 10.2.0; - LLVM stack 11.0.0. Since v3 [2]: - fix the third patch as GNU stack emits .rel.dyn into VDSO for some reason if .cfi_sections is specified. Since v2 [1]: - stop discarding .eh_frame and just prevent it from generating (Kees); - drop redundant sections assertions (Fangrui); - place GOT table in .text instead of asserting as it's not empty when building with LLVM (Nathan); - catch compound literals in generic definitions when building with LD_DEAD_CODE_DATA_ELIMINATION (Kees); - collect two Reviewed-bys (Kees). Since v1 [0]: - catch .got entries too as LLD may produce it (Nathan); - check for unwanted sections to be zero-sized instead of discarding (Fangrui). [0] https://lore.kernel.org/linux-mips/20210104121729.46981-1-alobakin@pm.m= e [1] https://lore.kernel.org/linux-mips/20210106200713.31840-1-alobakin@pm.m= e [2] https://lore.kernel.org/linux-mips/20210107115120.281008-1-alobakin@pm.= me Alexander Lobakin (7): MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS MIPS: properly stop .eh_frame generation MIPS: vmlinux.lds.S: catch bad .rel.dyn at link time MIPS: vmlinux.lds.S: explicitly declare .got table vmlinux.lds.h: catch compound literals into data and BSS MIPS: select ARCH_WANT_LD_ORPHAN_WARN arch/mips/Kconfig | 1 + arch/mips/include/asm/asm.h | 18 ++++++++++++++++++ arch/mips/kernel/vmlinux.lds.S | 15 ++++++++++++++- include/asm-generic/vmlinux.lds.h | 6 +++--- 4 files changed, 36 insertions(+), 4 deletions(-) --=20 2.30.0