Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5070359pxb; Mon, 15 Feb 2021 08:44:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNgKPe6TYagTuqMTjVOdhLRflKTztbg8vV/OPPI1T5dR5oDsNl/PV1TI8aidVfG6AzUYuG X-Received: by 2002:a17:906:3856:: with SMTP id w22mr5491206ejc.77.1613407442522; Mon, 15 Feb 2021 08:44:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613407442; cv=none; d=google.com; s=arc-20160816; b=ipPweov+EeCkADN8d1cXtVUzcekFMLfcIKvK6J/NS8pqSR3jEfrqUJTYXcQ4p74E33 pRxU0fYu1EBRk2K7KF1kcl0b/1ixBNucJESkRWL9RRRSnrjI6SfxRpcGk+Bh3ask1TlN AoKDC7fj3l71Ss4Gof8QownXVx0QQoI2lgDif6AMbejP8+ZH0lTSGbro2hnwptCEcZFR dA4BPFcoleVjG48nMDq5BVx6d8l3TUkZ1g79IZjE7YnAVizRJoL6SFrXLpS0FUF4Xj1F 6ThwkL1y8zXxhWehanssWWpH0xMTqJSbTHZB+oq0WLMJnmM6miJdgqMvUqHbXj/Xy6y1 zBQw== 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=PuPd6yTNbLwKCaL9oF1Hjzx1ovbRB8ijq6r8jaYLMmk=; b=Euj/AaWv8DOEYpFjBvykla0gmjoY6S9jdFaTG1rmw9ghKypNz39HFZ1M2SPSuvM7X+ /D5YqUKsXERoEqM/smrX6ydDoyspIrNu/v7SFn/dcz3okc/PHszx5Xxyme0txvTiygi0 eg24BCEvP7SzKUjboj4/RDLE2sE7NjsnQSfkzd0rOKCVoUDEWINIlmzMmRIQXmtGblfD WJ4cMb6Qhug4EWbd/NPdBpPTtLQ/FMG9VT4zDrYrdU/B2YcxkPi83mrHLvaSHL/aWwlo 6Hprov9X1Ivi3phHjlzlMEp8c13iV/sSRftfNXKOy6UiTIKGS7XpP05c96GFx5O8F5MT ATcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=K6aDbQ28; 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 hs7si14591675ejc.745.2021.02.15.08.43.39; Mon, 15 Feb 2021 08:44:02 -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=K6aDbQ28; 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 S231839AbhBOQkr (ORCPT + 99 others); Mon, 15 Feb 2021 11:40:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:49782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231531AbhBOPh4 (ORCPT ); Mon, 15 Feb 2021 10:37:56 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77D8664EB6; Mon, 15 Feb 2021 15:33:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403218; bh=RsVJ3ZzbahlO33rvIw90SxfYRw4YLDY5kLKyW79RwKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K6aDbQ284u3+bWrKH2PHTo0bPF/H1gopDUvyWF/T9rvlJEF083a849Y2P0afu79b6 LegaRDDzsNS7d/7YHbyckzmdBG/NPce957yJSVgt+aWQJHZmav6IrPZ+ECN1nUP4MX r4g3R2wEhzmhhkPVEYKHXH1GfspwJTqGibhbJYgA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, AC , Borislav Petkov , Josh Poimboeuf , Sasha Levin Subject: [PATCH 5.10 071/104] x86/build: Disable CET instrumentation in the kernel for 32-bit too Date: Mon, 15 Feb 2021 16:27:24 +0100 Message-Id: <20210215152721.750388925@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@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: Borislav Petkov [ Upstream commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 ] Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It would still fail when building a 32-bit target. So disable CET for all x86 builds. Fixes: 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") Reported-by: AC Signed-off-by: Borislav Petkov Acked-by: Josh Poimboeuf Tested-by: AC Link: https://lkml.kernel.org/r/YCCIgMHkzh/xT4ex@arch-chirva.localdomain Signed-off-by: Sasha Levin --- arch/x86/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 6a7efa78eba22..0a6d497221e49 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -57,6 +57,9 @@ export BITS KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow KBUILD_CFLAGS += $(call cc-option,-mno-avx,) +# Intel CET isn't enabled in the kernel +KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) + ifeq ($(CONFIG_X86_32),y) BITS := 32 UTS_MACHINE := i386 @@ -127,9 +130,6 @@ else KBUILD_CFLAGS += -mno-red-zone KBUILD_CFLAGS += -mcmodel=kernel - - # Intel CET isn't enabled in the kernel - KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none) endif ifdef CONFIG_X86_X32 -- 2.27.0