Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp264546pxu; Thu, 7 Jan 2021 04:33:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUAJ7HpdoVtK8j1eZAcrDOErYh8jWVEyOSyoTywrUBV/HIGgNg9T2pe+cZkhnulAlDDwaA X-Received: by 2002:aa7:ce16:: with SMTP id d22mr1493732edv.381.1610022804312; Thu, 07 Jan 2021 04:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610022804; cv=none; d=google.com; s=arc-20160816; b=Q/qwC72WM0ZjWhLqN5fOArHr8dTy+EGzI+caNI+9mk64xamJugUsIlzUB2xNQ/hsKb CEsCSAQ5thQWz1q0qU++DEEssuRoh/XGvjximqQudMmE22E4kORPBFQe+Hc43yOEs1wk OFkbu7Mph7V9Ou/rghYn5UU+zhl2Cjq8+hwna7q0x9QxK4xbEKWv4nlyUK+Dy/EiLHaO WeoIkPCp4ZJnfOlYyRAVX/vozoIgId/apbIdNsGcKC3/DSO3gysfFpliq6oDpa8heMDv JnjCd6zyuYsHn7hr6HYODFy3Ke+5xFuoilqEvwm59rpvjOvCAFjdMz3lZUDW5R6zWT0M jIcA== 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=e3bnSwSnCE4VZ3KFWoriT36YdZpDmKtvitn1N44EPZE=; b=PxgzHOxlxt0lL6XTYTG2+lQbvMrvpOIgtVeLurVIfSxYMfR2PkHWkS8KvzE9pVJOWv JWoX+qJT9hnuansqKGKjuMa1ZKPVILEorcJ7Nc7E0f4jIWVaAEv2iuuz02J5+RTM+c9g ckbvQRXXnqNBD5HEkBN9QkUJgliDcbRKRTEuADKNzkKM176SDvieCbn/c2UgchbQ+kvy JEheo6apZ2Wvi3aaHWksGOckQ1fEWUsjopDp8jqA27dprOHxPGNho/icQNehPzmfXXKn Qd9XWqyMNsuMTzqyLWntPDLvJAUvYUnjil+meSWZ06rJ+7HuHBwAK2rRx8H9vvY50th4 uZPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=XCLeYds6; 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 cb21si2181950edb.91.2021.01.07.04.33.00; Thu, 07 Jan 2021 04:33:24 -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=XCLeYds6; 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 S1728224AbhAGMa5 (ORCPT + 99 others); Thu, 7 Jan 2021 07:30:57 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:50897 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbhAGMay (ORCPT ); Thu, 7 Jan 2021 07:30:54 -0500 Date: Thu, 07 Jan 2021 12:30:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610022611; bh=e3bnSwSnCE4VZ3KFWoriT36YdZpDmKtvitn1N44EPZE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=XCLeYds6RzSh90AdJ1CaF4KFV3CHWPyxMwMhTa83qQc7MJ+JXPWLc+/UvPMcxndVL UiIFs1v1aKyG7f+cHiMq0XOWCY5IprIKS53oJ8y2+6AGa6QfX0PBurvT/8qz+F9HHz bLFgEVtQ8WvHyC+JvYTUjZwDYrrr5WIa6smG/oVCwR3QsHqwrxRa26XWHEqYUStDnV vaImFwahpngARKQ2Tzzgva60b/NBSfy4khM8l8epRK6+VyShEk6i/Okcwx/sn8Ochk 26aHQbFY5oF817lW77n3OgIvBrlf5MlXKDJd3khCX9vwmc5yS697cb+qX+xCRtr3Vs RQaI2SRl9GiOQ== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Alexander Lobakin , Arnd Bergmann , Kees Cook , Nathan Chancellor , Nick Desaulniers , Fangrui Song , Huacai Chen , Pei Huang , Jiaxun Yang , 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: Re: [PATCH v3 mips-next 0/7] MIPS: vmlinux.lds.S sections fixes & cleanup Message-ID: <20210107122944.353565-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 > 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. >=20 > 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. >=20 > 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). >=20 > 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). >=20 > [0] https://lore.kernel.org/linux-mips/20210104121729.46981-1-alobakin@pm= .me > [1] https://lore.kernel.org/linux-mips/20210106200713.31840-1-alobakin@pm= .me >=20 > 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 Well, GNU fails to build VDSO with this patch... Sorry, sending v4 now. > 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 >=20 > 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 Al