From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9141BC433FE for ; Mon, 7 Dec 2020 12:09:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 618D523341 for ; Mon, 7 Dec 2020 12:09:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727362AbgLGMJF (ORCPT ); Mon, 7 Dec 2020 07:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726915AbgLGMJE (ORCPT ); Mon, 7 Dec 2020 07:09:04 -0500 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA504C0613D3 for ; Mon, 7 Dec 2020 04:08:23 -0800 (PST) Received: by mail-qt1-x844.google.com with SMTP id z9so9150660qtn.4 for ; Mon, 07 Dec 2020 04:08:23 -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:content-transfer-encoding; bh=j6WcPj0IELZyPAeHgxTFV18eYU66eVdxYM8UMBwb+6k=; b=gTDKlWp7OTo9YtssNfNMMF7sGVDibkhfahzMZ4mew5/uNa2KrOl237g1QrZLr4W1Q5 NIxdZCMvoct6LUzRbUO/E4v7qiNUqKotyVLZlhi3VaJhjdBW/kl8rI2g7ZPcoeuU9ZPZ FeXRnBeRF0+aad4UXo/jeJ+FTPTejR5Jy1Mj5m4emujQuAn50tUkXLgYPjEuR6JU4Az7 bFFGNcuh9ccE6Zr2RyBsxIgs0q4ZDj4OrfkA4gwxeYqCYgyWs+/ZO4vGwU9Oqxq0XcXi c9M9ojSZk/ciTmR9Fidafkd0B3gz1yaQnBJM0nXSTVtL6D7x4lHEXQL3pzQ+KVsFZzKU Vnqw== 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:content-transfer-encoding; bh=j6WcPj0IELZyPAeHgxTFV18eYU66eVdxYM8UMBwb+6k=; b=UGe39Kffo4CxHC2isTYcogHWQhlQ9qwlBYF2UgchXVEYlJB177e1CDRoK+5L2ByYQc eXeYSO735CcUA0wQZWbbhQ1XpZ1rJC+jOURjMEc3nS3JSoPXKBXrG7D6EAEZRKEXGZLP mlc6UIEl1T4MCzI5D0dkas6OVNHenGLAhDXNrMcj576jJeZ9OuCkiax7FTsdJ+3gP6o6 ENJVtRxLPKm9KcY036hC583LX54Kg4bUv7TKja8e+CyfqiyAq/EASsMVZ0zr0hT6NEer pySSGqi189cm1JnwlsdLCMUt1PlAClKlRULHdByDtUnmrM2KSKkXIAfcodzxb7vFh/Rj SPlw== X-Gm-Message-State: AOAM530nc7Owq4dRpZs2hFByQryhjVZOPXBumvMaKwMaGNknzx4ZE7h5 4vbeNwRaJWn+GUGJ9f1XTzjPpvwEG4xsMf6Xu3U/AcGtC472Yw== X-Google-Smtp-Source: ABdhPJzLv9JfWtnmiT/twmir3juqV9lBsro3kbVQyEWJz6B9CuFQNaphSSsh/w0suT4ZQLlZHcpUMYtIGQM8bujTowI= X-Received: by 2002:ac8:5386:: with SMTP id x6mr23435656qtp.43.1607342902842; Mon, 07 Dec 2020 04:08:22 -0800 (PST) MIME-Version: 1.0 References: <20201204210000.660293c6@canb.auug.org.au> <20201204211923.a88aa12dc06b61780282dd1b@linux-foundation.org> In-Reply-To: <20201204211923.a88aa12dc06b61780282dd1b@linux-foundation.org> From: Dmitry Vyukov Date: Mon, 7 Dec 2020 13:08:11 +0100 Message-ID: Subject: Re: linux-next: build warning after merge of the akpm tree To: Andrew Morton Cc: Stephen Rothwell , Linux Kernel Mailing List , Linux Next Mailing List , Alexander Potapenko , Andrey Konovalov , kasan-dev , Kees Cook Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 5, 2020 at 6:19 AM Andrew Morton wr= ote: > > On Fri, 4 Dec 2020 21:00:00 +1100 Stephen Rothwell = wrote: > > > Hi all, > > > > After merging the akpm tree, today's linux-next build (powerpc > > allyesconfig) produced warnings like this: > > > > kernel/kcov.c:296:14: warning: conflicting types for built-in function = '__sanitizer_cov_trace_switch'; expected 'void(long unsigned int, void *)'= [-Wbuiltin-declaration-mismatch] > > 296 | void notrace __sanitizer_cov_trace_switch(u64 val, u64 *cases) > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Odd. clang wants that signature, according to > https://clang.llvm.org/docs/SanitizerCoverage.html. But gcc seems to > want a different signature. Beats me - best I can do is to cc various > likely culprits ;) > > Which gcc version? Did you recently update gcc? > > > ld: warning: orphan section `.data..Lubsan_data177' from `arch/powerpc/= oprofile/op_model_pa6t.o' being placed in section `.data..Lubsan_data177' > > > > (lots of these latter ones) > > > > I don't know what produced these, but it is in the akpm-current or > > akpm trees. I can reproduce this in x86_64 build as well but only if I enable UBSAN as well. There were some recent UBSAN changes by Kees, so maybe that's what affected the warning. Though, the warning itself looks legit and unrelated to UBSAN. In fact, if the compiler expects long and we accept u64, it may be broken on 32-bit arches... I have gcc version 10.2.0 (Debian 10.2.0-15) On next-20201207 config is defconfig + CONFIG_KCOV=3Dy CONFIG_KCOV_ENABLE_COMPARISONS=3Dy CONFIG_UBSAN=3Dy $ make -j8 kernel/kcov.o CC kernel/kcov.o kernel/kcov.c:296:14: warning: conflicting types for built-in function =E2=80=98__sanitizer_cov_trace_switch=E2=80=99; expected =E2=80=98void(long= unsigned int, void *)=E2=80=99 [-Wbuiltin-declaration-mismatch] 296 | void notrace __sanitizer_cov_trace_switch(u64 val, u64 *cases)