From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74168C433DB for ; Mon, 8 Feb 2021 12:13:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BEA164DCC for ; Mon, 8 Feb 2021 12:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231821AbhBHMNe (ORCPT ); Mon, 8 Feb 2021 07:13:34 -0500 Received: from mx2.suse.de ([195.135.220.15]:48806 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230346AbhBHMNV (ORCPT ); Mon, 8 Feb 2021 07:13:21 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 75CCBAD3E; Mon, 8 Feb 2021 12:12:39 +0000 (UTC) Date: Mon, 8 Feb 2021 13:12:27 +0100 From: Borislav Petkov To: Stuart Little Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Marco Elver , Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, jpoimboe@redhat.com, nborisov@suse.com, seth.forshee@canonical.com, yamada.masahiro@socionext.com Subject: Re: PROBLEM: 5.11.0-rc7 fails =?utf-8?Q?to?= =?utf-8?Q?_compile_with_error=3A_=E2=80=98-mindirect-branch=E2=80=99_and_?= =?utf-8?B?4oCYLWZjZi1wcm90ZWN0aW9u4oCZ?= are not compatible Message-ID: <20210208121227.GD17908@zn.tnic> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Sun, Feb 07, 2021 at 07:40:32PM -0500, Stuart Little wrote: > > On Sun, Feb 07, 2021 at 06:31:22PM -0500, Stuart Little wrote: > > > I am trying to compile on an x86_64 host for a 32-bit system; my config is at > > > > > > https://termbin.com/v8jl > > > > > > I am getting numerous errors of the form > > > > > > ./include/linux/kasan-checks.h:17:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible Does this fix it? --- diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 5857917f83ee..30920d70b48b 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -50,6 +50,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 @@ -120,9 +123,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 -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg