Re: [PATCH 02/17] x86, lto: Mark all top level asm statements as .text

From: Thomas Gleixner
Date: Tue Mar 26 2019 - 13:04:06 EST


Andi,

On Thu, 21 Mar 2019, Andi Kleen wrote:

> With gcc 8 toplevel assembler statements that do not mark themselves
> as .text may end up in other sections.

Which is clearly a change in behaviour. Is that intended or just yet
another feature of GCC?

Your subject says: 'x86, lto:'

So is this a LTO related problem or is the section randomization
independent of LTO?

This wants to be clearly documented in the changelog.

Aside of that the proper Subject prefix is either:

x86/asm/lto:

or

x86/asm:

dependent on the nature. Like it or not, but this has been the prefix x86
uses for a very long time already.

> I had boot crashes because
> various assembler statements ended up in the middle of the initcall
> section.
>
> Always mark all the top level assembler statements as text
> so that they switch to the right section.
>
> For AMD "vide", which is only used on 32bit kernels, I also
> marked it as 32bit only.

Once more. See

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes

"Describe your changes in imperative mood, e.g. âmake xyzzy do frotzâ
instead of â[This patch] makes xyzzy do frotzâ or â[I] changed xyzzy to
do frotzâ, as if you are giving orders to the codebase to change its
behaviour."

This is the last time, I'm asking for this.

Thanks,

tglx