Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4027148ybl; Mon, 13 Jan 2020 06:41:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxCEmdrOYr9srmS1M3snSVzChj/cks/vOq9IrOS0mrI00tNUHzdBu3cixptD4BuJPG/y8uv X-Received: by 2002:aca:d6c8:: with SMTP id n191mr13707640oig.103.1578926473596; Mon, 13 Jan 2020 06:41:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578926473; cv=none; d=google.com; s=arc-20160816; b=I4OAv0I5ilEdj18UCoBrTW4kwT0PB+w4TyXGW6cboI3XAIn7vjELKzB5N9MIxcks5N JYL739+airQtu6p46elSMlEdk6fBH+SYNBShzfdupGL0VviX9tDrqbqZ6LN++qyZyZFw YUTn21TpUGB9SNA5RSEODt7J+MpP+4LSGBbEjhW29HdOqsjD/hRbdMhrVulRe4CkZFNP 30w2su5ZREWhxqXN3el4hUHSLehdq1BoGU0PJSBzAm3oE6gzgwtLNYwfZaPF6gZkzegj cxSKBJLc757zP/qEoMmR372pjdqU6h6vDAttC/aqQdGHw6/pAZ5cOeJkLYfmb0baMCFO O8Lw== 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=7LPjcmazLnSxB3EcDJ1AY76GY0pKVZM4bo4lC04GrJQ=; b=tZ4n2RnITjzwJx6Kb/rvU65P1D41wI2L0O0A5O+73TtMC0TU8sFKF+7/stWY8a79Zd eGuKZaLzG/xTQka4BAmJrd/1G774tqOgDPZL3kspBwygOyI5rkhn12CFanVQ18WdzrkX mhvLl1JFm3Np1QEGnOCNo4QFqUy6qioJbXfz6waVOlzLyunZlMGn8wVLD2gHOG1S46zX bVW4Ph8D62dZkqaeYaPb9XJzJhUALxUo5LqIr1XMzwnSu7ZZo7KRsAewcfFMS+Df8dd4 O4rRxCI6Urfa3RT2IZNwi3bOvglZbPvzbkhTNHpWgcyx09aABVh/UKDEshVyiNtcWeLi KnOw== 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 l204si5607444oif.261.2020.01.13.06.41.02; Mon, 13 Jan 2020 06:41:13 -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 S1728871AbgAMOkF (ORCPT + 99 others); Mon, 13 Jan 2020 09:40:05 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:38769 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbgAMOkD (ORCPT ); Mon, 13 Jan 2020 09:40:03 -0500 Received: from mail-lj1-f173.google.com ([209.85.208.173]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Ml6i4-1jVcZa0wRw-00lTV4; Mon, 13 Jan 2020 15:40:02 +0100 Received: by mail-lj1-f173.google.com with SMTP id w1so10347745ljh.5; Mon, 13 Jan 2020 06:40:02 -0800 (PST) X-Gm-Message-State: APjAAAWzD2ul6sj5rXLMJh6USlbl9+jEM5edJO9fuOZ9NHXkwo5abrxC W9AznZbF3fycNJtTX4qhfE1io+6S2xrYEV9GMOk= X-Received: by 2002:a2e:b5d5:: with SMTP id g21mr11036798ljn.89.1578926401740; Mon, 13 Jan 2020 06:40:01 -0800 (PST) MIME-Version: 1.0 References: <20200110165636.28035-1-will@kernel.org> <20200110165636.28035-2-will@kernel.org> <8fe4f81699517758b44afbe0e1a53bc080f64a62.camel@perches.com> In-Reply-To: <8fe4f81699517758b44afbe0e1a53bc080f64a62.camel@perches.com> From: Arnd Bergmann Date: Mon, 13 Jan 2020 15:39:45 +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: Joe Perches Cc: Will Deacon , "linux-kernel@vger.kernel.org" , linux-arch , Android Kernel Team , Michael Ellerman , Peter Zijlstra , Linus Torvalds , Segher Boessenkool , Christian Borntraeger , Luc Van Oostenryck Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:3fb8OaF47jNPkU9w7BdKJ+Mbx9CBT63TVUqOnD2X2APo3pepp1j qfqBVCjdOzuMymbGtjeyRYNBSSF1KFj/FsIxDZwGLKcKShfe4SGA079YWcijY4TK/Hzams7 tacw5suIT4/Vw556Bb3qHPbwM1G7c4dq/FuSJVA8saQ7au8gbjzDqWx6o2Td9JWr5mo1CM4 J/GDtkQLC4qa8zyFtExCA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:0hMiuvmEWa4=:IEnRoS5lIk4tJZDzirdCkJ MLLloKSgGBLBT2SB8S34L9+190u4DKsvRZvDwYYJixcEwNNvs6rqbxe++a4Qjs5oho/10zKgx r7JYCPRlPgjTc/LOJgWeFiQNRX5mP/xVIyrg9GvV5X3tOyMYukV/GGnf1iNwJVgnMRDK4NrFv RwwEW83bO3oVHsyHGNLfRCyD1hoYeKE2h7BjJWNHiRAPBECRF6rPPDY6utyOXVWkJWCDsJOQX b19pjMPGFWl02fo9N9OeCAdF+2ftPBcGQofTubclZ76/a+Avp7gKPuXQI86C8fuOBc5OM3Dd5 w8uZmSXHwPI4c5rPo/MxiM7LuObG56HuWQ/SIXyQsgmbzBWKgkFFkD7tIjOI5yWTcOUaZRIbm 52P3ZGDCOyOrBZtLETMqdAs0quYCP1/hZqLAJ7XC1gqTTT0e0KB4kwFjzewODMXzb5h90ayD4 I3ZEJEyJOq7CNnaX5mOTX1wj5fm1Nh3JMsXWEy2vmqKC1jwoe/0HW/bGoejTRCMIcIKmh3QIj 4pfwuV3AqRx2KayTn17MfDABC8SIUNuwxByLF7B6MZILP4OCmqUzCblAmmCtfOGahC5sZKaR7 rYX5BDzZolZN09PnmYmyoFiJ7SWr+eSV6FuMJs73w9kxuqHFIQE9HheP4rOL98sQoD9xh7US3 aqNviaxiq4EWXFjjYilnaKsPSsxYnBZdh8Syxyi3MmLyNdEAQAMBBBcM1JFPpTon6+oGhRRwG QmRlxtX87M/XKREA+/1BuLh/1+6vnno6R/J3QI+CfoiTRN4iiy94ibzUf7Yxqz+6iSR/Rg0f3 ziUbHmJ/a3BW0XByP86Z0pEw2Or8WFH+eF1AjFh2FV+wR4IfhZr40HYfwofgWjFngnJai2A/C KoIpEidkRLoHYroi5Dtg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 10, 2020 at 6:54 PM Joe Perches wrote: > > On Fri, 2020-01-10 at 18:35 +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. > > It might as well be a hard requirement as > gcc 4.8.0 is already nearly 7 years old. > > gcc 4.6.0 released 2011-03-25 > gcc 4.8.0 released 2013-03-22 > > Perhaps there are exceedingly few to zero new > instances using gcc compiler versions < 4.8 The last time we had this discussion, the result was that gcc-4.8 is probably ok as a minimum version, but moving to 5.1+ (from 2015) was not an obvious choice: https://www.spinics.net/lists/linux-kbuild/msg23648.html If nobody complains about the move to 4.8, we can try moving to gcc-5.1 and GNU99/GNU11 next year ;-) Arnd