Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3952455pxb; Mon, 8 Feb 2021 04:29:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyZHA7LOaVLRtusdY1Du4IDKDns8u+BKumrdgD9pmiQv9rcI0Cj3js3EqEoJfLjuH4Faui X-Received: by 2002:a17:906:f156:: with SMTP id gw22mr10328636ejb.406.1612787397008; Mon, 08 Feb 2021 04:29:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612787396; cv=none; d=google.com; s=arc-20160816; b=XQUVCbxpConiWW4mjI2j613L/fXnGAK3R9Z9vLRm3VGxW0BlOZYlQExPiJWcRT5lXO 7Yc7OuaJ9JMYjtMtMPnTSC30MbsDjt5s7tNiiiyU4wgC4yUKx5R16UR8ARtpfsGn4uOJ wgVBx6aSIVJi+ZWZK7wa1cjosCZfrxIWjZncP4ILApRjmeAV6TQMb9cHibScz6pe6MC1 lspmXwZ41lqr9SKggyY251Aw4wGruMUOBqTkVGnxUuBqyv98mhKlGN4bUWBWgY8EZtB7 zK1WemApHbENMIQzD5gUWvwHqfI429Ayf6QaFP5eX2zdivojqkHdLkp7k0bFZDabIQzs 7RnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DAOUoG3I7i2l7ObtBqKLCigFlXYFTGxgxiTwk7uNRLI=; b=fM9lHGgMyx8ae08Ub3bFAXmcEXZFP4byI6wFZQWI0brYYeQQspxCkvodMKq5Z5LFrY bep6vI/hd1mABptPw25vl5pLvZ4uhg+larPIWUK0iyWOCGBBJ7Enl5ak7q9j4kjB4w4j LZDVCvCzKq/0lFyhSBcwj/9F4tHuDvIMtQd99TIr2SthawTRE3Hfy6Jibb3UfWyb6I+o F4muWYwBO+hZBwUrHhBHEDUnS9iX0Pxr4AlsLTDJVJ+LHBog427mflKgNEbCAhEjw+cg llCQul9dTiqOfRcCu4HqchZOVM+ckiVswF3Say8rO/1/VyEvmMsCKopoCyt08bVnm2b8 YhCQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si11827251edj.330.2021.02.08.04.29.32; Mon, 08 Feb 2021 04:29:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbhBHM2t (ORCPT + 99 others); Mon, 8 Feb 2021 07:28:49 -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-kernel@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