Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp42264pxb; Tue, 12 Jan 2021 19:28:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxitOj0hFuZvxRZ5AWTfoTqK/uKYk+jVbRcgmoaACqiIGuofjQVV+7yr7YEONc8DqEY8GSQ X-Received: by 2002:a17:906:b252:: with SMTP id ce18mr63565ejb.5.1610508493277; Tue, 12 Jan 2021 19:28:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610508493; cv=none; d=google.com; s=arc-20160816; b=mF4SCT9tBdsiraTc6NiGopvA7efnn6KwMUF8SbshIN71XQERfi12QipFy8xDPFpqRJ Wjdrlvg+w0U2sQbPm9s9ZByzivqOYzOCZRG/lyES4cT384+xHX9mcZwT7AXK301FDvrR rXXb84udnDfUpsDkikF8OrjoJJIRFYHGfsDVGGJ8b0E+PcxlqgC6ufNP+s3cN0r6O9KZ 6K7LeMn4OqBGmt6+IjpwUFg3GZtQ0Wjt19IXBV4eJI+yQBfsmvd+tM1xzxLlBEYgTc1W xIfamW+r5TCsKsyVnSdx6g+amGoIcPNJDWebBNRiMuZa7wnTzMIZWFAvcKqBqWvzZTIw FHxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YaAZECbdA3slTbiSWayTFRmmhclS7xtPrtvRPKQb2ZA=; b=Ix2+r+A7Ce2E/ji+mgEyoMEaUaa56oxC3NMidHyf3ld2gVPOuhnAbkTK/8pLBjj9D5 RiGFXf5uImlPX1hswZsjiftSFleBiw2BV+Z28ok4DzjPbPL+pSE/xeZkOIbzlKnrT+68 xisSrB5O+WAS15XmmzGsyVx3Odevpy8Gibm/Uy9yY6MXa08xPxK1TLm5nTJS7Bngi0VB WqiCawrrrwijeFRYeaoAd2qlSxrKP8pSOvUEkmV5GASf2YP2vDCEmUypr2TXdj28YyDM oN+36cU0j/G0xI3RIS0ycnsp9CVfUgpAtadnF/mkKFkKlSK0Z6tH9lDMDcVw7/P9HPAp 9phw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QoExkiTy; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si297305ejk.273.2021.01.12.19.27.50; Tue, 12 Jan 2021 19:28: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=@gmail.com header.s=20161025 header.b=QoExkiTy; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391842AbhALXHV (ORCPT + 99 others); Tue, 12 Jan 2021 18:07:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388864AbhALXHV (ORCPT ); Tue, 12 Jan 2021 18:07:21 -0500 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC213C061575 for ; Tue, 12 Jan 2021 15:06:40 -0800 (PST) Received: by mail-io1-xd2b.google.com with SMTP id w18so334419iot.0 for ; Tue, 12 Jan 2021 15:06:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YaAZECbdA3slTbiSWayTFRmmhclS7xtPrtvRPKQb2ZA=; b=QoExkiTyI0PU/oaQzWOwntPo/ouSQzfufTt3xEBWkZLTE7cwWmf2KF/b3XgOrQewVt /wvXNXGiDHKVuolh0064ChHbROBMdViIngyUbFeGlA2wz3eeQ7Qv1ylNmYV0+2fDQfxX E0K65wBPnGEJiiTtDx0FNOc49Ecf0yKHY/0npFvVb1k6wSq/8kfp6A5yeRcFfupT55WU vCZWgCAr1e4L/u7hRdU7J6Cm2DgF+2xgjXljkV9VGXLbOF69PUHm3aWRVrC7pxdE3B+2 Q5ucSwLjEWyUhVXPrGIS4ek+/sUQnE9HIJBErDpDh9/z8c0T3dBO6KbCqGtZIhe81Rj9 prfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YaAZECbdA3slTbiSWayTFRmmhclS7xtPrtvRPKQb2ZA=; b=AIZyXIn7OlOD4aH66/A7c2g2Sdsb5G5TJ82sC7rWk5cS/7303g4zkoNafniK0qyi6t BmZ5EoH6KmzNmd+MMKpJUqrqpl03cK90ZBzbKShp7HI+YLunuUyvmViT+OLkiikmr14a ckoZtLnx1A0jCtTcCtKsw1rb7GSaZUP/SVooEteO9ne42gtI3JixEoFm1Yy4E67l5PD5 XNeaUEA1hgBx2iAhubt1DvrsjDCKCHPaYpT2xMSzSu3twM1IAwWj2RbgUkNb6gxvGy0b Pi2qlgiSZyQN4+h95Gkh0vvfy9/9UELjynYRzJi3apTAGvQhRIv/wzYxW1xK62EsEbVy /qbQ== X-Gm-Message-State: AOAM530wdCapf/YNGBq2f6+oYCeBd6G3N1Yehl/NGJzzPls90RHpb6Wo GZxd1QtNaTb17POod93PVKMVYEFAsN5ocw== X-Received: by 2002:a05:6638:1247:: with SMTP id o7mr1690891jas.31.1610492800244; Tue, 12 Jan 2021 15:06:40 -0800 (PST) Received: from ubuntu-m3-large-x86 ([2604:1380:45f1:1d00::1]) by smtp.gmail.com with ESMTPSA id r12sm162360ile.59.2021.01.12.15.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 15:06:39 -0800 (PST) Date: Tue, 12 Jan 2021 16:06:37 -0700 From: Nathan Chancellor To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, kernel-team@android.com, linux-kernel@vger.kernel.org, Theodore Ts'o , Catalin Marinas , Florian Weimer , Peter Zijlstra , Linus Torvalds , Nick Desaulniers , Russell King , Arnd Bergmann Subject: Re: [PATCH] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Message-ID: <20210112230637.GA1480157@ubuntu-m3-large-x86> References: <20210112224832.10980-1-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210112224832.10980-1-will@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 10:48:32PM +0000, Will Deacon wrote: > GCC versions >= 4.9 and < 5.1 have been shown to emit memory references > beyond the stack pointer, resulting in memory corruption if an interrupt > is taken after the stack pointer has been adjusted but before the > reference has been executed. This leads to subtle, infrequent data > corruption such as the EXT4 problems reported by Russell King at the > link below. > > Life is too short for buggy compilers, so raise the minimum GCC version > required by arm64 to 5.1. > > Cc: Theodore Ts'o > Cc: Catalin Marinas > Cc: Florian Weimer > Cc: Peter Zijlstra > Cc: Linus Torvalds > Cc: Nick Desaulniers > Reported-by: Russell King > Suggested-by: Arnd Bergmann > Link: https://lore.kernel.org/r/20210105154726.GD1551@shell.armlinux.org.uk > Signed-off-by: Will Deacon Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor > --- > include/linux/compiler-gcc.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h > index 74c6c0486eed..555ab0fddbef 100644 > --- a/include/linux/compiler-gcc.h > +++ b/include/linux/compiler-gcc.h > @@ -13,6 +13,12 @@ > /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */ > #if GCC_VERSION < 40900 > # error Sorry, your version of GCC is too old - please use 4.9 or newer. > +#elif defined(CONFIG_ARM64) && GCC_VERSION < 50100 > +/* > + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 > + * https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk > + */ > +# error Sorry, your version of GCC is too old - please use 5.1 or newer. > #endif > > /* > -- > 2.30.0.284.gd98b1dd5eaa7-goog >