From: "Chan Kim" <ckim@etri.re.kr>
To: <kernelnewbies@kernelnewbies.org>
Subject: Using printk, how can I know where the kernel jumps after schedule() function?
Date: Fri, 26 Aug 2022 19:04:41 +0900 [thread overview]
Message-ID: <035a01d8b933$427f76b0$c77e6410$@etri.re.kr> (raw)
Hello experts,
I am faced with a problem on my experiment. (arm64)
When the linux kernel boots and after it jumped to /bin/sh in the initramfs
(by busybox), it hangs after the program jumps the schedule() function.
I can see it comes out of schedule() function using printk, but I don't know
where it had gone(or returned).
I tried printing the bottom two values in the schedule() function, because
the x29(=fp) and x30(=lr) is stored at the stack bottom during any function.
But the lr value is somewhere in then init stack(by examining the
System.map). So I guessed that lr value, a virtual address is a user virtual
address.. Is my guess correct or should the lr value point to a point in
kernel text section?
Actually I don't know exactly how a user program is interrupted by the
schedule function initiated by the timer interrupt so I would be grateful if
someone explain it.
( I tried reading part of a book or web posts but didn't get what I want
yet).
Thank you!
Regards,
Chan Kim
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next reply other threads:[~2022-08-26 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 10:04 Chan Kim [this message]
2022-10-08 20:43 ` Using printk, how can I know where the kernel jumps after schedule() function? Fabio M. De Francesco
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='035a01d8b933$427f76b0$c77e6410$@etri.re.kr' \
--to=ckim@etri.re.kr \
--cc=kernelnewbies@kernelnewbies.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).