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-devel

[Xen-devel] Re: Bug: ptrace issues under x86_64 Xen kernel 2.6.29

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: Bug: ptrace issues under x86_64 Xen kernel 2.6.29
From: Mark Wielaard <mjw@xxxxxxxxxx>
Date: Tue, 7 Apr 2009 07:46:34 +0000 (UTC)
Delivery-date: Tue, 07 Apr 2009 00:50:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3e8340490903252341u55abbc3aree9afc1b0a7703e6@xxxxxxxxxxxxxx> <49D0361C.3060901@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Loom/3.14 (http://gmane.org/)
Jeremy Fitzhardinge <jeremy <at> goop.org> writes:
> Bryan Donlan wrote:
> > Using 2.6.29 or 2.6.28 as a 64-bit Xen domU, a number of ptrace()
> > users seem to have issues with unexpected breakpoints. ltrace and gdb
> > both seem to be affected, under both 64-bit and 32-bit userspace.
> > 32-bit kernels do not seem to be affected. Typical symptoms look like:
> >   
> It looks like this is because the kernel sets up int3 (breakpoint) and 
> debug (watchpoints, etc) to be on a separate debug stack in the tss.  
> Xen doesn't do this (and doesn't appear to have a mechanism to do so), 
> so I guess the on-stack format isn't what the kernel expects.  Does the 
> patch below work?

It works for me. With the patch I can use ltrace, gdb and systemtap uprobes
support on the guest.

But during bootup I do see the newly introduced WARN_ON(val->ist != 0) being
triggered:

WARNING: at arch/x86/xen/enlighten.c:453 cvt_gate_to_trap+0x80/0xc0() (Not
tainted)
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.29.1-15.mjw.x86_64 #1
Call Trace:
[<ffffffff81048e84>] warn_slowpath+0xdb/0xfa
[<ffffffff8100e8a1>] ? __xen_spin_lock+0xae/0xc1
[<ffffffff8100e5d9>] ? xen_spin_unlock+0x11/0x2e
[<ffffffff810993bc>] ? trace_hardirqs_off+0x9/0x20
[<ffffffff810993bc>] ? trace_hardirqs_off+0x9/0x20
[<ffffffff81365246>] ? _spin_unlock_irqrestore+0x27/0x3e
[<ffffffff8104959d>] ? release_console_sem+0x1d4/0x1e0
[<ffffffff81049af9>] ? vprintk+0x313/0x326
[<ffffffff810993bc>] ? trace_hardirqs_off+0x9/0x20
[<ffffffff81365246>] ? _spin_unlock_irqrestore+0x27/0x3e
[<ffffffff8100c4d5>] ? get_phys_to_machine+0x1a/0x31
[<ffffffff810993bc>] ? trace_hardirqs_off+0x9/0x20
[<ffffffff8102ac6b>] ? pvclock_clocksource_read+0x42/0x7b
[<ffffffff8102ac6b>] ? pvclock_clocksource_read+0x42/0x7b
[<ffffffff81365890>] ? nmi+0x0/0x51
[<ffffffff8100aa86>] cvt_gate_to_trap+0x80/0xc0
[<ffffffff8100ab14>] xen_convert_trap_info+0x4e/0x7e
[<ffffffff8100b731>] xen_load_idt+0x47/0x71
[<ffffffff8135d8e3>] cpu_init+0xd6/0x331
[<ffffffff8100b4cc>] ? xen_write_idt_entry+0x41/0xa5
[<ffffffff8118679a>] ? generic_swap+0x0/0x1c
[<ffffffff8117f418>] ? cmp_ex+0x0/0x15
[<ffffffff815d2a08>] trap_init+0x1b5/0x1b7
[<ffffffff815cbc06>] start_kernel+0x1f1/0x3c8
[<ffffffff815cb2c3>] x86_64_start_reservations+0xae/0xb2
[<ffffffff815d1c6c>] xen_start_kernel+0x584/0x593  

WARNING: at arch/x86/xen/enlighten.c:453 cvt_gate_to_trap+0x80/0xc0() (Tainted:
G        W )
Modules linked in:
Pid: 1, comm: swapper Tainted: G        W  2.6.29.1-15.mjw.x86_64 #1
Call Trace:
 [<ffffffff81048e84>] warn_slowpath+0xdb/0xfa
 [<ffffffff8109f2b9>] ? __rmqueue+0x26/0x154
 [<ffffffff810abca3>] ? __inc_zone_state+0x50/0x5c
 [<ffffffff8109ea7d>] ? page_count+0xd/0x1b
 [<ffffffff810a0b50>] ? get_page_from_freelist+0x500/0x66d
 [<ffffffff810a1417>] ? __alloc_pages_internal+0xa1/0x398
 [<ffffffff810abca3>] ? __inc_zone_state+0x50/0x5c
 [<ffffffff810ac574>] ? inc_zone_page_state+0x65/0x6f
 [<ffffffff81365890>] ? nmi+0x0/0x51
 [<ffffffff8100aa86>] cvt_gate_to_trap+0x80/0xc0
 [<ffffffff8100ab14>] xen_convert_trap_info+0x4e/0x7e
 [<ffffffff8100ab67>] xen_copy_trap_info+0x23/0x25
 [<ffffffff8135b754>] xen_cpu_up+0x167/0x2dd
 [<ffffffff81360eb8>] _cpu_up+0xa6/0x11c
 [<ffffffff813637de>] ? _cond_resched+0x9/0x38
 [<ffffffff81360fb3>] cpu_up+0x5a/0x6a
 [<ffffffff815cb8ab>] kernel_init+0xbf/0x229
 [<ffffffff8101264a>] child_rip+0xa/0x20
 [<ffffffff81011f67>] ? restore_args+0x0/0x30
 [<ffffffff8100c5cd>] ? xen_make_pmd+0x0/0xb
 [<ffffffff8100c5cd>] ? xen_make_pmd+0x0/0xb
 [<ffffffff81012640>] ? child_rip+0x0/0x20

WARNING: at arch/x86/xen/enlighten.c:453 cvt_gate_to_trap+0x80/0xc0() (Tainted:
G        W )
Modules linked in:
Pid: 0, comm: swapper Tainted: G        W  2.6.29.1-15.mjw.x86_64 #1
Call Trace:
 [<ffffffff81048e84>] warn_slowpath+0xdb/0xfa
 [<ffffffff8100e61c>] ? __spin_time_accum+0x1b/0x3a
 [<ffffffff8100e8a1>] ? __xen_spin_lock+0xae/0xc1
 [<ffffffff8100e5d9>] ? xen_spin_unlock+0x11/0x2e
 [<ffffffff810993bc>] ? trace_hardirqs_off+0x9/0x20
 [<ffffffff81365246>] ? _spin_unlock_irqrestore+0x27/0x3e
 [<ffffffff8100e5d9>] ? xen_spin_unlock+0x11/0x2e
 [<ffffffff81049af9>] ? vprintk+0x313/0x326
 [<ffffffff810a1417>] ? __alloc_pages_internal+0xa1/0x398
 [<ffffffff8100c4d5>] ? get_phys_to_machine+0x1a/0x31
 [<ffffffff810993bc>] ? trace_hardirqs_off+0x9/0x20
 [<ffffffff8102ac6b>] ? pvclock_clocksource_read+0x42/0x7b
 [<ffffffff8102ac6b>] ? pvclock_clocksource_read+0x42/0x7b
 [<ffffffff81365890>] ? nmi+0x0/0x51
 [<ffffffff8100aa86>] cvt_gate_to_trap+0x80/0xc0
 [<ffffffff8100ab14>] xen_convert_trap_info+0x4e/0x7e
 [<ffffffff8100b731>] xen_load_idt+0x47/0x71
 [<ffffffff8135d8e2>] cpu_init+0xd5/0x331
 [<ffffffff8135b52e>] cpu_bringup+0xe/0x99
 [<ffffffff8135b5e6>] cpu_bringup_and_idle+0x9/0x10



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

<Prev in Thread] Current Thread [Next in Thread>