Re: [PATCH v9 15/28] x86/asm/purgatory: Start using annotations

From: Borislav Petkov
Date: Tue Oct 15 2019 - 13:04:06 EST


On Fri, Oct 11, 2019 at 01:50:55PM +0200, Jiri Slaby wrote:
> Purgatory used no annotations at all. So include linux/linkage.h and
> annotate everything:
> * code by SYM_CODE_*
> * data by SYM_DATA_*
>
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
> Cc: x86@xxxxxxxxxx
> ---
> arch/x86/purgatory/entry64.S | 21 ++++++++++++---------
> arch/x86/purgatory/setup-x86_64.S | 14 ++++++++------
> arch/x86/purgatory/stack.S | 7 ++++---
> 3 files changed, 24 insertions(+), 18 deletions(-)

...

> @@ -75,12 +76,12 @@ r13: .quad 0x0
> r14: .quad 0x0
> r15: .quad 0x0
> rip: .quad 0x0
> - .size entry64_regs, . - entry64_regs
> +SYM_DATA_END(entry64_regs)
>
> /* GDT */
> .section ".rodata"
> .balign 16
> -gdt:
> +SYM_DATA_START_LOCAL(gdt)
> /* 0x00 unusable segment

Note for the applier: Fixup that comment:

/*
* 0x00 ...
* ...

> * 0x08 unused
> * so use them as gdt ptr

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette