Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Seth Forshee
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

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Borislav Petkov
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

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Josh Poimboeuf
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

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Nikolay Borisov
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

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Josh Poimboeuf
On Fri, Jan 29, 2021 at 05:30:48PM +0100, Borislav Petkov wrote: > On Fri, Jan 29, 2021 at 09:10:34AM -0600, Josh Poimboeuf wrote: > > Maybe eventually. But the enablement (actually enabling CET/CFI/etc) > > happens in the arch code anyway, right? So it could be a per-arch > > decision. > >

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Borislav Petkov
On Fri, Jan 29, 2021 at 09:10:34AM -0600, Josh Poimboeuf wrote: > Maybe eventually. But the enablement (actually enabling CET/CFI/etc) > happens in the arch code anyway, right? So it could be a per-arch > decision. Right. Ok, for this one, what about Cc: ? What are "some configurations of

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-29 Thread Borislav Petkov
On Thu, Jan 28, 2021 at 03:52:19PM -0600, Josh Poimboeuf wrote: > > With retpolines disabled, some configurations of GCC 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,

Re: [PATCH] x86: Disable CET instrumentation in the kernel

2021-01-28 Thread Nikolay Borisov
On 28.01.21 г. 23:52 ч., Josh Poimboeuf wrote: > > With retpolines disabled, some configurations of GCC 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

[PATCH] x86: Disable CET instrumentation in the kernel

2021-01-28 Thread Josh Poimboeuf
With retpolines disabled, some configurations of GCC 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