Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2338044pxu; Mon, 7 Dec 2020 04:11:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxye7QOM3tz04XesIv5UxGmyxiYsPfOVMRmLpCUQAH93tx85GQ8t+fY/S1z6QhPO0O1kAm6 X-Received: by 2002:a17:907:a8a:: with SMTP id by10mr18221248ejc.423.1607343073914; Mon, 07 Dec 2020 04:11:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607343073; cv=none; d=google.com; s=arc-20160816; b=jr+pJEwpyoKCDsWWydRj/GeoZ6dWxqS6mzEKBtyRUfKQ331yioijncwc9+hPUoc80e Z8/zpnL3zCEZeC8RzXk2zIZoMEqXcsUc+4Kn/RLmVI2IIc/gfdwpLdvCreJ6yKgzp1yj Oz3D+0P8V6YMDMtRNM7xDvPUWXzqEEljzYxz2Ui+FHMgk1xbnUGQGlu1fYjn36wgfXDu rJIJCNZA+dPu6iUGvkT28gQovarMOTsDg7/iErzpdBbXhfVayqZp5wgKFrwqyBr80HLk smVOcbfRw58CLnDFDUmd/tvc3FBSsU5pbnYahjgFI0Un9ZVHTAxeABNDUDKSsoLhevbh Aj6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=j6WcPj0IELZyPAeHgxTFV18eYU66eVdxYM8UMBwb+6k=; b=Tia8U7hRAzURJ+unBev3GvQR9kLvcAeXqSXtFcpJNO9ZqgdnlCh1LmntdujbN/pAXv o7lPwXYxF6Kp8pP+aHcLLZVsXs7I8uJ2/F178BkzB5LTgsMwnJcc4UxqTb8HJdLby5Ib qbetofXKYfaVBnRSHe2MjpWW8RFKJUWBm27J0SkfejON2xUW3a4Kg+U0Wd/jNtLwIxSA cRpeMlOzn4A1iLQ0dw+L76006iXwUboIlnRZL5FEX+8ptXn4WXkP3zRTbz83pNSi1iCc tq81Im6BbYAZZoTUwoDkPD88+MA1nUUoBhez30pzn5EspGQc+SIZRN2+hnTgqt2g75j9 ytKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gTDKlWp7; 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 hq7si5848712ejc.539.2020.12.07.04.10.49; Mon, 07 Dec 2020 04:11:13 -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=gTDKlWp7; 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 S1727347AbgLGMJF (ORCPT + 99 others); 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-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)