Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1259961pxb; Fri, 22 Jan 2021 10:48:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJylkI5dh7gtaDtNEK0TaGhr5zaGZO5fq6wlZqe2FtVMFbAo1/wXOwtSiT78ZksxZZ/ZeXmN X-Received: by 2002:a05:6402:c92:: with SMTP id cm18mr4484491edb.367.1611341336316; Fri, 22 Jan 2021 10:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611341336; cv=none; d=google.com; s=arc-20160816; b=Ud6MrZaU35uOhEPvZlgGXYrI2KWdnIj4XO6rw+dtvkhZLqMJEnGgiuiRGjYBhP4r82 rycc71R0CTN/mmhCXzKWdJr4YfDvR+6xOldvCnnVPPR095bGGa/8h0vwot7fTXom7GYi fVt+yHPmzIgHwWP8bxLOSsTyIHnbpWRPBRHAnQfEhmkUJAp+nx15huglKJ+V2T0qHQbd KzgKDUyH8FUquhwsBRS1B0DnFtTgCTRTChrkkXyEjJM33FFCMZVCBefJsH9k4u1jksfM BkbqBDUQXftcdhQPjcLThCqSQdZD1P0WKEHGzs64nTg+py4sTzsWvnAp1jR3eZhlKHuJ leBA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=heQr1QfdaTqEkoAkM96E6YWRpLFPoj0xY2q6O0yRZMg=; b=Wh7pmqSgkyQx7Vwkq7GeyQQ1M9Y2eYwrNPlJhN1p2vvjlTKy0iS+Z8/awSCSjkqqvW 0S5w3F+Mz5Xfy2CHR0LNIHFx5PcSRfbRMQd3O0UryKZPvMVedj9ThNu/yjYNPgOY/RRV W20/I9w/9cJE5BzAfPNDAzOElXqhhbtH5C4Y4BsncAto1aY2YHPmFA39R5VQ7xNi7GZA HbWwxeyphHYz+UsIoVfF2j2fk3tTt623d5e6y8Zyzdp+dBQL79I/pjymluXJN2Gp43k1 EAoKTiook+mo7PCdrQc3l2DfbwhbdD4O8UFr9zM22NU3IXMOwkHe7xhGnDmcUED3sTQw pRmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i42qypTm; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si3792637edz.497.2021.01.22.10.48.32; Fri, 22 Jan 2021 10:48:56 -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=@linuxfoundation.org header.s=korg header.b=i42qypTm; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729481AbhAVSrl (ORCPT + 99 others); Fri, 22 Jan 2021 13:47:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:40004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728564AbhAVOWy (ORCPT ); Fri, 22 Jan 2021 09:22:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E325A23B6E; Fri, 22 Jan 2021 14:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611325008; bh=x/cYqnMswUjsuRcjxsP2jWQkelAxbep1OB4wn2XSIJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i42qypTm49YlezgItR813xe8O7+u366OgoT/dLIqU+Cxo7CKXSIkV6o/dYSKJSC01 iEzHUGy4Z+Xjj5O524d80qeQWgDsiyotB1gkR3E6UuRR3Q7Mvn7t1xWjO0vFfzZed7 aDahn/L4knE0ObMrPLjEMDqS+vkkJ5h+gOkzq+nA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King , Arnd Bergmann , Will Deacon , Nathan Chancellor , Nick Desaulniers , Linus Torvalds , Theodore Tso , Florian Weimer , Peter Zijlstra , Catalin Marinas Subject: [PATCH 5.4 02/33] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Date: Fri, 22 Jan 2021 15:12:18 +0100 Message-Id: <20210122135733.674268196@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135733.565501039@linuxfoundation.org> References: <20210122135733.565501039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon 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: 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.19.y/5.4.y] Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- include/linux/compiler-gcc.h | 6 ++++++ 1 file changed, 6 insertions(+) --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -12,6 +12,12 @@ #if GCC_VERSION < 40600 # 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 /*