public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Prasanna S Panchamukhi <prasanna@in.ibm.com>
To: Balbir Singh <balbir@in.ibm.com>
Cc: emist emist <emistz@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: Kernel Oops-jprobe
Date: Fri, 17 Mar 2006 15:28:58 +0530	[thread overview]
Message-ID: <20060317095858.GA855@in.ibm.com> (raw)
In-Reply-To: <661de9470603170131j7580d8ccr9927a600a7184ef3@mail.gmail.com>

> > >DEVPATH=/module/sysensor SUBSYSTEM=module[17192146.124000] Unable to
> > >handle kernel paging request at virtual address 080c9566
> 
> The address looks like a user space address. Since sys_open() passes
> user space arguments - in this case a pointer to the filename. Are you
> derefencing the pointer correctly?
> 
> I think the handler should first copy_from_user().

User must not call copy_from_user() in the handler, since preemption is
disabled and the copy_from_user might cause a page fault that might
sleep if the user page is not in the memory. Although the latest patch
posted on lkml tries to fixup the exception, it may some
times not succeed and the data collected might be incorrect.

> 
> Moreover your stack is
> [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
> 
> and in the code posted, there is no printk in jsys_open(). Have you
> sent a revised version of your probe module?

Also from the above stack trace, looks like you had a int3 elsewhere(in printk)
also when jsys_open() was executed.

Thanks
Prasanna
-- 
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-51776329

  reply	other threads:[~2006-03-17  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17  2:55 Kernel Oops-jprobe Prasanna S Panchamukhi
2006-03-17  9:31 ` Balbir Singh
2006-03-17  9:58   ` Prasanna S Panchamukhi [this message]
2006-03-17 11:11     ` Balbir Singh
  -- strict thread matches above, loose matches on Subject: below --
2006-03-13  6:07 emist emist
2006-03-16 19:19 ` Prasanna S Panchamukhi
2006-03-17  6:21   ` Prasanna S Panchamukhi

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=20060317095858.GA855@in.ibm.com \
    --to=prasanna@in.ibm.com \
    --cc=balbir@in.ibm.com \
    --cc=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