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


Groups > linux.kernel > #1685509

Remove __end_entry_SYSENTER_compat?

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Remove __end_entry_SYSENTER_compat?
Date 2017-07-12 06:20 +0200
Message-ID <u2hi2-3cV-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Anyone think this is an OK-ish idea?

It saves us the global symbol but requires the two functions to remained
glued together. :-\

---
diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
index e1721dafbcb1..262519da8661 100644
--- a/arch/x86/entry/entry_64_compat.S
+++ b/arch/x86/entry/entry_64_compat.S
@@ -131,7 +131,6 @@ ENTRY(entry_SYSENTER_compat)
 	pushq	$X86_EFLAGS_FIXED
 	popfq
 	jmp	.Lsysenter_flags_fixed
-GLOBAL(__end_entry_SYSENTER_compat)
 ENDPROC(entry_SYSENTER_compat)
 
 /*
@@ -180,6 +179,9 @@ ENDPROC(entry_SYSENTER_compat)
  * edi  arg5
  * esp  user stack
  * 0(%esp) arg6
+ *
+ * DO NOT! move this function and the above before adjusting
+ * is_sysenter_singlestep().
  */
 ENTRY(entry_SYSCALL_compat)
 	/* Interrupts are off on entry. */
diff --git a/arch/x86/include/asm/proto.h b/arch/x86/include/asm/proto.h
index 8d3964fc5f91..afdef9f3f0f0 100644
--- a/arch/x86/include/asm/proto.h
+++ b/arch/x86/include/asm/proto.h
@@ -21,7 +21,6 @@ void __end_SYSENTER_singlestep_region(void);
 
 #ifdef CONFIG_IA32_EMULATION
 void entry_SYSENTER_compat(void);
-void __end_entry_SYSENTER_compat(void);
 void entry_SYSCALL_compat(void);
 void entry_INT80_compat(void);
 #endif
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index bf54309b85da..143902ffe9ff 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -668,7 +668,7 @@ static bool is_sysenter_singlestep(struct pt_regs *regs)
 		(unsigned long)__begin_SYSENTER_singlestep_region;
 #elif defined(CONFIG_IA32_EMULATION)
 	return (regs->ip - (unsigned long)entry_SYSENTER_compat) <
-		(unsigned long)__end_entry_SYSENTER_compat -
+		(unsigned long)entry_SYSCALL_compat -
 		(unsigned long)entry_SYSENTER_compat;
 #else
 	return false;

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

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


Thread

Remove __end_entry_SYSENTER_compat? Borislav Petkov <bp@alien8.de> - 2017-07-12 06:20 +0200
  Re: Remove __end_entry_SYSENTER_compat? Ingo Molnar <mingo@kernel.org> - 2017-07-12 10:50 +0200
    Re: Remove __end_entry_SYSENTER_compat? Borislav Petkov <bp@alien8.de> - 2017-07-12 11:30 +0200

csiph-web