From: "emist emist" <emistz@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Kernel Oops-jprobe
Date: Mon, 13 Mar 2006 01:07:23 -0500 [thread overview]
Message-ID: <347f31c90603122207y2017344eh2ddd0272a4f9f0fe@mail.gmail.com> (raw)
Greetings,
The following oops occurs when probing the sys_open function.
Following is the oops and a module with which the error can be
replicated.
[17192145.756000] kobject sysensor: registering. parent: <NULL>, set: module
[17192145.756000] kobject_hotplug
[17192145.756000] fill_kobj_path: path = '/module/sysensor'
[17192145.756000] kobject_hotplug: /sbin/udevsend module seq=1024
HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add
DEVPATH=/module/sysensor SUBSYSTEM=module[17192146.124000] Unable to
handle kernel paging request at virtual address 080c9566
[17192146.124000] printing eip:
[17192146.124000] c01c61ae
[17192146.124000] *pde = 0e124067
[17192146.124000] *pte = 00000000
[17192146.124000] Oops: 0000 [#1]
[17192146.124000] PREEMPT
[17192146.124000] Modules linked in: sysensor ppp_deflate zlib_deflate
bsd_comp ppp_async crc_ccitt ppp_generic slhc ipv6 acpi_cpufreq
speedstep_lib cpufreq_powersave cpufreq_userspace serial_cs
cpufreq_ondemand i915 pcmcia drm video battery container fan button
thermal processor ac ohci1394 yenta_socket rsrc_nonstatic pcmcia_core
ipw2200 ieee80211 ieee80211_crypt firmware_class b44 mii snd_intel8x0
snd_ac97_codec snd_ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm
snd_timer snd soundcore snd_page_alloc i2c_i801 i2c_core generic piix
shpchp pci_hotplug ehci_hcd uhci_hcd usbcore intel_agp agpgart rtc
joydev md_mod dm_mod sr_mod sbp2 scsi_mod ieee1394 psmouse mousedev
parport_pc lp parport unix
[17192146.124000] CPU: 0
[17192146.124000] EIP: 0060:[<c01c61ae>] Not tainted VLI
[17192146.124000] EFLAGS: 00210097 (2.6.15.4)
[17192146.124000] EIP is at vsnprintf+0x235/0x3f4
[17192146.124000] eax: 080c9566 ebx: c03cf1fa ecx: 080c9566 edx: fffffffe
[17192146.124000] esi: c65fbfb8 edi: ffffffff ebp: ffffffff esp: c65fbef4
[17192146.124000] ds: 007b es: 007b ss: 0068
[17192146.124000] Process sh (pid: 25185, threadinfo=c65fa000 task=d33c4a90)
[17192146.124000] Stack: 00000000 c03cf5df 0000000a 00000400 00008802
c03cf1e0 c65fa000 c01c6384
[17192146.124000] c03cf1e0 00000400 e05612e5 c65fbfb0 080c9566
c0116c7d c03cf1e0 00000400
[17192146.124000] e05612cd c65fbfb0 c65fbf84 00000000 b7eaa038
00200046 c03c3acc 00000002
[17192146.124000] Call Trace:
[17192146.124000] [<c01c6384>] vscnprintf+0x17/0x24
[17192146.124000] [<c0116c7d>] vprintk+0x62/0x22a
[17192146.124000] [<c02a8682>] int3+0x1e/0x24
[17192146.124000] [<c0116c18>] printk+0xe/0x11
[17192146.124000] [<e05610ac>] jsys_open+0x1d/0x28 [sysensor]
[17192146.124000] [<c0102cef>] sysenter_past_esp+0x54/0x75
[17192146.124000] Code: 77 03 c6 03 20 4d 43 85 ed 7f f1 e9 9e 01 00
00 89 f0 89 fa 83 c6 04 8b 08 b8 19 14 2d c0 81 f9 ff 0f 00 00 0f 46
c8 89 c8 eb 06 <80> 38 00 74 07 40 4a 83 fa ff 75 f4 29 c8 f6 04 24 10
89 c7 75
[17192146.124000] <3>Debug: sleeping function called from invalid
context at include/linux/rwsem.h:43
[17192146.124000] in_atomic():1, irqs_disabled():0
[17192146.124000] [<c0114258>] __might_sleep+0x90/0x98
[17192146.124000] [<c0117396>] profile_task_exit+0x12/0x41
[17192146.124000] [<c01188e3>] do_exit+0x16/0x39a
[17192146.124000] [<c0103dda>] do_divide_error+0x0/0x86
[17192146.124000] [<c02a94a2>] do_page_fault+0x3b4/0x561
[17192146.124000] [<c02a90ee>] do_page_fault+0x0/0x561
[17192146.124000] [<c01037df>] error_code+0x4f/0x54
[17192146.124000] [<c01c61ae>] vsnprintf+0x235/0x3f4
[17192146.124000] [<c01c6384>] vscnprintf+0x17/0x24
[17192146.124000] [<c0116c7d>] vprintk+0x62/0x22a
[17192146.124000] [<c02a8682>] int3+0x1e/0x24
[17192146.124000] [<c0116c18>] printk+0xe/0x11
[17192146.124000] [<e05610ac>] jsys_open+0x1d/0x28 [sysensor]
[17192146.124000] [<c0102cef>] sysenter_past_esp+0x54/0x75
[17192146.124000] note: sh[25185] exited with preempt_count 3
Code to reproduce the error:
#include <linux/module.h>
#include <linux/kprobes.h>
#include <linux/kallsyms.h>
asmlinkage long jsys_open(const char *filename, int flags, int mode);
static struct jprobe jopen = {
.entry = (kprobe_opcode_t *)jsys_open
};
static int register_jumpprobe(struct jprobe *probe, char *name)
{
int ret;
probe->kp.addr = (kprobe_opcode_t *) kallsyms_lookup_name(name);
if(!probe->kp.addr)
{
printk("Couldn't find %s to probe\n", name);
return -1;
}
if((ret = register_jprobe(probe)) < 0)
{
printk("Registration failed, returned %d\n", ret);
return -1;
}
return 0;
}
asmlinkage long jsys_open(const char * filename, int flags, int mode)
{
jprobe_return();
return 0;
}
int init_module(void)
{
register_jumpprobe(&jopen, "sys_open");
return 0;
}
void cleanup_module(void)
{
unregister_jprobe(&jopen);
}
MODULE_LICENSE("GPL");
Have a good one,
Igor H.
next reply other threads:[~2006-03-13 6:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-13 6:07 emist emist [this message]
2006-03-16 19:19 ` Prasanna S Panchamukhi
2006-03-17 6:21 ` Prasanna S Panchamukhi
2006-03-17 2:55 Prasanna S Panchamukhi
2006-03-17 9:31 ` Balbir Singh
2006-03-17 9:58 ` Prasanna S Panchamukhi
2006-03-17 11:11 ` Balbir Singh
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=347f31c90603122207y2017344eh2ddd0272a4f9f0fe@mail.gmail.com \
--to=emistz@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®