Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1604480

[PATCH v2 05/10] x86: kernel+lib, annotate local functions

From Jiri Slaby <jslaby@suse.cz>
Newsgroups linux.kernel
Subject [PATCH v2 05/10] x86: kernel+lib, annotate local functions
Date 2017-03-20 13:40 +0100
Message-ID <tn4Lo-4J7-33@gated-at.bofh.it> (permalink)
References <tlyNB-3TH-33@gated-at.bofh.it> <tn4Ln-4J7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Use the newly added SYM_FUNC_START_LOCAL to annotate starts of all
functions which do not have ".globl" annotation. This is needed to
balance SYM_FUNC_END for tools that are about to generate debuginfo.

In this patch, do it for local verify_cpu, early_idt_handler_common, and
bad_*_user properly.  Note that early_idt_handler_common already had
ENDPROC -- switch to the new SYM_FUNC_END.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <x86@kernel.org>
---
 arch/x86/kernel/head_64.S    | 4 ++--
 arch/x86/kernel/verify_cpu.S | 3 ++-
 arch/x86/lib/getuser.S       | 8 ++++----
 arch/x86/lib/putuser.S       | 4 ++--
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index e093a804f1fb..90616ba150eb 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -355,7 +355,7 @@ ENTRY(early_idt_handler_array)
 	.endr
 ENDPROC(early_idt_handler_array)
 
-early_idt_handler_common:
+SYM_FUNC_START_LOCAL(early_idt_handler_common)
 	/*
 	 * The stack is the hardware frame, an error code or zero, and the
 	 * vector number.
@@ -396,7 +396,7 @@ early_idt_handler_common:
 20:
 	decl early_recursion_flag(%rip)
 	jmp restore_regs_and_iret
-ENDPROC(early_idt_handler_common)
+SYM_FUNC_END(early_idt_handler_common)
 
 	__INITDATA
 
diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
index 014ea59aa153..fd60f1ac5fec 100644
--- a/arch/x86/kernel/verify_cpu.S
+++ b/arch/x86/kernel/verify_cpu.S
@@ -33,7 +33,7 @@
 #include <asm/cpufeatures.h>
 #include <asm/msr-index.h>
 
-verify_cpu:
+SYM_FUNC_START_LOCAL(verify_cpu)
 	pushf				# Save caller passed flags
 	push	$0			# Kill any dangerous flags
 	popf
@@ -139,3 +139,4 @@ verify_cpu:
 	popf				# Restore caller passed flags
 	xorl %eax, %eax
 	ret
+SYM_FUNC_END(verify_cpu)
diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S
index 37b62d412148..29f0707a3913 100644
--- a/arch/x86/lib/getuser.S
+++ b/arch/x86/lib/getuser.S
@@ -104,21 +104,21 @@ ENDPROC(__get_user_8)
 EXPORT_SYMBOL(__get_user_8)
 
 
-bad_get_user:
+SYM_FUNC_START_LOCAL(bad_get_user)
 	xor %edx,%edx
 	mov $(-EFAULT),%_ASM_AX
 	ASM_CLAC
 	ret
-END(bad_get_user)
+SYM_FUNC_END(bad_get_user)
 
 #ifdef CONFIG_X86_32
-bad_get_user_8:
+SYM_FUNC_START_LOCAL(bad_get_user_8)
 	xor %edx,%edx
 	xor %ecx,%ecx
 	mov $(-EFAULT),%_ASM_AX
 	ASM_CLAC
 	ret
-END(bad_get_user_8)
+SYM_FUNC_END(bad_get_user_8)
 #endif
 
 	_ASM_EXTABLE(1b,bad_get_user)
diff --git a/arch/x86/lib/putuser.S b/arch/x86/lib/putuser.S
index cd5d716d2897..d77883f36875 100644
--- a/arch/x86/lib/putuser.S
+++ b/arch/x86/lib/putuser.S
@@ -88,10 +88,10 @@ ENTRY(__put_user_8)
 ENDPROC(__put_user_8)
 EXPORT_SYMBOL(__put_user_8)
 
-bad_put_user:
+SYM_FUNC_START_LOCAL(bad_put_user)
 	movl $-EFAULT,%eax
 	EXIT
-END(bad_put_user)
+SYM_FUNC_END(bad_put_user)
 
 	_ASM_EXTABLE(1b,bad_put_user)
 	_ASM_EXTABLE(2b,bad_put_user)
-- 
2.12.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC] linkage: new macros for functions and data Ingo Molnar <mingo@kernel.org> - 2017-03-16 09:10 +0100
  Re: [RFC] linkage: new macros for functions and data Jiri Slaby <jslaby@suse.cz> - 2017-03-16 09:20 +0100
    [PATCH v2 07/10] x86: assembly, annotate aliases Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 04/10] x86: boot, annotate functions properly Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 09/10] x86: entry, annotate interrupt symbols properly Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 03/10] x86: assembly, use SYM_FUNC_END for functions Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
      Re: [PATCH v2 03/10] x86: assembly, use SYM_FUNC_END for functions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-21 15:50 +0100
        Re: [PATCH v2 03/10] x86: assembly, use SYM_FUNC_END for functions Ingo Molnar <mingo@kernel.org> - 2017-03-22 08:40 +0100
      Re: [PATCH v2 03/10] x86: assembly, use SYM_FUNC_END for functions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-22 15:30 +0100
        Re: [PATCH v2 03/10] x86: assembly, use SYM_FUNC_END for functions Jiri Slaby <jslaby@suse.cz> - 2017-03-22 17:00 +0100
    [PATCH v2 05/10] x86: kernel+lib, annotate local functions Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 08/10] x86: entry, annotate THUNKs Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 06/10] x86: crypto, annotate local functions Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for data Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
      Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-20 14:40 +0100
        Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for  data Jiri Slaby <jslaby@suse.cz> - 2017-03-20 16:50 +0100
          Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-20 17:10 +0100
      Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Pavel Machek <pavel@ucw.cz> - 2017-03-21 15:20 +0100
        Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Ingo Molnar <mingo@kernel.org> - 2017-03-22 08:30 +0100
          Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for  data Jiri Slaby <jslaby@suse.cz> - 2017-03-22 08:50 +0100
            Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Ingo Molnar <mingo@kernel.org> - 2017-03-22 08:50 +0100
              Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-22 15:20 +0100
                Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for  data Jiri Slaby <jslaby@suse.cz> - 2017-03-22 16:10 +0100
                Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-22 16:40 +0100
                Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Ingo Molnar <mingo@kernel.org> - 2017-03-23 08:40 +0100
                Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Josh Poimboeuf <jpoimboe@redhat.com> - 2017-03-23 14:30 +0100
        Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for  data Jiri Slaby <jslaby@suse.cz> - 2017-03-22 13:10 +0100
          Re: [PATCH v2 02/10] x86: assembly, FUNC_START for fn, DATA_START  for data Pavel Machek <pavel@ucw.cz> - 2017-03-22 17:00 +0100
    [RFC v2 10/10] x86: boot, extract efi_pe_entry from startup_64 Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100
    [PATCH v2 01/10] linkage: new macros for assembler symbols Jiri Slaby <jslaby@suse.cz> - 2017-03-20 13:40 +0100

csiph-web