Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5888611pxb; Tue, 16 Feb 2021 09:58:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoxt6GuDXv6heAQD1SZ9n8AA4ryjOc5h2sk77PQukpnM+1bxH0vUWy4VKX9D0fHelC6KnK X-Received: by 2002:a50:80c6:: with SMTP id 64mr22305423edb.209.1613498339512; Tue, 16 Feb 2021 09:58:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613498339; cv=none; d=google.com; s=arc-20160816; b=HWN//rI3F8yT/CTUK5TR7avh8QK71+e9Tj11pXuzDayi6EJKeAlztXBYLHNaQufTHh gZqqSThLIdrLUbcxM1Hz9zypSHxu+tIBiIOzBGL4dk8Mc9GiFJnyMD+hHc3TSrwqwmOw ut0vtzPvO41NM0EWyM3y1ejiZo3SlIUEYls26jwjrx/TG+8StkqNq6N/gvfjQnrBbd48 cQiH984c6BwywRLLxIBSd3dAULF3KDwm5+AB11ZUTb5AvGUE8lr2FYidnMtOfdowY8tE +9wMY98rT6gH4/LqZrTUEVWfIL52/myADKwjXxEBeEOROkpTIpaPBYrn/o5PkJh35Wtf VJGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sB0GNU2NK22ymf4WR/Z3NGO8dPeB6xu5QjQGtDipdYg=; b=KPZBjgw1PvbH/EvUb3Ud0BLZosGIcWnLgD0HRxlnkakAWt/P/iQHAPFLaVyh4N5Ddq 33qI4y53BbFci9ymSFJTiyUSBstlSoDof3ZF0EJFYUL8jCCFQTSQqu638iR4J9NpmghN yAcaK27QG8dYjL51VzsFyrvlxqoEI9+m+WQBRUOmvhwzsWeoeD32eAl9RkNuOaqXPtuq noVtL/sZ0s3NljSeTyvOeCLLjbau5RgMJlj4R6sGBQIxnAVfG3BLjeIc0iGlpLL0wQtt rGW3GvfJb7HVDhHkXYMq182nJw2ZjvME+BxGFNC54Q2MmJN4dod7prTErtpHXb6pOXWB HPPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HeWFqx35; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p24si15429695edw.248.2021.02.16.09.58.34; Tue, 16 Feb 2021 09:58:59 -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=@google.com header.s=20161025 header.b=HeWFqx35; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230001AbhBPR5e (ORCPT + 99 others); Tue, 16 Feb 2021 12:57:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbhBPR50 (ORCPT ); Tue, 16 Feb 2021 12:57:26 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2C2AC061756 for ; Tue, 16 Feb 2021 09:56:45 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id h26so17364057lfm.1 for ; Tue, 16 Feb 2021 09:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sB0GNU2NK22ymf4WR/Z3NGO8dPeB6xu5QjQGtDipdYg=; b=HeWFqx35KDD6di4h49i+CZJ1MoRmUxZQvvS9mHzFdoVMb4N5qKkqW4szZJnu6x//3k 5OvKdKRP69NRL0qvu+Zdyg0uLmSgk8XXA813RidddooTJHRR8A/U95cEIWzN8qkue0pk MECQDpLW9QqkXSCqB/k4mEiJaY16bg3dn3WK6/OvSOXKP3NG1yc0cJhYggTHIrrNUqwo 8X24ShJQU0J6sKwzNjXRoVMYUDewyN/u/ri8YspcMsQ6vyF2zg7Lja5DFXLNEvo+5U7y S2Uoa4LdGOBjg8+LW2CO9S306tt3eF9KaLlhnVbypERWZC1mk+jUNa8bQwK5rohESe9i pI0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sB0GNU2NK22ymf4WR/Z3NGO8dPeB6xu5QjQGtDipdYg=; b=DZD0jtF0FPmv4bMOdXNO5PAEZMokioxS2GNUZ9GBsN9j2ESfTMjehmhLxnh2842pO/ YJgYzMk6kck8XWRi6VwnQxzJ2D96EfgdWF+3ev3AzuPWyPJf3O8a1uH+3EtgH5C9CeqS nsqG8ERUd5uUvbrvSPzx3ph65CozAp0x7kK8s1oG6gOa8xTR7sPmxqPhyyUuVRheHc3e /fR746BCuo46DWTr3hkEqaaQa+BLlVlm6ixgqnwjU2QH2XqNRfeyAM33mTrkytucmYEI zzHZaCqOrlqb8cNlml7cbbXSCc2EOlOqTKY9SFO3dG18IbfzbmVHYJfzAj2MG0mkbdHn pu6A== X-Gm-Message-State: AOAM530GSk6pRRtDWOelOHMy9XEiHjK2P/4xWrn1+CNpuQDokPWSciVB vRloZRiD/SIF+5+8e09pi/GYc8KvTtxbnkKrmUKwTg== X-Received: by 2002:a05:6512:2e3:: with SMTP id m3mr12641403lfq.547.1613498203806; Tue, 16 Feb 2021 09:56:43 -0800 (PST) MIME-Version: 1.0 References: <20210216085442.2967-1-alobakin@pm.me> In-Reply-To: <20210216085442.2967-1-alobakin@pm.me> From: Nick Desaulniers Date: Tue, 16 Feb 2021 09:56:32 -0800 Message-ID: Subject: Re: [PATCH mips-next] vmlinux.lds.h: catch more UBSAN symbols into .data To: Alexander Lobakin Cc: 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 12:55 AM Alexander Lobakin wrote: > > LKP triggered lots of LD orphan warnings [0]: Thanks for the patch, just some questions. With which linker? Was there a particular config from the bot's report that triggered this? > > 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.com > > 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/vmlinux.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..compoundliteral* .data.$__unnamed_* > +#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral* .data.$__unnamed_* .data.$Lubsan_* Are these sections only created when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is selected? (Same with .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* > -- > 2.30.1 > > -- Thanks, ~Nick Desaulniers