From: Thomas Meyer <thomas@m3y3r.de>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 2/3] um: Add kerneldoc for segv_handler
Date: Thu, 6 Jul 2017 00:34:04 +0200 [thread overview]
Message-ID: <20170705223405.10585-1-thomas@m3y3r.de> (raw)
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
arch/um/kernel/trap.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index 5915887..4e6fcb3 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -183,6 +183,16 @@ void fatal_sigsegv(void)
os_dump_core();
}
+/**
+ * segv_handler() - the SIGSEGV handler
+ * @sig: the signal number
+ * @unused_si: the signal info struct; unused in this handler
+ * @regs: the ptrace register information
+ *
+ * The handler first extracts the faultinfo from the UML ptrace regs struct.
+ * If the userfault did not happen in an UML userspace process, bad_segv is called.
+ * Otherwise the signal did happen in a cloned userspace process, handle it.
+ */
void segv_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
{
struct faultinfo * fi = UPT_FAULTINFO(regs);
--
2.9.3
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next reply other threads:[~2017-07-05 22:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 22:34 Thomas Meyer [this message]
2017-07-05 22:34 ` [uml-devel] [PATCH 3/3] um: Add kerneldoc for userspace_tramp() and start_userspace() Thomas Meyer
2017-07-07 9:07 ` Richard Weinberger
-- strict thread matches above, loose matches on Subject: below --
2017-05-14 15:03 [uml-devel] [PATCH 2/3] um: Add kerneldoc for segv_handler Thomas Meyer
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=20170705223405.10585-1-thomas@m3y3r.de \
--to=thomas@m3y3r.de \
--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