[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191015173124.GF596@zn.tnic>
Date: Tue, 15 Oct 2019 19:31:25 +0200
From: Borislav Petkov <bp@...en8.de>
To: Jiri Slaby <jslaby@...e.cz>
Cc: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH v9 17/28] x86/asm: Use SYM_INNER_LABEL instead of GLOBAL
On Fri, Oct 11, 2019 at 01:50:57PM +0200, Jiri Slaby wrote:
> The GLOBAL macro had several meanings and is going away. In this patch,
> convert all the inner function labels marked with GLOBAL to use
> SYM_INNER_LABEL instead.
>
> Signed-off-by: Jiri Slaby <jslaby@...e.cz>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: "H. Peter Anvin" <hpa@...or.com>
> Cc: x86@...nel.org
> Cc: Andy Lutomirski <luto@...capital.net>
> ---
> arch/x86/entry/entry_64.S | 6 +++---
> arch/x86/entry/entry_64_compat.S | 4 ++--
> arch/x86/entry/vdso/vdso32/system_call.S | 2 +-
> arch/x86/kernel/ftrace_32.S | 2 +-
> arch/x86/kernel/ftrace_64.S | 16 ++++++++--------
> arch/x86/realmode/rm/reboot.S | 2 +-
> 6 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
> index 607e25f54ff4..57d246048ac6 100644
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -162,7 +162,7 @@ ENTRY(entry_SYSCALL_64)
> pushq %r11 /* pt_regs->flags */
> pushq $__USER_CS /* pt_regs->cs */
> pushq %rcx /* pt_regs->ip */
> -GLOBAL(entry_SYSCALL_64_after_hwframe)
> +SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL)
> pushq %rax /* pt_regs->orig_ax */
>
> PUSH_AND_CLEAR_REGS rax=$-ENOSYS
> @@ -621,7 +621,7 @@ ret_from_intr:
> call prepare_exit_to_usermode
> TRACE_IRQS_IRETQ
>
> -GLOBAL(swapgs_restore_regs_and_return_to_usermode)
> +SYM_INNER_LABEL(swapgs_restore_regs_and_return_to_usermode, SYM_L_GLOBAL)
> #ifdef CONFIG_DEBUG_ENTRY
> /* Assert that pt_regs indicates user mode. */
> testb $3, CS(%rsp)
> @@ -679,7 +679,7 @@ retint_kernel:
> */
> TRACE_IRQS_IRETQ
>
> -GLOBAL(restore_regs_and_return_to_kernel)
> +SYM_INNER_LABEL(restore_regs_and_return_to_kernel, SYM_L_GLOBAL)
> #ifdef CONFIG_DEBUG_ENTRY
> /* Assert that pt_regs indicates kernel mode. */
> testb $3, CS(%rsp)
Do this too, while at it?
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 57d246048ac6..e73369858556 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -247,7 +247,7 @@ SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL)
* We win! This label is here just for ease of understanding
* perf profiles. Nothing jumps here.
*/
-syscall_return_via_sysret:
+SYM_INNER_LABEL(syscall_return_via_sysret, SYM_L_GLOBAL)
/* rcx and r11 are already restored (see code above) */
UNWIND_HINT_EMPTY
POP_REGS pop_rdi=0 skip_r11rcx=1
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists