diff options
Diffstat (limited to 'arch/x86/include/asm/asm.h')
| -rw-r--r-- | arch/x86/include/asm/asm.h | 57 | 
1 files changed, 25 insertions, 32 deletions
| diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 990770f9e76b..21b086786404 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -120,16 +120,32 @@  /* Exception table entry */  #ifdef __ASSEMBLY__  # define _ASM_EXTABLE_HANDLE(from, to, handler)			\ -	.pushsection "__ex_table","a" ;				\ -	.balign 4 ;						\ -	.long (from) - . ;					\ -	.long (to) - . ;					\ -	.long (handler) - . ;					\ +	ASM_EXTABLE_HANDLE from to handler + +.macro ASM_EXTABLE_HANDLE from:req to:req handler:req +	.pushsection "__ex_table","a" +	.balign 4 +	.long (\from) - . +	.long (\to) - . +	.long (\handler) - .  	.popsection +.endm +#else /* __ASSEMBLY__ */ + +# define _ASM_EXTABLE_HANDLE(from, to, handler)			\ +	"ASM_EXTABLE_HANDLE from=" #from " to=" #to		\ +	" handler=\"" #handler "\"\n\t" + +/* For C file, we already have NOKPROBE_SYMBOL macro */ + +#endif /* __ASSEMBLY__ */  # define _ASM_EXTABLE(from, to)					\  	_ASM_EXTABLE_HANDLE(from, to, ex_handler_default) +# define _ASM_EXTABLE_UA(from, to)				\ +	_ASM_EXTABLE_HANDLE(from, to, ex_handler_uaccess) +  # define _ASM_EXTABLE_FAULT(from, to)				\  	_ASM_EXTABLE_HANDLE(from, to, ex_handler_fault) @@ -145,6 +161,7 @@  	_ASM_PTR (entry);					\  	.popsection +#ifdef __ASSEMBLY__  .macro ALIGN_DESTINATION  	/* check for bad alignment of destination */  	movl %edi,%ecx @@ -165,34 +182,10 @@  	jmp copy_user_handle_tail  	.previous -	_ASM_EXTABLE(100b,103b) -	_ASM_EXTABLE(101b,103b) +	_ASM_EXTABLE_UA(100b, 103b) +	_ASM_EXTABLE_UA(101b, 103b)  	.endm - -#else -# define _EXPAND_EXTABLE_HANDLE(x) #x -# define _ASM_EXTABLE_HANDLE(from, to, handler)			\ -	" .pushsection \"__ex_table\",\"a\"\n"			\ -	" .balign 4\n"						\ -	" .long (" #from ") - .\n"				\ -	" .long (" #to ") - .\n"				\ -	" .long (" _EXPAND_EXTABLE_HANDLE(handler) ") - .\n"	\ -	" .popsection\n" - -# define _ASM_EXTABLE(from, to)					\ -	_ASM_EXTABLE_HANDLE(from, to, ex_handler_default) - -# define _ASM_EXTABLE_FAULT(from, to)				\ -	_ASM_EXTABLE_HANDLE(from, to, ex_handler_fault) - -# define _ASM_EXTABLE_EX(from, to)				\ -	_ASM_EXTABLE_HANDLE(from, to, ex_handler_ext) - -# define _ASM_EXTABLE_REFCOUNT(from, to)			\ -	_ASM_EXTABLE_HANDLE(from, to, ex_handler_refcount) - -/* For C file, we already have NOKPROBE_SYMBOL macro */ -#endif +#endif /* __ASSEMBLY__ */  #ifndef __ASSEMBLY__  /* |