Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1541641pxb; Mon, 22 Feb 2021 04:55:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxiBVkVssUXpl2uAzrmVo3GPfCI8p641PldsGkwaJTz9ZXHcyutpHOPvBLooua2/xN7ceyV X-Received: by 2002:a17:906:bc4f:: with SMTP id s15mr17586488ejv.154.1613998552087; Mon, 22 Feb 2021 04:55:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613998552; cv=none; d=google.com; s=arc-20160816; b=cKG3YCdMe78tm6Jig+7ri9MsJi3n3ZihrfJsrcVvhO92PAKQ/zsugAUlYs+gHBwb8h sdpXb58SxRpe+KEUvLgu40Er4Ihk4/ujjSLVa5VsN1W+F66S2+pyQPt31JFL4qSD4QTu +2Qjz3n/sr+PUELBMkd9Ib/X16FxJxykj59HXgLnBWwQVL+4lMnSz5ruj5B523GaIAns ugphu9uHhvG0heiCcTZtUiy6yrXPRExWSusRkyC74W71112gUhZtOgBWHowu5tb3vqOA cJtcgLJZ7yyqzyuBLFk9EHWyq6ODEWEoJmqRZrcdoYfpnW9y1qw2nuaaHndFj+kpLHOZ LO2w== 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=i7WjtaIE1hBMDd7TnW7y9igifgqXuNdwVflWTIK8uu8=; b=yd3VEMu4ruwkMjFUlGP3mzRXN6QEvNeRzrQTrKMYUJMWcrxsverySRu3rCnG5TChSN pBrO7u3zAbA0Kf/DPslDrpaL4Pg5m7Lv59MpIN4RN7mmA0sddWVsqu6XRTovz/OcT4G1 uRNdWwlSrJ4hZjgP1rktK5wckTP/xBMorde7lLVOi6Tl1+v7dZrcr8iCcuiD/xGsE28C 2KzuoHBzT9K8BVBXaGxjdP934j5WrJuH997LvLnr3FOCXOzGh9xuZ0XA/xldAM70/t+m 9KZi5kQ/PAvtQj5mK8yrl1WU6hc0E8T1TWpvx/eJyJvh+WaS5YLglClGFkNGpSRP3EEF DY8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q4cEO161; 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 j9si7474831edr.342.2021.02.22.04.55.29; Mon, 22 Feb 2021 04:55:52 -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=q4cEO161; 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 S231717AbhBVMwx (ORCPT + 99 others); Mon, 22 Feb 2021 07:52:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:45328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbhBVMSC (ORCPT ); Mon, 22 Feb 2021 07:18:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF1DE64E67; Mon, 22 Feb 2021 12:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613996266; bh=WxhDHTRvfz0JIMQZCqsuB2dgx4sGKbY4fy2Y03EJsME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q4cEO161Sn7Af2p1agOcyU+PorxoTPi1jpv1pLSGsgCAsn94aO9bP+mZlOJBE9onw 1s3MxDSfMupy1mzqDak2g5jJU066LdzbNE4XhCbijsS8ts/Fj4Li2K25T7e3sfo4Dz j7BJFupuNrGtRB6MAOyQH6CQZ6ZrTTvwoyI4H7YQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, AC , Borislav Petkov , Josh Poimboeuf Subject: [PATCH 4.19 37/50] x86/build: Disable CET instrumentation in the kernel for 32-bit too Date: Mon, 22 Feb 2021 13:13:28 +0100 Message-Id: <20210222121026.390445870@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210222121019.925481519@linuxfoundation.org> References: <20210222121019.925481519@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 commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 upstream. 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: Greg Kroah-Hartman --- arch/x86/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 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 @@ -132,9 +135,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) - # -funit-at-a-time shrinks the kernel .text considerably # unfortunately it makes reading oopses harder. KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)