This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug kprobes/5891] New: Insertion of kprobe module crashes the system on 2.6.25-rc3-mm1, if CONFIG_DEBUG_RODATA is set on x86 system.


Insertion of kprobe module crashes the system on 2.6.25-rc3-mm1, if
CONFIG_DEBUG_RODATA is set on x86 system.

While registering the probe, memcpy() in text_poke() fails to copy breakpoint
instruction to the instruction address.

Cause for the problem is, patch by Mathieu(http://lkml.org/lkml/2008/2/2/226)
Here he makes entire text segment as read-only and that is causing the problem.

=============================================
BUG: unable to handle kernel paging request at ffffffff8047d1a7
IP: [<ffffffff8047ff62>] text_poke+0xa/0x10
PGD 203067 PUD 207063 PMD 7e191163 PTE 47d161
Oops: 0003 [1] PREEMPT SMP
last sysfs file: /sys/module/stap_25e6da4cf8f5a48c8bc0b9c19bf34dae_708/sections/.bss
CPU 1
Modules linked in: stap_25e6da4cf8f5a48c8bc0b9c19bf34dae_708 autofs4 hidp rfcomm
l2cap bluetooth sunrpc iptable_filter ip_tables ip6t_REJECT xt_tcpudp
ip6table_filter ip6_tables x_tables ipv6 dm_multipath video output sbs sbshc
battery acpi_memhotplug ac lp sg tg3 ide_cd_mod floppy cdrom parport_pc i2c_i801
button parport shpchp serio_raw e752x_edac i2c_core edac_core pcspkr dm_snapshot
dm_zero dm_mirror dm_mod ata_piix libata aic79xx scsi_transport_spi sd_mod
scsi_mod ext3 jbd ehci_hcd ohci_hcd uhci_hcd [last unloaded:
stap_13fbb6e63fa8b074fe2911c441a28899_464]
Pid: 1885, comm: stapio Tainted: G        W 2.6.25-rc3-mm1 #6
RIP: 0010:[<ffffffff8047ff62>]  [<ffffffff8047ff62>] text_poke+0xa/0x10
RSP: 0018:ffff81004b073db8  EFLAGS: 00010292
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000001 RSI: ffff81004b073ddf RDI: ffffffff8047d1a7
RBP: ffffffffa04565e0 R08: 0000000000000000 R09: 0000000000000000
R10: ffff810068cf1a18 R11: 0000000000000100 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  00002b279c697b00(0000) GS:ffff81007fb997c0(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffff8047d1a7 CR3: 000000004b11c000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process stapio (pid: 1885, threadinfo ffff81004b072000, task ffff81006085c200)
Stack:  0000000000000000 ffffffff804804e0 ffffffffa04565e0 ffffffff804804ee
 cc00000000000000 ffffffff804824f2 ffffffff8057c846 0000000000000030
 ffffffff8057c846 0000000000000000 ffff81004b073f50 ffffffffa04466eb
Call Trace:
 [<ffffffff804804e0>] ? arch_arm_kprobe+0x1c/0x21
 [<ffffffff804804ee>] ? arch_prepare_kprobe+0x9/0x219
 [<ffffffff804824f2>] ? __register_kprobe+0x29d/0x2ff
 [<ffffffffa04466eb>] ?
:stap_25e6da4cf8f5a48c8bc0b9c19bf34dae_708:systemtap_module_init+0x1f2/0x2ce
 [<ffffffffa04467d0>] ?
:stap_25e6da4cf8f5a48c8bc0b9c19bf34dae_708:probe_start+0x9/0x12
 [<ffffffffa04467fa>] ?
:stap_25e6da4cf8f5a48c8bc0b9c19bf34dae_708:_stp_handle_start+0x21/0x72
 [<ffffffffa0446987>] ?
:stap_25e6da4cf8f5a48c8bc0b9c19bf34dae_708:_stp_ctl_write_cmd+0x13c/0x14b
 [<ffffffff8047f15b>] ? _spin_unlock_irqrestore+0x12/0x2c
 [<ffffffff80230424>] ? wake_up_new_task+0xa7/0xb0
 [<ffffffff80290335>] ? rw_verify_area+0x7f/0x9f
 [<ffffffff802908c9>] ? vfs_write+0xad/0x136
 [<ffffffff80290e06>] ? sys_write+0x45/0x6e
 [<ffffffff8020bf29>] ? tracesys+0xdc/0xe1


Code: 89 85 90 00 00 00 74 01 fa bf 01 00 00 00 e8 75 17 00 00 48 81 c4 88 00 00
00 5b 5d 41 5c 41 5d c3 53 48 63 ca b8 01 00 00 00 fc <f3> a4 0f a2 5b c3 41 57
49 89 ff 41 56 41 be 01 00 00 00 41 55
RIP  [<ffffffff8047ff62>] text_poke+0xa/0x10
 RSP <ffff81004b073db8>
CR2: ffffffff8047d1a7
---[ end trace 2ea236f63ebf31a7 ]---
========================================
[root@llm42 linux-2.6.25-rc3]# cat /proc/kallsyms  | grep ffffffff8047d1a7
ffffffff8047d1a7 T schedule
=======================================

-- 
           Summary: Insertion of kprobe module crashes the system on 2.6.25-
                    rc3-mm1, if CONFIG_DEBUG_RODATA is set on x86 system.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: kprobes
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: srinivasa at in dot ibm dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=5891

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]