From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357AbdKHT2s (ORCPT ); Wed, 8 Nov 2017 14:28:48 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:38222 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302AbdKHT2r (ORCPT ); Wed, 8 Nov 2017 14:28:47 -0500 Smtp-Origin-Hostprefix: devbig From: Yonghong Song Smtp-Origin-Hostname: devbig474.prn1.facebook.com To: , , , , , , , , CC: Smtp-Origin-Cluster: prn1c29 Subject: [RESEND PATCH tip] x86/idt: Remove X86_TRAP_BP initialization in idt_setup_traps() Date: Wed, 8 Nov 2017 11:28:45 -0800 Message-ID: <20171108192845.552709-1-yhs@fb.com> X-Mailer: git-send-email 2.9.5 X-FB-Internal: Safe MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-08_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Yonghong Song --- 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