linux-um archives
 help / color / mirror / Atom feed
From: "Haifeng He" <hehaifeng@gmail.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] Strange segmentation fault
Date: Thu, 12 Apr 2007 22:14:32 -0700	[thread overview]
Message-ID: <3aab51dc0704122214g6be916fdm148a7ff52d4e369c@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 954 bytes --]

Hi,

I met a program error when I tried to modify UML kernel. What I did was:
 1. added a variable "a" in struct task_struct.
 2. I wrote a function that will update the value of "a" in task struct
"current", i.e.,
  something like:
   foo () {
     current->a = xx.
   }
 3. foo is called at many places.

Now, when I run the kernel, it goes to kernal panic in "start_userspace",
and it
shows error message
"panic - not syncing: start_userspace : expected SIGSTOP, got status = 2943"

I checked the value of status. It means a segv signal. My guess is
foo () was probably called in user address space and since it caused segv
because
it tried to access UML kernel address space. My question is, if it is
possible
such thing happened, i.e., some code in UML kernel may be executed in user
address
space? If not, what could be the cause for such error? The strange thing is,

if I just read value of "a" from "current", kernel runs fine.

Thanks

Haifeng

[-- Attachment #1.2: Type: text/html, Size: 1401 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 194 bytes --]

_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2007-04-13  5:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  5:14 Haifeng He [this message]
2007-04-13 13:54 ` [uml-devel] Strange segmentation fault Jeff Dike
2007-04-13 16:31   ` Haifeng He
2007-04-13 17:59     ` Jeff Dike

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=3aab51dc0704122214g6be916fdm148a7ff52d4e369c@mail.gmail.com \
    --to=hehaifeng@gmail.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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