Re: [PATCH v4 00/13] "Task_isolation" mode

Thomas Gleixner
2020-07-23T21:44:28Z

Alex Belits <abelits@marvell.com> writes:
> On Thu, 2020-07-23 at 17:49 +0200, Peter Zijlstra wrote:
>>
>> 'What does noinstr mean? and why do we have it" -- don't dare touch
>> the
>> entry code until you can answer that.
>
> noinstr disables instrumentation, so there would not be calls and
> dependencies on other parts of the kernel when it's not yet safe to
> call them. Relevant functions already have it, and I add an inline call
> to perform flags update and synchronization. Unless something else is
> involved, those operations are safe, so I am not adding anything that
> can break those.

Sure.

1) That inline function can be put out of line by the compiler and
placed into the regular text section which makes it subject to
instrumentation

2) That inline function invokes local_irq_save() which is subject to
instrumentation _before_ the entry state for the instrumentation
mechanisms is established.

3) That inline function invokes sync_core() before important state has
been established, which is especially interesting in NMI like
exceptions.

As you clearly documented why all of the above is safe and does not
cause any problems, it's just me and Peter being silly, right?

Try again.

Thanks,

tglx