From: Borislav Petkov <bp@alien8.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: x86-ml <x86@kernel.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Remove __end_entry_SYSENTER_compat?
Date: Wed, 12 Jul 2017 06:13:36 +0200 [thread overview]
Message-ID: <20170712041336.GD23362@nazgul.tnic> (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.
--
next reply other threads:[~2017-07-12 4:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 4:13 Borislav Petkov [this message]
2017-07-12 8:48 ` Ingo Molnar
2017-07-12 9:25 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170712041336.GD23362@nazgul.tnic \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®