WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.2-testing] x86: INT3 and INTO trap gates should h

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.2-testing] x86: INT3 and INTO trap gates should have DPL==3.
From: "Xen patchbot-3.2-testing" <patchbot-3.2-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Jan 2008 09:50:39 -0800
Delivery-date: Wed, 16 Jan 2008 09:50:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1200396785 0
# Node ID 6af8d29777a3a13375bd3ed967df616f7fc213e6
# Parent  45d16899a21df6a36611e051e71f621a4439b4a7
x86: INT3 and INTO trap gates should have DPL==3.
This was broken by c/s 16667 (gdbstub changes).
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16713:973221f4d9c76b3efa3ce42dae97a41b03273737
xen-unstable date:        Tue Jan 15 11:29:15 2008 +0000
---
 xen/arch/x86/traps.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff -r 45d16899a21d -r 6af8d29777a3 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Sun Jan 13 10:50:18 2008 +0000
+++ b/xen/arch/x86/traps.c      Tue Jan 15 11:33:05 2008 +0000
@@ -2679,14 +2679,24 @@ asmlinkage void do_spurious_interrupt_bu
 {
 }
 
-void set_intr_gate(unsigned int n, void *addr)
+static void __set_intr_gate(unsigned int n, uint32_t dpl, void *addr)
 {
     int i;
     /* Keep secondary tables in sync with IRQ updates. */
     for ( i = 1; i < NR_CPUS; i++ )
         if ( idt_tables[i] != NULL )
-            _set_gate(&idt_tables[i][n], 14, 0, addr);
-    _set_gate(&idt_table[n], 14, 0, addr);
+            _set_gate(&idt_tables[i][n], 14, dpl, addr);
+    _set_gate(&idt_table[n], 14, dpl, addr);
+}
+
+static void set_swint_gate(unsigned int n, void *addr)
+{
+    __set_intr_gate(n, 3, addr);
+}
+
+void set_intr_gate(unsigned int n, void *addr)
+{
+    __set_intr_gate(n, 0, addr);
 }
 
 void set_tss_desc(unsigned int n, void *addr)
@@ -2753,8 +2763,8 @@ void __init trap_init(void)
     set_intr_gate(TRAP_divide_error,&divide_error);
     set_intr_gate(TRAP_debug,&debug);
     set_intr_gate(TRAP_nmi,&nmi);
-    set_intr_gate(TRAP_int3,&int3);         /* usable from all privileges */
-    set_intr_gate(TRAP_overflow,&overflow); /* usable from all privileges */
+    set_swint_gate(TRAP_int3,&int3);         /* usable from all privileges */
+    set_swint_gate(TRAP_overflow,&overflow); /* usable from all privileges */
     set_intr_gate(TRAP_bounds,&bounds);
     set_intr_gate(TRAP_invalid_op,&invalid_op);
     set_intr_gate(TRAP_no_device,&device_not_available);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.2-testing] x86: INT3 and INTO trap gates should have DPL==3., Xen patchbot-3.2-testing <=