From: Seth Forshee <seth.forshee@canonical.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
Nikolay Borisov <nborisov@suse.com>,
x86@kernel.org, Masami Hiramatsu <masami.hiramatsu@gmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
bpf@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] x86: Disable CET instrumentation in the kernel
Date: Fri, 29 Jan 2021 11:58:47 -0600 [thread overview]
Message-ID: <YBRM181kNGBVKU4V@ubuntu-x1> (raw)
In-Reply-To: <20210129170755.GF27841@zn.tnic>
On Fri, Jan 29, 2021 at 06:07:55PM +0100, Borislav Petkov wrote:
> On Fri, Jan 29, 2021 at 11:03:31AM -0600, Josh Poimboeuf wrote:
> > On Fri, Jan 29, 2021 at 06:54:08PM +0200, Nikolay Borisov wrote:
> > >
> > >
> > > On 29.01.21 г. 18:49 ч., Josh Poimboeuf wrote:
> > > > Agreed, stable is a good idea. I think Nikolay saw it with GCC 9.
> > >
> > >
> > > Yes I did, with the default Ubuntu compiler as well as the default gcc-10 compiler:
> > >
> > > # gcc -v -Q -O2 --help=target | grep protection
> > >
> > > gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
> > > COLLECT_GCC_OPTIONS='-v' '-Q' '-O2' '--help=target' '-mtune=generic' '-march=x86-64'
> > > /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -v -imultiarch x86_64-linux-gnu help-dummy -dumpbase help-dummy -mtune=generic -march=x86-64 -auxbase help-dummy -O2 -version --help=target -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccSecttk.s
> > > GNU C17 (Ubuntu 9.3.0-17ubuntu1~20.04) version 9.3.0 (x86_64-linux-gnu)
> > > compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
> > >
> > >
> > > It has -fcf-protection turned on by default it seems.
> >
> > Yup, explains why I didn't see it:
> >
> > gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC)
> > COLLECT_GCC_OPTIONS='-v' '-Q' '-O2' '--help=target' '-mtune=generic' '-march=x86-64'
> > /usr/libexec/gcc/x86_64-redhat-linux/10/cc1 -v help-dummy -dumpbase help-dummy -mtune=generic -march=x86-64 -auxbase help-dummy -O2 -version --help=target -o /tmp/cclBz55H.s
>
> The fact that you triggered it with an Ubuntu gcc explains why the
> original patch adding that switch:
>
> 29be86d7f9cb ("kbuild: add -fcf-protection=none when using retpoline flags")
>
> came from a Canonical.
>
> Adding the author to Cc for FYI.
>
> Seth, you can find this thread starting here:
>
> https://lkml.kernel.org/r/20210128215219.6kct3h2eiustncws@treble
Thanks for the heads up. This still works fine for our needs.
Acked-by: Seth Forshee <seth.forshee@canonical.com>
next prev parent reply other threads:[~2021-01-29 17:59 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 13:43 kprobes broken since 0d00449c7a28 ("x86: Replace ist_enter() with nmi_enter()") Nikolay Borisov
2021-01-27 15:13 ` Masami Hiramatsu
2021-01-27 15:24 ` Masami Hiramatsu
2021-01-27 17:57 ` Nikolay Borisov
2021-01-28 1:34 ` Masami Hiramatsu
2021-01-28 3:38 ` Masami Hiramatsu
2021-01-28 7:11 ` Nikolay Borisov
2021-01-28 16:12 ` Nikolay Borisov
2021-01-28 16:45 ` Nikolay Borisov
2021-01-28 16:50 ` Josh Poimboeuf
2021-01-28 21:52 ` [PATCH] x86: Disable CET instrumentation in the kernel Josh Poimboeuf
2021-01-29 6:23 ` Nikolay Borisov
2021-01-29 10:21 ` Borislav Petkov
[not found] ` <20210129151034.iba4eaa2fuxsipqa@treble>
2021-01-29 16:30 ` Borislav Petkov
2021-01-29 16:49 ` Josh Poimboeuf
2021-01-29 16:54 ` Nikolay Borisov
2021-01-29 17:03 ` Josh Poimboeuf
2021-01-29 17:07 ` Borislav Petkov
2021-01-29 17:58 ` Seth Forshee [this message]
2021-01-29 18:06 ` [tip: x86/urgent] x86/build: " tip-bot2 for Josh Poimboeuf
2021-01-28 18:24 ` kprobes broken since 0d00449c7a28 ("x86: Replace ist_enter() with nmi_enter()") Peter Zijlstra
2021-01-29 1:34 ` Alexei Starovoitov
2021-01-29 6:36 ` Nikolay Borisov
[not found] ` <YBPNyRyrkzw2echi@hirez.programming.kicks-ass.net>
[not found] ` <20210129224011.81bcdb3eba1227c414e69e1f@kernel.org>
[not found] ` <20210129105952.74dc8464@gandalf.local.home>
2021-01-29 16:24 ` Peter Zijlstra
2021-01-29 17:45 ` Alexei Starovoitov
2021-01-29 17:59 ` Peter Zijlstra
2021-01-29 19:01 ` Steven Rostedt
2021-01-29 21:05 ` Alexei Starovoitov
2021-01-30 1:41 ` Masami Hiramatsu
2021-01-29 21:24 ` Steven Rostedt
2021-01-30 8:28 ` Peter Zijlstra
2021-01-30 12:44 ` Steven Rostedt
2021-02-02 10:45 ` Peter Zijlstra
2021-02-02 14:52 ` Steven Rostedt
2021-02-02 16:45 ` Peter Zijlstra
2021-02-02 16:56 ` Steven Rostedt
2021-02-02 18:30 ` Peter Zijlstra
2021-02-02 21:05 ` Steven Rostedt
2021-02-03 13:33 ` Masami Hiramatsu
2021-02-03 13:52 ` Steven Rostedt
2021-01-30 2:02 ` Masami Hiramatsu
2021-01-30 3:08 ` Alexei Starovoitov
2021-01-30 12:10 ` Masami Hiramatsu
2021-01-27 16:44 ` Peter Zijlstra
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=YBRM181kNGBVKU4V@ubuntu-x1 \
--to=seth.forshee@canonical.com \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu@gmail.com \
--cc=mhiramat@kernel.org \
--cc=nborisov@suse.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=x86@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).