Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2907090ybi; Mon, 10 Jun 2019 00:22:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7VgxECZ+XRZ1zthWmLGYJi9BNfmxKH9YdfY4Zj+wvs1PZwHMJJZMdjyIoRIAr514CtlQU X-Received: by 2002:a62:778d:: with SMTP id s135mr1106090pfc.204.1560151365381; Mon, 10 Jun 2019 00:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560151365; cv=none; d=google.com; s=arc-20160816; b=I7VP18pDZ3DoEzbcQyR0ddtu9UikSqyD4yBhfO+pJPYrok+nSqM5JlTp/iPtnRU81t 3dk0F+I/kVnDdv0X74US3oU0WyogTJgR05M6bJAMmnVJW6iayJRqWnfD0zf4ZrEc9BrC sPafUgRYU0j9PSSAp2HOSk3cmKxaX7Le35VnWUzFucw9ofGhiC4oNlBkYYL3B0whaOPE nZVdiysbnxqAu9c2Ot2GUWLTdvXGEv/8qHsZfZvrLkHyeCVrFsNTqoxdu+N17c8VxjoC FdBV65G6Istx9i58GDy3G376M4ip1FtNhmSK+DgHn9s7Y/uXd01ei9kt/Y1uteU5dCZu gJbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=jOb1/PeO4O22cDS+f1+KzAenv4SW8wAwRqXfShAnI7g=; b=czd99r3KBQj9c4+ehrL+qfNnXFMB2qwnOD2/fPyQO+MgDfPgZP/4auXsZ/1MrrU7x7 vsdnEkdwx3M4wzg6YZzQkeQFjrfupgUeIOGVImGFPmcrYrPTF/Pd0l5U/o6Ly6EzApaX ypenLEMTJtZlv/wGjKcIZUQvSApEuR8kLtdntbIUVMqSsYPzjsZOL/7ZAeIBXuyFbuHa s8ooV1YjFg3P3Jzo80quCnLz6QAzYZhdV3fyt1aCXhZPuYExrHdPX+rj+goYoX52ob+T CpzNvXxyE3lcefx39n8030AaErS0rCqKNRJJVDIDmSLz5/V1g2F/X2xKjCAPz08qygOO UGCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=C14HhIy4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z34si4108521pgl.240.2019.06.10.00.22.30; Mon, 10 Jun 2019 00:22:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=C14HhIy4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387951AbfFJHWE (ORCPT + 99 others); Mon, 10 Jun 2019 03:22:04 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42848 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387785AbfFJHWE (ORCPT ); Mon, 10 Jun 2019 03:22:04 -0400 Received: by mail-qt1-f193.google.com with SMTP id s15so9435977qtk.9 for ; Mon, 10 Jun 2019 00:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=jOb1/PeO4O22cDS+f1+KzAenv4SW8wAwRqXfShAnI7g=; b=C14HhIy4+nv7vGwB1d7eXQh1P3dxxSgC1C0/QkzLk6xwBBa3MFQyunU2HRulQcUi1h ed6iKHyVlysuLJlZL7IxTXbOq8AdPW3q9g84yga2KtQPqXaUh5wMrB6D2aOdZ50hdaEm tlLnq0nfv8U3VSVj35o+hdm/zr0ZUdu/8+vuY= 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=jOb1/PeO4O22cDS+f1+KzAenv4SW8wAwRqXfShAnI7g=; b=t3G1ARfjnp9hQDtYSkig5pRPHho4n6yzyVGmfokz7AZGI48+TiT+7i9TvV9RBleWiU LiKj0iT3VdJ3avko/tlQO/v+IU4Ns5r2ME+514q3BTg6JWhCaKO+NBuczi0uGY5Nx+h+ 9eyRV540akLU0CgYeTfW0qtfE4E+RKBQi+oCyWlNxY+TdY6p/O+6CapyyYSPJfVnN7bI s7J2voFKk6X6g36xDWg2N5EpRq99VKxZL6NeFwwsFoRLPUKEGnuEO7rD2rqE3otOGZQa 3VRGnP2S2QRt8q8L9kj8BS4J8QX9/TJM9iX/S1Phs+Z8SIDLEPMXyhnNddzBKiRCkegl /+rg== X-Gm-Message-State: APjAAAUiQQc1ZdyvMBkuI7iuyFilkH4qU1UQaAHM362lZm0Z5Y2tnTRZ 6jArm36ZxjneyjJKEwYwQl4icdEI9h9gfU5pH9qn7g== X-Received: by 2002:ac8:3613:: with SMTP id m19mr57391438qtb.193.1560151322703; Mon, 10 Jun 2019 00:22:02 -0700 (PDT) MIME-Version: 1.0 References: <20190516225013.nvhwqi5tfwtby6qb@treble> <20190517050931.GB32367@kroah.com> <20190517073813.GB2589@hirez.programming.kicks-ass.net> <20190517085126.GA3249@kroah.com> <20190517152200.GI8945@kernel.org> <4FE2D490-F379-4CAE-9784-9BF81B7FE258@kernel.org> In-Reply-To: <4FE2D490-F379-4CAE-9784-9BF81B7FE258@kernel.org> From: Ivan Babrou Date: Mon, 10 Jun 2019 00:21:51 -0700 Message-ID: Subject: Re: Linux 4.19 and GCC 9 To: Arnaldo Carvalho de Melo Cc: Miguel Ojeda , Greg KH , Peter Zijlstra , Josh Poimboeuf , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel , Linux Kbuild mailing list , kernel-team Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Looks like 4.19.49 received some patches for GCC 9+, but unfortunately perf still doesn't want to compile: [07:15:32]In file included from /usr/include/string.h:635, [07:15:32] from util/debug.h:7, [07:15:32] from builtin-help.c:15: [07:15:32]In function 'strncpy', [07:15:32] inlined from 'add_man_viewer' at builtin-help.c:192:2, [07:15:32] inlined from 'perf_help_config' at builtin-help.c:284:3: [07:15:32]/usr/include/x86_64-linux-gnu/bits/string3.h:126:10: error: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=3Dstringop-truncation] [07:15:32] 126 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); [07:15:32] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [07:15:32]builtin-help.c: In function 'perf_help_config': [07:15:32]builtin-help.c:187:15: note: length computed here [07:15:32] 187 | size_t len =3D strlen(name); [07:15:32] | ^~~~~~~~~~~~ [07:15:32]cc1: all warnings being treated as errors On Fri, May 17, 2019 at 11:27 AM Arnaldo Carvalho de Melo wrote: > > On May 17, 2019 2:23:10 PM GMT-03:00, Ivan Babrou w= rote: > >On Fri, May 17, 2019 at 8:22 AM Arnaldo Carvalho de Melo > > wrote: > >> > >> Em Fri, May 17, 2019 at 11:01:45AM +0200, Miguel Ojeda escreveu: > >> > On Fri, May 17, 2019 at 10:51 AM Greg KH > > wrote: > >> > > > >> > > On Fri, May 17, 2019 at 10:35:29AM +0200, Miguel Ojeda wrote: > >> > > > On Fri, May 17, 2019 at 9:38 AM Peter Zijlstra > > wrote: > >> > > > > > >> > > > > Right; if there is anything you can reproduce on linus.git > >I'll happily > >> > > > > have a look. If it doesn't reproduce all you have to do is > >find the > >> > > > > patches that make it work and ask Greg. > >> > > > > >> > > > Just to clarify: Linus' master is clean of these issues with > >GCC 9.1.1. > >> > > > >> > > Great! Care to find the patches that did that work and send me > >the git > >> > > commit ids so that I can queue them up? I don't have gcc9 here > >yet on > >> > > my systems, so I can not test for this. > >> > > >> > I am unsure about the perf and the objtools parts (Peter/Josh?), > >but > >> > >> I'm not noticing these while building upstream perf with gcc 9.1.1 on > ^^= ^^^^^^^^^^^^^ > > >at > >> least fedora:30. > >> > >> 33 fedora:30 : Ok gcc (GCC) 9.1.1 20190503 > >(Red Hat 9.1.1-1) > > > >I've tried to replicate this in fedora:30 docker container and it's > >there: > > > >[root@linuxkit-025000000001 perf]# gcc --version > >gcc (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1) > > > >[root@linuxkit-025000000001 perf]# pwd > >/tmp/linux-4.19.44/tools/perf > ^^^^^^^^^^^^^^ > > That is not upstream perf, please look for patches from 4.19 to Linus' ma= ster Branch for fixes. > > I'll triple check here in a f30 container just in case meanwhile. > > Thanks, > > - Arnaldo > > > >[root@linuxkit-025000000001 perf]# make -j1 > >... > >trace/beauty/ioctl.c: In function =E2=80=98ioctl__scnprintf_kvm_cmd=E2= =80=99: > >trace/beauty/ioctl.c:85:82: error: array subscript [-2147483648, -1] > >is outside array bounds of =E2=80=98const char *[0]=E2=80=99 [-Werror=3D= array-bounds] > > 85 | if (nr < strarray__kvm_ioctl_cmds.nr_entries && > >strarray__kvm_ioctl_cmds.entries[nr] !=3D NULL) > > | > >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ > >In file included from trace/beauty/ioctl.c:82: > >/tmp/linux-4.19.44/tools/perf/trace/beauty/generated/ioctl/kvm_ioctl_arr= ay.c:1:20: > >note: while referencing =E2=80=98kvm_ioctl_cmds=E2=80=99 > > 1 | static const char *kvm_ioctl_cmds[] =3D { > > | ^~~~~~~~~~~~~~ > >In file included from /usr/include/string.h:494, > > from util/debug.h:7, > > from builtin-help.c:15: > >In function =E2=80=98strncpy=E2=80=99, > > inlined from =E2=80=98add_man_viewer=E2=80=99 at builtin-help.c:192:= 2, > > inlined from =E2=80=98perf_help_config=E2=80=99 at builtin-help.c:28= 4:3: > >/usr/include/bits/string_fortified.h:106:10: error: > >=E2=80=98__builtin_strncpy=E2=80=99 output truncated before terminating = nul copying as > >many bytes from a string as its length [-Werror=3Dstringop-truncation] > >106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos > >(__dest)); > >| > >^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >builtin-help.c: In function =E2=80=98perf_help_config=E2=80=99: > >builtin-help.c:187:15: note: length computed here > > 187 | size_t len =3D strlen(name); > > | ^~~~~~~~~~~~ > >trace/beauty/ioctl.c: In function =E2=80=98ioctl__scnprintf_perf_cmd=E2= =80=99: > >trace/beauty/ioctl.c:109:84: error: array subscript [-2147483648, -1] > >is outside array bounds of =E2=80=98const char *[0]=E2=80=99 [-Werror=3D= array-bounds] > > 109 | if (nr < strarray__perf_ioctl_cmds.nr_entries && > >strarray__perf_ioctl_cmds.entries[nr] !=3D NULL) > > | > >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ > >In file included from trace/beauty/ioctl.c:106: > >/tmp/linux-4.19.44/tools/perf/trace/beauty/generated/ioctl/perf_ioctl_ar= ray.c:1:20: > >note: while referencing =E2=80=98perf_ioctl_cmds=E2=80=99 > > 1 | static const char *perf_ioctl_cmds[] =3D { > > | ^~~~~~~~~~~~~~~ > >cc1: all warnings being treated as errors > > > >> > about the -Wmissing-attributes I cleaned, they were these: > >> > >> > a6e60d84989f ("include/linux/module.h: copy __init/__exit attrs to > >> > init/cleanup_module") > >> > c0d9782f5b6d ("Compiler Attributes: add support for __copy (gcc >=3D > >9)") > >> > ff98e20ef208 ("lib/crc32.c: mark crc32_le_base/__crc32c_le_base > >> > aliases as __pure") > >> > > >> > Cheers, > >> > Miguel > >> > >> -- > >> > >> - Arnaldo >