From: Kasper Dupont <kasperd@daimi.au.dk>
To: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [RFC] handle_vm86_fault
Date: Wed, 22 May 2002 15:16:02 +0200 [thread overview]
Message-ID: <3CEB9A12.FB4C346B@daimi.au.dk> (raw)
Recently some changes were made to arch/i386/kernel/vm86.c in order to
prevent some Oopses. Currently handle_vm86_fault returns VM86_UNKNOWN
in those cases. But that is a little broken, rather than returning
this value, it should send a SIGSEGV to usermode.
That is however not trivial, there is a problem with the si_addr field
in the siginfo_t struct. The do_page_fault function in
arch/i386/mm/fault.c will fill this field in such a struct with the
local variable address. But that only happens if the trap comes from
usermode, in this case the trap comes from kernelmode. That means that
do_page_fault just finds the fixup address and returns loosing the
value of the local variable address.
How can I pass that variable back from do_page_fault to
handle_vm86_fault? There might also be a problem with the si_code
field, I'm not sure exactly from where I should get that value.
Perhaps it will turn out to be some known constant.
Would it be safe to fill the address in tsk->thread.cr2 like the
usermode case?
--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:razor-report@daimi.au.dk
reply other threads:[~2002-05-22 13:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3CEB9A12.FB4C346B@daimi.au.dk \
--to=kasperd@daimi.au.dk \
--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®