Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5932920pxb; Tue, 16 Feb 2021 11:07:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJymLxwp7ceVBVVmlYstDrzzDMIq6IMT2f1gc8Ey6kCChJVOUwvXfZjztl+yRsa5FpC8miIN X-Received: by 2002:a50:cf02:: with SMTP id c2mr22420655edk.333.1613502426774; Tue, 16 Feb 2021 11:07:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613502426; cv=none; d=google.com; s=arc-20160816; b=THHZL/xCiF8OAfrwM21Yuf3dSY1dna+mMJhOXOGZWvrddfQTW6NnmtuFhpnwl7M1RS JlQDJ2hwDbPgXnGK3GC/STPc9Hou2t1toWDrfE7/nohkDmbA2ka88lDYQd8+Oxvp1onI d7mr2sM4y6lN8+by+OT2kFEwpPRCPrw7p5ZVVWeq3jQ1UDLLxNxJ7Y+lIZPTCeh5lCCy 890jHIlwkvkBJyhIDgFTWQdNPtfmSuaCLuspG9XD5pavqLBEWpiGrLoz4Cf8MPsR3fu2 v4eX7hyvVXe2eIwBkCpgOEnRDbadobxptxl8Lq7i7z0M5OqjNv2amHntskm1mIAOx0lY fttw== 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=dHbB+EP2VglqDnAFBAuYo6DPJMDc0d9R10alpdW3CXY=; b=hYgooSyXqFjOJ2NjqyOtrgd7RtrYliwpDnGf4GQC2wWxHXeOiXkDHRIGncu+A8i7G4 wFOxTPpUMFlve/p/OkepXnO5exxjEhmUQwosNatAx/e00NqSJOyv7fz7ZT6443SrMGpO +OOonYgg67pQJvuuZGyt0AktBBfnQg92M2KKpFlnt/wmEx8GrfjdlTWdKYevY/DpW5zq VSpfPan0Pgr54dXguZXRQ1QLyVPuzw8N/AniwbPtPC5A5Y2PeqfeEe+vibmovYCbbxCB 2Dz9mwGv1KhN0VnGgn7UZc7yTVs2RwhNOci+/gTUDMUByHJNRWm3/6osxyUzDhOihD6i fvGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=ggve0TTk; 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 o26si15698723edw.74.2021.02.16.11.06.43; Tue, 16 Feb 2021 11:07:06 -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=ggve0TTk; 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 S230471AbhBPTEZ (ORCPT + 99 others); Tue, 16 Feb 2021 14:04:25 -0500 Received: from mail1.protonmail.ch ([185.70.40.18]:64402 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbhBPTEW (ORCPT ); Tue, 16 Feb 2021 14:04:22 -0500 Date: Tue, 16 Feb 2021 19:03:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1613502214; bh=dHbB+EP2VglqDnAFBAuYo6DPJMDc0d9R10alpdW3CXY=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=ggve0TTkzHlRopJd/p+ejxlP5JynMzd0RhjjBFl+nYojik9OVxndHZ6pKlFeAM9oc 46mNabgo0uopK+tV2l7KDNJG7bFVv6Fn7v/jms3TbPUwNxJpPVK2/m2dPYo5xLoK88 /YrtLVgcqZTbAFa+0zCi2kDCGmYTA1xSBeC+MKAJwjWG6NVvlkTFuKEEvy9aD45a2W 7RDvwJ4EuW+pNTz+oVJg4x0DQ2YFfY/wpYN3ixPy4klcugvT1exw/1Dh3TAyUlQkoj 0LGkUFVNiXzGQ4L4vD1auZchLQE8UgkbMB6HEIL0BxR5sb/cHt6p7soJpxuxGwSt4F t0WFQJkXVCtPQ== To: Nick Desaulniers From: Alexander Lobakin Cc: Alexander Lobakin , Thomas Bogendoerfer , Arnd Bergmann , Nathan Chancellor , Huacai Chen , Pei Huang , Kees Cook , Sami Tolvanen , Fangrui Song , Jiaxun Yang , Ralf Baechle , Corey Minyard , kernel test robot , linux-mips@vger.kernel.org, LKML , linux-arch , clang-built-linux Reply-To: Alexander Lobakin Subject: Re: [PATCH mips-next] vmlinux.lds.h: catch more UBSAN symbols into .data Message-ID: <20210216190212.1668-1-alobakin@pm.me> In-Reply-To: References: <20210216085442.2967-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 From: Nick Desaulniers Date: Tue, 16 Feb 2021 09:56:32 -0800 > On Tue, Feb 16, 2021 at 12:55 AM Alexander Lobakin wrote= : > > > > LKP triggered lots of LD orphan warnings [0]: >=20 > Thanks for the patch, just some questions. >=20 > With which linker? Was there a particular config from the bot's > report that triggered this? All the info can be found by going through the link from the commit message. Compiler was GCC 9.3, so I suppose BFD was used as a linker. I mentioned CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=3Dy in the attached dotconfig, the warnings and the fix are relevant only for this case. > > > > mipsel-linux-ld: warning: orphan section `.data.$Lubsan_data299' from > > `init/do_mounts_rd.o' being placed in section `.data.$Lubsan_data299' > > mipsel-linux-ld: warning: orphan section `.data.$Lubsan_data183' from > > `init/do_mounts_rd.o' being placed in section `.data.$Lubsan_data183' > > mipsel-linux-ld: warning: orphan section `.data.$Lubsan_type3' from > > `init/do_mounts_rd.o' being placed in section `.data.$Lubsan_type3' > > mipsel-linux-ld: warning: orphan section `.data.$Lubsan_type2' from > > `init/do_mounts_rd.o' being placed in section `.data.$Lubsan_type2' > > mipsel-linux-ld: warning: orphan section `.data.$Lubsan_type0' from > > `init/do_mounts_rd.o' being placed in section `.data.$Lubsan_type0' > > > > [...] > > > > Seems like "unnamed data" isn't the only type of symbols that UBSAN > > instrumentation can emit. > > Catch these into .data with the wildcard as well. > > > > [0] https://lore.kernel.org/linux-mm/202102160741.k57GCNSR-lkp@intel.co= m > > > > Fixes: f41b233de0ae ("vmlinux.lds.h: catch UBSAN's "unnamed data" into = data") > > Reported-by: kernel test robot > > 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/vm= linux.lds.h > > index cc659e77fcb0..83537e5ee78f 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..compoundl= iteral* .data.$__unnamed_* > > +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundl= iteral* .data.$__unnamed_* .data.$Lubsan_* >=20 > Are these sections only created when > CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is selected? (Same with > .data.$__unnamed_*) >=20 > > #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* > > -- > > 2.30.1 > > > > >=20 >=20 > --=20 > Thanks, > ~Nick Desaulniers Al