Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp40180pxb; Tue, 12 Jan 2021 19:23:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnn2oMBrc/AOLhyJXkcuZKmmOEm6dsu6nyDWqCVOTrPVn0U7bJu3pNRvaoja62SvZgr8wK X-Received: by 2002:a50:f0dc:: with SMTP id a28mr117206edm.291.1610508217010; Tue, 12 Jan 2021 19:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610508217; cv=none; d=google.com; s=arc-20160816; b=RNf+jCvFEFYDVav7tbraAu/KVQKMTawTU/SHn6dqeSARJhpKD4PvLnriaXeTitKXJW FVqnddx0YffMrO5vd6MSf2oyRHBAkzi1BxrHIdxU3deW6bkZDPZ6gb2zekm1OY85PgX/ tqd5GTeNXCEXkKtV0G9xDT6NzDcvUc1AdfrKaMDU+eJM41Y5O8yNHhFeFAOmg/ZkIWHj vt9hQRd6BBIqmpt67EXIc4tuy114GXTzDc2Ya21Ge+FTlmIdr2MlvBsao5erDNz6F6fU F8KSl0rhGCdTvVFDTKVEFG6FTZ1eWfiiuleIHnDVxHwFn2poBubhXV6t6iYi6EpVVODB +OwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5QoysrF2ibdk6ZGZFrhq9beApzdOFQwcVlto5XCJT44=; b=t3+2uIevFe0QTMFLLl6dBjCfyddZvZ7BlB3RqkoDqHIaJuUFyyw8tnAGOSjPrP6PBy WmwXrIaym8dzE2Wlk/6yOVHpu17ARFqsWtaMmTLurnTtKW8hM3QGaAeKyEryKJMw4msS O/5DHwhSx9wMkVOHf+xo9Efc46iX4jjWe7eUWW84GuyKQZR7h3aQXwfo6uL+XOofLOLR 3RWTuBdwZivQqdf6e0YrPtxNnDHcRW4GnVkMToIlAg4jZhgorgxUEwDqGKoMIIM1QwcD KX9kV8Bkxz7YtJv5lsvtd73KEDAjVtcSA2n6DH0NjYTDNnkKPpi6x4bhbrRMNydaXCU5 KXGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B1c8aG43; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si385110eja.450.2021.01.12.19.23.13; Tue, 12 Jan 2021 19:23:37 -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=@kernel.org header.s=k20201202 header.b=B1c8aG43; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394779AbhALWt0 (ORCPT + 99 others); Tue, 12 Jan 2021 17:49:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:34266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732390AbhALWtZ (ORCPT ); Tue, 12 Jan 2021 17:49:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2A5823122; Tue, 12 Jan 2021 22:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610491724; bh=fWxXcxqHEI+KsLZg+QH/ku9lOvit7R1hyoKrLJ/10dI=; h=From:To:Cc:Subject:Date:From; b=B1c8aG435fUbuC1xPq3IcCLLYNeEtR6V71UVoKA0CRGj6sk4ilrfp7b0fcCebrM6X WU3CR8kyi/yFTWvYk4NHtAdLQ8tNY24nf970YY8Cnr81uD4FDFic2bhthnkfot3+ko 3wNV5OAccljPV5wcopvGGzHG/Wms3aXdAFpTBW+fRGwTiv6NWhQlnAV3gSJD31lHz2 VjYFGj/z/3GvIWjbUP7QodBBU1rlhiKV1/rKIldqFoUyo3xsTmfai3rdguqPDDaieB IYQZW+W6JTRl6/9YKKiZfV5OonxmEcbo/E4em1hpOVX7mBukuiQJo5i1u0qEfdp4TD FYZBdsB/G/GDA== From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: kernel-team@android.com, linux-kernel@vger.kernel.org, Will Deacon , Theodore Ts'o , Catalin Marinas , Florian Weimer , Peter Zijlstra , Linus Torvalds , Nick Desaulniers , Russell King , Arnd Bergmann Subject: [PATCH] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Date: Tue, 12 Jan 2021 22:48:32 +0000 Message-Id: <20210112224832.10980-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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