Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1266733pxb; Fri, 22 Jan 2021 11:00:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlArDFoilVxvchViRfzHQfRPuh0Uv9P4WXHOCF+DTYMtB4enEPiBOKUcvUIRWnhtAHMuYv X-Received: by 2002:a17:906:6dc6:: with SMTP id j6mr342482ejt.88.1611342047441; Fri, 22 Jan 2021 11:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611342047; cv=none; d=google.com; s=arc-20160816; b=EJZGF4a0X8LU2PrJpsamFVAYrY2zxTc86/xpCLMEaEnbyGZeDwW0925oy3nzHQgs/U bz/XpV9+6vmkgeOlBGPQkCDMKrPWk+gOfc/Cr7DIyjfIGosTyWUkXlXYXFUAMEf4O+XN KcS1Bd7vQJ78aTVck42kGHrN+L/bOqZVcRYeL+mJn8A+sAmF3e++s0LMNsbrsyD/85rB nW/l2xWJPtQ7n+JSc2GrvmZJrXmkxlXwzd68M8bQvPN95E2osWhi6h68c5H5eg594H6r Y0k47gmtgcl2ErNSmur9/G8PFAqBXxuw76H5rUGXfcYIS2qBRS1bqD8HWIsG6u2DW2/P HUDw== 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=jF1/a94tqDhPI3bNoXB+51qQ4SQsjYba7+t4k3wC03vY7zMFeFLzlGJegdP7OODJUY LljvX1lLVRh/G8y5AjcSUUn0KccDXiz3CjL9X+DBm1GFR+Whx/ogizre23w1R9SNe9cz vB7SFFPkq4MIWefqxnvlYdOEdsmBDGtkkaMveWQZXJNpg5QdusRV0TKSQw5CN/hneJG5 8ALnFLzzLBj0F3NHG5TrqgNZrV8JgtQ+Dz/ut7NrQqP736MIJBqwcqRCMPcXP81+2ZT0 GH3ogDy9Gx/kIZa/XB7c3lhKyaZs/G4GFs3IAsENgsHqWbCFYDXIK6rV+VtSlJRR/Cyn Zf2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V9J4IBWe; 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 z17si2267661edr.573.2021.01.22.11.00.23; Fri, 22 Jan 2021 11:00: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=@linuxfoundation.org header.s=korg header.b=V9J4IBWe; 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 S1730253AbhAVSwc (ORCPT + 99 others); Fri, 22 Jan 2021 13:52:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:39964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728540AbhAVOWO (ORCPT ); Fri, 22 Jan 2021 09:22:14 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F379A23B55; Fri, 22 Jan 2021 14:16:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324989; bh=x/cYqnMswUjsuRcjxsP2jWQkelAxbep1OB4wn2XSIJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V9J4IBWeInOHKsxlILr2BT6e4zKUboVNIqFF+fjiztKty5f0YkSewqlaWQgxQb53K 7paTn3+qxWxtb01Fy+6J5HVrifS41I8W1A5UwrcKXuM6KtXmSmiGfod+Gq5hCgWuyl NCqwC2sOcF+sbfGKwIet3eAO0YsrJcEaLNX8Hpds= 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 4.19 02/22] compiler.h: Raise minimum version of GCC to 5.1 for arm64 Date: Fri, 22 Jan 2021 15:12:20 +0100 Message-Id: <20210122135732.022550230@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135731.921636245@linuxfoundation.org> References: <20210122135731.921636245@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 /*