Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5033161pxb; Mon, 15 Feb 2021 07:51:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVaCwYoJx7WsCB0lwyp9jriqDLEMUhive5ppyUcn42F6cPG7d0WagzAw4Sw0iuxxg/j6Tf X-Received: by 2002:aa7:df01:: with SMTP id c1mr4755077edy.27.1613404270041; Mon, 15 Feb 2021 07:51:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404270; cv=none; d=google.com; s=arc-20160816; b=D9pp4Uj8w5/rnA/3TPfnKJ9vzASI99b7nJ6yXMzPqzCzxXKHtvYcuBRH+991ethJ0x eqIzng9Dg6O0UvRUoL67dOMK2uWEagFpdr3oe2G39dZ78M1tCOyIPwhTKvjFL1o9Z9qN 8baWp3GVXZmSKmqbHblNet/kAwUI4U30bNRTLIvaZ8B8Gt/FPBegLEZYPrUfOuxddVGm T7SuCf96yVZrZQcZDirXdqc4V41cTSQd2aK42/LHQi7EEU/Amh1rsm9lSw2mbY9UgpZS dG2C/BayB2ibTpwF1vriagzjPwfBcOcTFN1IPo8gAn7Lc1yc0ofHfGcUTNgQZneCrbae a7Ww== 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=A6mV8hAogLMqk35X5uhc6VBBb1btTvFotP9shZObkbE=; b=D0kz7vx8Vd3oqVRONN3BxBgpwkMLJoRupPlVVOKjrVEL5hnQiL7e7wzpW3Z/Vjhf0X kXMJkzYNJZgoLvPWLLftq3N9+qFIH6gCnemjgRFKBVFM48qfbIWb2yygVOme3ezlhpKl XMCks29mPkk17Yst4DVoy6TLSzZwjG//OVqdg2esgI/7WZf5Nc+77r3hazq13CKVD36U K6GZSr1ytWHFIYPD0Ss8bRhzWnbM3f24Lnb8d5g7YA1DiiV1Bf+eA5/wNEWK88aK+HEu STdYcWkF7S/ODWHV318gHQ0giXsbfWp2SQ+CPjCnH+cApSkMQijqxvA7XiBJaYP7Kfsb A6CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O4Rb3To9; 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 cx20si12926963edb.89.2021.02.15.07.50.47; Mon, 15 Feb 2021 07:51:10 -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=O4Rb3To9; 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 S231836AbhBOPry (ORCPT + 99 others); Mon, 15 Feb 2021 10:47:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:45566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231221AbhBOPbS (ORCPT ); Mon, 15 Feb 2021 10:31:18 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 297CF64E9A; Mon, 15 Feb 2021 15:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613402969; bh=61DR1XBeTsw7rAnwTBEmMAQ0YsdQEW5wBadwXUFrbo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O4Rb3To9XCJjjRMrMlp6D0vhz2H09RZeBB/fb33yqZDIFwltyDW/hgN5AOAPBkcp0 6nJ1Imot2+/O/AWtkmYs1/TEsYuka0swxYq2mXCCqrHlc6X96g/lW8LtHMsYRWZTdM SM8Wu14b9NMXtDVKSBMlXCu7bhWbjlyONGAtO+DE= 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.4 38/60] x86/build: Disable CET instrumentation in the kernel for 32-bit too Date: Mon, 15 Feb 2021 16:27:26 +0100 Message-Id: <20210215152716.579239293@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152715.401453874@linuxfoundation.org> References: <20210215152715.401453874@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 b5e3bfd4facea..8ca3cf7c5ec97 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -61,6 +61,9 @@ endif 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 @@ -131,9 +134,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