public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: <mingo@kernel.org>, <tglx@linutronix.de>, <oleg@redhat.com>,
	<luto@kernel.org>, <hpa@zytor.com>, <a.p.zijlstra@chello.nl>,
	<linux-kernel@vger.kernel.org>, <x86@kernel.org>, <ast@fb.com>
Cc: <kernel-team@fb.com>
Subject: [RESEND PATCH tip] x86/idt: Remove X86_TRAP_BP initialization in idt_setup_traps()
Date: Wed, 8 Nov 2017 11:28:45 -0800	[thread overview]
Message-ID: <20171108192845.552709-1-yhs@fb.com> (raw)

Commit b70543a0b2b6("x86/idt: Move regular trap init to tables")
moves regular trap init for each trap vector into a table based
initialization. It introduced the initialization for vector
X86_TRAP_BP which was not in the original change and it breaks
uprobe functionality for x86_32. A program with uprobe
instrumented can have segfault on x86_32 instead of normal finish.
Uprobe still works on x86_64 even with this commit.

This patch removes X86_TRAP_BP from the structure def_idts
which is used in idt_setup_traps(). It also removes a redundant
entry for X86_TRAP_NMI in def_idts. Tested on both x86_64 and x86_32,
uprobe works fine.

Fixes: b70543a0b2b6("x86/idt: Move regular trap init to tables")
Reported-and-tested-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
---
 arch/x86/kernel/idt.c | 2 --
 1 file changed, 2 deletions(-)

[RESEND with adding linux-kernel@vger.kernel.org as the recipient.]

diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c
index 723fa97..d985cef 100644
--- a/arch/x86/kernel/idt.c
+++ b/arch/x86/kernel/idt.c
@@ -92,8 +92,6 @@ static const __initdata struct idt_data def_idts[] = {
 	INTG(X86_TRAP_DF,		double_fault),
 #endif
 	INTG(X86_TRAP_DB,		debug),
-	INTG(X86_TRAP_NMI,		nmi),
-	INTG(X86_TRAP_BP,		int3),
 
 #ifdef CONFIG_X86_MCE
 	INTG(X86_TRAP_MC,		&machine_check),
-- 
2.9.5

             reply	other threads:[~2017-11-08 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 19:28 Yonghong Song [this message]
2017-11-08 20:10 ` [tip:x86/urgent] x86/idt: Remove X86_TRAP_BP initialization in idt_setup_traps() tip-bot for Yonghong Song

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=20171108192845.552709-1-yhs@fb.com \
    --to=yhs@fb.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ast@fb.com \
    --cc=hpa@zytor.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=tglx@linutronix.de \
    --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