Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6327966ybl; Wed, 15 Jan 2020 02:50:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxhnaQ12vYAT86ilkW+wflAXfu+VGQFYTeKbLA3MeJ1S3r2Yr3R/V8+pRpTZXhrRcs6hfOB X-Received: by 2002:a9d:6c01:: with SMTP id f1mr2167775otq.133.1579085438759; Wed, 15 Jan 2020 02:50:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579085438; cv=none; d=google.com; s=arc-20160816; b=nRmBxjONEPrAakt0uRvHwjom+NfB0YDeBStAo79At2KFtSqaBECZgAVw9OQMOpF8NN GL6z6NEbEk8AGpzz43LpELB537jSYTnLJK7ZvObxEt+2CqGtwV6hc9gi6lyJlBliZ9dY 1UimapQ2b+Dqt8ii4g0bg90g6VfQfstcm/gzzb7Bk7B1SDhQ/Q7FMaW3xVRL5HFOU78X uHgopae9vMCNjR+1zFwphnw86oA5KRb80pyG8/rBYomUavM1j3B7GdCsvpNNAwffUKCO 6NzcxizkbPs5ArcBOAR59zVE+GYdq7+FEvcLrWqW4jVEoPDJSHkiuKvqRej8T8R//QXw 0qnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=0t+MXWtz0wYkQj8lFwyvTdlrIgfKGNlhW0Pr/BvASj8=; b=0kAoGrcApVyrxICEY9eec9Bjh4/VV7D1VClTxKQ/+eeFItFY8Um5ORKaPT9PoW75aV vMtVvwROCApO+Thr8j9+IcwH5W9+XkRyEYpKaorNKdYPHGL2WGMPcHQ+CyVEq46ptr8D LrARBtvEX5kE/fGJrb4iDhpFAOxsBG/ws9yT3h5dqUoRF82y3ICaeD/GxLK9JuL7vVb/ stQ6WcyTg9icfnDAWSne21LfZSAE6PEhMpSfJedEEEy7XY9rrNlu1t+6CrGaB75vu2D7 cCeaSQd0HOVzZ96PNQmlCgWntGmktKJqDw3jNOtNLwnRvhSSpa2GSCqYCOBIy/BRPiKG c0Dg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si10892065otk.86.2020.01.15.02.50.25; Wed, 15 Jan 2020 02:50:38 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726440AbgAOKtW (ORCPT + 99 others); Wed, 15 Jan 2020 05:49:22 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:32843 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbgAOKtW (ORCPT ); Wed, 15 Jan 2020 05:49:22 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MWAay-1jApfm21pi-00Xa9s; Wed, 15 Jan 2020 11:49:20 +0100 Received: by mail-qk1-f179.google.com with SMTP id x129so15152028qke.8; Wed, 15 Jan 2020 02:49:20 -0800 (PST) X-Gm-Message-State: APjAAAUS+G+kHEaD3VnBKf2Be0T/HuC9ycpmmCkUlkdzy0LSqyzoO57y i7t76cYoAPnThnktoI+RfU9etpEW/Tzo+Mql/+M= X-Received: by 2002:a37:84a:: with SMTP id 71mr25699141qki.138.1579085359252; Wed, 15 Jan 2020 02:49:19 -0800 (PST) MIME-Version: 1.0 References: <20200114213914.198223-1-ndesaulniers@google.com> In-Reply-To: <20200114213914.198223-1-ndesaulniers@google.com> From: Arnd Bergmann Date: Wed, 15 Jan 2020 11:49:03 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 1/8] compiler/gcc: Emit build-time warning for GCC prior to version 4.8 To: Nick Desaulniers Cc: Christian Borntraeger , Android Kernel Team , linux-arch , "linux-kernel@vger.kernel.org" , Luc Van Oostenryck , Michael Ellerman , Peter Zijlstra , Segher Boessenkool , Linus Torvalds , Will Deacon , Masahiro Yamada Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Q5qixYB3a1v4oUpjiPFKsupY0vRc/WhIhIV2W+YOmaig7Ji2CzT UMKhoOID58MNc71U5purxEfZ4M5bjTWD6hvoLoHF05hsoKbeHM1ZpYizUC/TbsuShgN1QTH 7LL6PEy5W2j+MOYfTP/K53aqVHyUuraDgl2OS/SLytbsCQciXgJ2B4CTT9xy67DAm+8rX+M 0zTY0Enw38HMRMS2L1eFA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:yNPqsFBf42k=:6LFXgCJMYu9dcqahQa8E6N QzCc/Se57zAT+n99E938ETYZAEg6+yIgbo1jb25YpgOrHBSRa4fYwCFZiJjWkmRYWvz5F+Fwf o0GpAp/B7kLYsZOUyN3N4ZgZS6GwaWI3zHeFaRgIKmFomCD+fW/F1K6Iel/Qnu/ZlsSJs+G73 dwgkutaRsDoVxvAGSkfEP032J6saCluLep5ulEwtmdwX9VkoT0EH5pXvotCXg1TWVUMLpcaTg S1V0oTWp5axqXPSuOKMIr+K3ayZ/0jV/1NjwVmtzngWBGP1E/oo/PDzuUJHhj59tuu5chC0S4 xjfzs0bt1jNVz3/6XRsign++c/RPaHbaZaNCNbuOCaNpUgjVd8U7aGJtJf0h3inzjYffJ0B6H glNSdEtNcIjvGamTsgNacY5AEucmb6H6+0/RJeGb8o1wL5TNU7feV7mOQCkhfTx+03pLjMT9g DF/8+nt+yreizVeHIT2Q/ZuPAdadeHsGSloeJAdtnOGN9Gh/H1EfhGrpGmiP8FxzgwQtmvG40 lVCLOn03/L/GeU9nlQmIJthM8cjaGtWO9Pv/LR8J9V91emnDMuYYw/ZTlB0pVK0qBsNc7ueCW rKbDM1KhlkPTPIH1gnXUTkC+as7P22smNj9RSwFkpAOPYV6M9W/1tbq5a4Jodbr86gr0kC/1g 3PXxW+DKo5rVrtMNw/HyjmmwtALuhWEvp6f3tjdmYrt9/iccAaZywb8zgAIU/BTE7BJGTuCb8 SRSR7H/1YlC/ILSQcuuAwCirXYafm1BFbqWzl2PrwoDTHS90jCoej+VcPYcQpIRDlgO9Suu10 YAMA2bYZP/jbsRof6RgHDDM1Amswdzvao62BMrJOtxn4VWFyZPP+aH/WaSHfL8LIImar2OaTm tLTFloo5RcETiiCEthNQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 14, 2020 at 10:39 PM Nick Desaulniers wrote: > > On Fri, Jan 10, 2020 at 06:35:02PM +0100, Arnd Bergmann wrote: > > On Fri, Jan 10, 2020 at 5:56 PM Will Deacon wrote: > > > > > > Prior to version 4.8, GCC may miscompile READ_ONCE() by erroneously > > > discarding the 'volatile' qualifier: > > > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 > > > > > > We've been working around this using some nasty hacks which make > > > READ_ONCE() both horribly complicated and also prevent us from enforcing > > > that it is only used on scalar types. Since GCC 4.8 is pretty old for > > > kernel builds now, emit a warning if we detect it during the build. > > > > No objection to recommending gcc-4.8, but I think this should either > > just warn once during the kernel build instead of for every file, or > > it should become a hard requirement. > > Yeah, hard requirement sounds good to me. Arnd, do you have stats on which > distros have which versions of GCC (IIRC, you had some stats for the GCC 4.6 > upgrade)? This allows us to clean up more cruft in the kernel (grep for > GCC_VERSION). This is the list that Kirill and I came up with in the thread I linked to > - Debian 8.0 Jessie has 4.9.2, EOL 2020-05 > - Ubuntu 14.04 LTS Trusty has 4.8.2, EOL 2019-04; > - Fedora 21 has 4.9.2, EOL 2015-12; > - OpenSUSE 42.3 has 4.8.5, EOL 2019-06; > - RHEL 7.7 has 4.8.5, EOL 2024-06; > - RHEL 6.9 has 4.4.7, EOL 2020-11; > - SUSE 12-SP4 has 4.8.6, EOL 2024, extended support 2027 > - Oracle 7.6 has 4.8.5, EOL ?; > - Slackware 14.1 (no EOL announced): gcc-4.8 In an older thread about moving to gcc-4.3 or 4.6 as a minimum, this were the even older distros: > - RHEL 5.x has 4.1; extended support EOL 2020 > - SLES11 had gcc-4.3; extended support EOL 2022 > - Debian Wheezy (oldoldstable) had gcc-4.6, EOL 2018. > - OpenWRT 12.07 Attitude Adjustment had gcc-4.6 > and is still used with devices that have only 4MB flash / 32 MB RAM Arnd