Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/asm: Use SYM_INNER_LABEL instead of GLOBAL

The GLOBAL macro had several meanings and is going away. Convert all the
inner function labels marked with GLOBAL to use SYM_INNER_LABEL instead.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191011115108.12392-18-jslaby@suse.cz

authored by

Jiri Slaby and committed by
Borislav Petkov
26ba4e57 37818afd

+16 -16
+3 -3
arch/x86/entry/entry_64.S
··· 162 162 pushq %r11 /* pt_regs->flags */ 163 163 pushq $__USER_CS /* pt_regs->cs */ 164 164 pushq %rcx /* pt_regs->ip */ 165 - GLOBAL(entry_SYSCALL_64_after_hwframe) 165 + SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL) 166 166 pushq %rax /* pt_regs->orig_ax */ 167 167 168 168 PUSH_AND_CLEAR_REGS rax=$-ENOSYS ··· 621 621 call prepare_exit_to_usermode 622 622 TRACE_IRQS_IRETQ 623 623 624 - GLOBAL(swapgs_restore_regs_and_return_to_usermode) 624 + SYM_INNER_LABEL(swapgs_restore_regs_and_return_to_usermode, SYM_L_GLOBAL) 625 625 #ifdef CONFIG_DEBUG_ENTRY 626 626 /* Assert that pt_regs indicates user mode. */ 627 627 testb $3, CS(%rsp) ··· 679 679 */ 680 680 TRACE_IRQS_IRETQ 681 681 682 - GLOBAL(restore_regs_and_return_to_kernel) 682 + SYM_INNER_LABEL(restore_regs_and_return_to_kernel, SYM_L_GLOBAL) 683 683 #ifdef CONFIG_DEBUG_ENTRY 684 684 /* Assert that pt_regs indicates kernel mode. */ 685 685 testb $3, CS(%rsp)
+2 -2
arch/x86/entry/entry_64_compat.S
··· 146 146 pushq $X86_EFLAGS_FIXED 147 147 popfq 148 148 jmp .Lsysenter_flags_fixed 149 - GLOBAL(__end_entry_SYSENTER_compat) 149 + SYM_INNER_LABEL(__end_entry_SYSENTER_compat, SYM_L_GLOBAL) 150 150 ENDPROC(entry_SYSENTER_compat) 151 151 152 152 /* ··· 215 215 pushq %r11 /* pt_regs->flags */ 216 216 pushq $__USER32_CS /* pt_regs->cs */ 217 217 pushq %rcx /* pt_regs->ip */ 218 - GLOBAL(entry_SYSCALL_compat_after_hwframe) 218 + SYM_INNER_LABEL(entry_SYSCALL_compat_after_hwframe, SYM_L_GLOBAL) 219 219 movl %eax, %eax /* discard orig_ax high bits */ 220 220 pushq %rax /* pt_regs->orig_ax */ 221 221 pushq %rdi /* pt_regs->di */
+1 -1
arch/x86/entry/vdso/vdso32/system_call.S
··· 62 62 63 63 /* Enter using int $0x80 */ 64 64 int $0x80 65 - GLOBAL(int80_landing_pad) 65 + SYM_INNER_LABEL(int80_landing_pad, SYM_L_GLOBAL) 66 66 67 67 /* 68 68 * Restore EDX and ECX in case they were clobbered. EBP is not
+1 -1
arch/x86/kernel/ftrace_32.S
··· 138 138 movl function_trace_op, %ecx # 3rd argument: ftrace_pos 139 139 pushl %esp # 4th argument: pt_regs 140 140 141 - GLOBAL(ftrace_regs_call) 141 + SYM_INNER_LABEL(ftrace_regs_call, SYM_L_GLOBAL) 142 142 call ftrace_stub 143 143 144 144 addl $4, %esp # skip 4th argument
+8 -8
arch/x86/kernel/ftrace_64.S
··· 140 140 /* save_mcount_regs fills in first two parameters */ 141 141 save_mcount_regs 142 142 143 - GLOBAL(ftrace_caller_op_ptr) 143 + SYM_INNER_LABEL(ftrace_caller_op_ptr, SYM_L_GLOBAL) 144 144 /* Load the ftrace_ops into the 3rd parameter */ 145 145 movq function_trace_op(%rip), %rdx 146 146 147 147 /* regs go into 4th parameter (but make it NULL) */ 148 148 movq $0, %rcx 149 149 150 - GLOBAL(ftrace_call) 150 + SYM_INNER_LABEL(ftrace_call, SYM_L_GLOBAL) 151 151 call ftrace_stub 152 152 153 153 restore_mcount_regs ··· 157 157 * think twice before adding any new code or changing the 158 158 * layout here. 159 159 */ 160 - GLOBAL(ftrace_epilogue) 160 + SYM_INNER_LABEL(ftrace_epilogue, SYM_L_GLOBAL) 161 161 162 162 #ifdef CONFIG_FUNCTION_GRAPH_TRACER 163 - GLOBAL(ftrace_graph_call) 163 + SYM_INNER_LABEL(ftrace_graph_call, SYM_L_GLOBAL) 164 164 jmp ftrace_stub 165 165 #endif 166 166 ··· 180 180 save_mcount_regs 8 181 181 /* save_mcount_regs fills in first two parameters */ 182 182 183 - GLOBAL(ftrace_regs_caller_op_ptr) 183 + SYM_INNER_LABEL(ftrace_regs_caller_op_ptr, SYM_L_GLOBAL) 184 184 /* Load the ftrace_ops into the 3rd parameter */ 185 185 movq function_trace_op(%rip), %rdx 186 186 ··· 209 209 /* regs go into 4th parameter */ 210 210 leaq (%rsp), %rcx 211 211 212 - GLOBAL(ftrace_regs_call) 212 + SYM_INNER_LABEL(ftrace_regs_call, SYM_L_GLOBAL) 213 213 call ftrace_stub 214 214 215 215 /* Copy flags back to SS, to restore them */ ··· 239 239 * The trampoline will add the code to jump 240 240 * to the return. 241 241 */ 242 - GLOBAL(ftrace_regs_caller_end) 242 + SYM_INNER_LABEL(ftrace_regs_caller_end, SYM_L_GLOBAL) 243 243 244 244 jmp ftrace_epilogue 245 245 ··· 261 261 jnz ftrace_graph_caller 262 262 #endif 263 263 264 - GLOBAL(ftrace_stub) 264 + SYM_INNER_LABEL(ftrace_stub, SYM_L_GLOBAL) 265 265 retq 266 266 267 267 trace:
+1 -1
arch/x86/realmode/rm/reboot.S
··· 33 33 movl %eax, %cr0 34 34 ljmpl $__KERNEL32_CS, $pa_machine_real_restart_paging_off 35 35 36 - GLOBAL(machine_real_restart_paging_off) 36 + SYM_INNER_LABEL(machine_real_restart_paging_off, SYM_L_GLOBAL) 37 37 xorl %eax, %eax 38 38 xorl %edx, %edx 39 39 movl $MSR_EFER, %ecx