Linux-arch Archive on lore.kernel.org
 help / color / Atom feed
From: Stuart Little <achirvasub@gmail.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Marco Elver <elver@google.com>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	kasan-dev@googlegroups.com, jpoimboe@redhat.com,
	nborisov@suse.com, bp@suse.de, seth.forshee@canonical.com,
	yamada.masahiro@socionext.com
Subject: Re: PROBLEM: 5.11.0-rc7 fails to compile with error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
Date: Sun, 7 Feb 2021 19:40:32 -0500
Message-ID: <YCCIgMHkzh/xT4ex@arch-chirva.localdomain> (raw)
In-Reply-To: <YCCFGc97d2U5yUS7@arch-chirva.localdomain>

And for good measure: reverting that commit 

20bf2b378729c4a0366a53e2018a0b70ace94bcd

flagged by the bisect right on top of the current tree compiles fine. 

On Sun, Feb 07, 2021 at 07:26:01PM -0500, Stuart Little wrote:
> The result of the bisect on the issue reported in the previous message:
> 
> --- cut ---
> 
> 20bf2b378729c4a0366a53e2018a0b70ace94bcd is the first bad commit
> commit 20bf2b378729c4a0366a53e2018a0b70ace94bcd
> Author: Josh Poimboeuf <jpoimboe@redhat.com>
> Date:   Thu Jan 28 15:52:19 2021 -0600
> 
>     x86/build: Disable CET instrumentation in the kernel
>     
>     With retpolines disabled, some configurations of GCC, and specifically
>     the GCC versions 9 and 10 in Ubuntu will add Intel CET instrumentation
>     to the kernel by default. That breaks certain tracing scenarios by
>     adding a superfluous ENDBR64 instruction before the fentry call, for
>     functions which can be called indirectly.
>     
>     CET instrumentation isn't currently necessary in the kernel, as CET is
>     only supported in user space. Disable it unconditionally and move it
>     into the x86's Makefile as CET/CFI... enablement should be a per-arch
>     decision anyway.
>     
>      [ bp: Massage and extend commit message. ]
>     
>     Fixes: 29be86d7f9cb ("kbuild: add -fcf-protection=none when using retpoline flags")
>     Reported-by: Nikolay Borisov <nborisov@suse.com>
>     Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
>     Signed-off-by: Borislav Petkov <bp@suse.de>
>     Reviewed-by: Nikolay Borisov <nborisov@suse.com>
>     Tested-by: Nikolay Borisov <nborisov@suse.com>
>     Cc: <stable@vger.kernel.org>
>     Cc: Seth Forshee <seth.forshee@canonical.com>
>     Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>     Link: https://lkml.kernel.org/r/20210128215219.6kct3h2eiustncws@treble
> 
>  Makefile          | 6 ------
>  arch/x86/Makefile | 3 +++
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> --- end ---
> 
> 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
> > 
> > and
> > 
> > ./include/linux/kcsan-checks.h:143:6: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
> > 
> > and
> > 
> > ./arch/x86/include/asm/arch_hweight.h:16:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
> > 
> > (those include files indicated whom I should add to this list; apologies if this reaches you in error).
> > 
> > The full log of the build is at
> > 
> > https://termbin.com/wbgs
> > 
> > ---
> > 
> > 5.11.0-rc6 built fine last week on this same setup. 

  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 23:31 Stuart Little
2021-02-08  0:26 ` Stuart Little
2021-02-08  0:40   ` Stuart Little [this message]
2021-02-08  9:51     ` Marco Elver
2021-02-08 12:12     ` Borislav Petkov
2021-02-08 15:19       ` AC
2021-02-08 16:25         ` [PATCH] x86/build: Disable CET instrumentation in the kernel for 32-bit too Borislav Petkov
2021-02-08 18:12           ` Josh Poimboeuf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YCCIgMHkzh/xT4ex@arch-chirva.localdomain \
    --to=achirvasub@gmail.com \
    --cc=arnd@arndb.de \
    --cc=aryabinin@virtuozzo.com \
    --cc=bp@suse.de \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=jpoimboe@redhat.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=seth.forshee@canonical.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-arch Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arch/0 linux-arch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arch linux-arch/ https://lore.kernel.org/linux-arch \
		linux-arch@vger.kernel.org
	public-inbox-index linux-arch

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arch


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git