Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1594223pxb; Sun, 10 Jan 2021 03:59:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOt3YXR0G0LmlBSOCqzKViE6X5oWNbXC7LJ4NHyZfApxawjpKEci0hSf1vYcMrGE/6vFG8 X-Received: by 2002:a50:fd10:: with SMTP id i16mr11171911eds.331.1610279979936; Sun, 10 Jan 2021 03:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610279979; cv=none; d=google.com; s=arc-20160816; b=jw4glIdEi6tOa1U+Xxl3ie6aU+RsAn7lR0Hj1ca6d6J7PAgWCOKe5WR9xRvg/4yTio 2exUcKTeccQMHQ0Z35hFKc8+o6C3DjCwujXv3XnkppmmE+Wd1cT/+hDP7EiyND65RzIb Sl9eo/hZFnU1tFLQh1gGHmt9uW2uZ5hiBbz5TAgiQzMPvaWK1MN8/0HKEnM1fOThrnkp ZPjMv6hbAHERQjT3E7B83bJpxmZ4YfyO8NxqhIUuXJ4Vf2ElkiACj8/6uBC3kfkPWmGB Ilgwk3zQzZ6sqrgAXv3gE1q3fAU9VK77TCMeZ5eEgb88VtJ5W3a8VuODYrNBL5VyXGPQ lX+Q== 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=uBfGM5EGQNjpg0d/r+6RHo1eXsl0e/48xvwxFVSmmH4=; b=NB61hRyRuFOnVyf73n90/q5lQb6zy4PYp9EsmjG8GtHrJ5uEb6WTZZLgPaIOKk5Xgy 0mDSWRaph++0tDF1Wmk3Grqo9tYjzzGsQc9KEgeSCZpZMRVpXJmai1InGQcgzh7xoaMe 8Lu30bLIAx7q/yedjjocjyfscP7kjjyXfOcfjxsrFS3pR09WoeePAoG6Z5Ac+7wBgAQq CrKpP7EUCEk3x+iwvwtbeiRfs53kRRLJQ2rZGrA0ZbLcW9L7ZMTwV4MRhwmpWp41zGBO VZi9P1i8B2w3dysyEprv4K8GjYzJCb4lfP2TYy8QpGqRvz/unVt4cekdXGTSePphFTT1 6/tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=P+8SKV7n; 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 hs42si3746977ejc.136.2021.01.10.03.59.16; Sun, 10 Jan 2021 03:59:39 -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=P+8SKV7n; 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 S1726808AbhAJL5p (ORCPT + 99 others); Sun, 10 Jan 2021 06:57:45 -0500 Received: from mail2.protonmail.ch ([185.70.40.22]:30735 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726784AbhAJL5n (ORCPT ); Sun, 10 Jan 2021 06:57:43 -0500 Date: Sun, 10 Jan 2021 11:56:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610279820; bh=uBfGM5EGQNjpg0d/r+6RHo1eXsl0e/48xvwxFVSmmH4=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=P+8SKV7ni23HcrUcB47hl2iy85MY84jROQWpUkBFOwkQmVk0721gLt8uraxdCn/uE D797LDQHehlcKF/0AWssQ+89Kly7aoog1hMRIKs1ExJpTYDKXyx5d4dGFcXPhsoJE/ p4RyBZqSowzG5yYT3gfT70Ur38y7MUm3DvJlXM26qsBV+/x+uBrLWcg7+9FuS2+zlF MmtEL7Anl8euGs9nb4y2Q06vEmxu65EWAQc4imgMDVMFT51T5QNtL+5qKVog0Wquxy Nd9dVUAe/zBVifVS0L7EQv7/oC4h9uDbVkQkBqunwSmgnhxPhDC1tgPpiGstDO2bL8 2YZPrhxbVSX5Q== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Huacai Chen , Pei Huang , Kees Cook , Alexander Lobakin , Fangrui Song , Jiaxun Yang , 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 v5 mips-next 8/9] vmlinux.lds.h: catch UBSAN's "unnamed data" into data Message-ID: <20210110115546.30970-8-alobakin@pm.me> In-Reply-To: <20210110115546.30970-1-alobakin@pm.me> References: <20210110115245.30762-1-alobakin@pm.me> <20210110115546.30970-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 When building kernel with both LD_DEAD_CODE_DATA_ELIMINATION and UBSAN, LLVM stack generates lots of "unnamed data" sections: ld.lld: warning: net/built-in.a(netfilter/utils.o): (.data.$__unnamed_2) is being placed in '.data.$__unnamed_2' ld.lld: warning: net/built-in.a(netfilter/utils.o): (.data.$__unnamed_3) is being placed in '.data.$__unnamed_3' ld.lld: warning: net/built-in.a(netfilter/utils.o): (.data.$__unnamed_4) is being placed in '.data.$__unnamed_4' ld.lld: warning: net/built-in.a(netfilter/utils.o): (.data.$__unnamed_5) is being placed in '.data.$__unnamed_5' [...] Also handle this by adding the related sections to generic definitions. Signed-off-by: Alexander Lobakin --- include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index 5f2f5b1db84f..cc659e77fcb0 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -95,7 +95,7 @@ */ #ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION #define TEXT_MAIN .text .text.[0-9a-zA-Z_]* -#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliter= al* +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliter= al* .data.$__unnamed_* #define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]* #define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L* #define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral* --=20 2.30.0