Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2474640pxb; Mon, 18 Jan 2021 20:26:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJyu+E9PRyjAgurFfrmWXrMWJQCeQVlegfMOjNAlanTl/ucbn2Kv0Wey63ZiF+SgUsqum346 X-Received: by 2002:a50:fc8c:: with SMTP id f12mr1885867edq.225.1611030407273; Mon, 18 Jan 2021 20:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611030407; cv=none; d=google.com; s=arc-20160816; b=e3bW4WNtGL1fqJekhB775Bss/zLzIJ5d4DB1omA+6jtOGFFYzTNFl5oWV8GxpWoM94 fpBhUQlb/7+bIlL9l7pI+cNBGi1ss55I40WN1WqvIHlq9TsfJxQShuDuKrP1wRq7JkyE fURBcfmEOrENLgMd+CHUFbYXm7rs80tQMTEfhg9wP68P650gOyBU3M/WAiDGDcXuHxYC m61bVP8FtHIz4CBfPfPywbL/LW+IyEM3BVz3HGICaW+u0AM4hdrjoYNiy/KdrrVfn7bE Un1N/r8Ubr1vbNvan3OspI/4kI5E5CP1vrrt70ZBFDK8UnBAsPSfKvVY+viNQ/5raWsN J+Tw== 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=nWjL2zCQ4urWgpdA1soCBAzzuzXTkUPLN69jxdbdz74=; b=S9vyE9ilJWjDcwXThDNqbo8HUl0uPrQ7uWdeOeCWRcDTRd/z8EF+ooKJBXW3B2c+my n1WVzKk4SuS2CFWDnIAdqWk+0PZE808Yhk+pKTKHSEMeE713QG8cRGtj3euCBaTGSH7s iZIyzcVijRvH6d9cE3cSboIl4Q9cLLWm8g3BjfWy5hyrc3b+tbjoLr5+iQfUq7i/KUXm gFRKVfONiBUXtQM1RZ1VBn2Ea/Ju6N3jdTTriXadnkpXf0R/famaz/jvF6pVKlff6QkI PMSD9v8Pv/Jx8Xa7z0J/tdH/qMRFFk6omkBXJFlsXOfj761j1GeuQZiW/JpgHL61RU0m 8NWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JcG5CdDG; 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 bs15si7716955ejb.717.2021.01.18.20.26.08; Mon, 18 Jan 2021 20:26:47 -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=JcG5CdDG; 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 S2404024AbhARNzc (ORCPT + 99 others); Mon, 18 Jan 2021 08:55:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:39764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392423AbhARNzT (ORCPT ); Mon, 18 Jan 2021 08:55:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0A8B72225C; Mon, 18 Jan 2021 13:54:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610978079; bh=Zgp6oPRleT8q3XNHbBe3iby58DT4TI2i6w1BoM9t8YA=; h=From:To:Cc:Subject:Date:From; b=JcG5CdDGxDvYL6EoaLGrtKiN8/LI7sg0B4FWTabbtbnZLhEnPUZW924pNJ7T2MX2v v5tiit9TPc+jEV8gEAMkuqQapXcEcAiLBqyiQ26XeIH3LwXARAr4AC40RYf3LJSC5o OT4PJO/5xxnhMZ5vUWvKgCRPORDhSfp/aW5NcRwZvRPe23O0kZF5nUmVTblSclJtxR P7HH+aHQ4eWXzIyHqsZ17THrydTvoyxrBkOgOI4DGmHNMpVD5HAnw9oPaBQZoIGyVE 8gkKxXdfdwYT9l53eqap06QwnXVEw7ZOtEoJRuVTA/19KaX41lDa1ubCUXgztwYSdP Q5FhAvkZCh5Ug== From: Will Deacon To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Will Deacon , Russell King , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Linus Torvalds , Theodore Ts'o , Florian Weimer , Peter Zijlstra , Catalin Marinas Subject: [STABLE BACKPORT 4.4.y, 4.9.y and 4.14.y] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Date: Mon, 18 Jan 2021 13:54:25 +0000 Message-Id: <20210118135426.17372-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 commit dca5244d2f5b94f1809f0c02a549edf41ccd5493 upstream. 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. Reported-by: Russell King Suggested-by: Arnd Bergmann Signed-off-by: Will Deacon Tested-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Linus Torvalds Cc: # 4.4.y, 4.9.y and 4.14.y only Cc: Theodore Ts'o Cc: Florian Weimer Cc: Peter Zijlstra Cc: Nick Desaulniers Link: https://lore.kernel.org/r/20210105154726.GD1551@shell.armlinux.org.uk Link: https://lore.kernel.org/r/20210112224832.10980-1-will@kernel.org Signed-off-by: Catalin Marinas [will: backport to 4.4.y/4.9.y/4.14.y] 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 af8b4a879934..3cc8adede67b 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -145,6 +145,12 @@ #if GCC_VERSION < 30200 # error Sorry, your compiler is too old - please upgrade it. +#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 #if GCC_VERSION < 30300 -- 2.30.0.284.gd98b1dd5eaa7-goog