From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: adeos-main <adeos-main@gna.org>
Subject: Re: [Adeos-main] [PATCH 2.6.38+] ipipe: x86: Fix user land detection on unhandled non-root faults
Date: Sat, 17 Mar 2012 11:13:15 +0100 [thread overview]
Message-ID: <4F6463BB.7040607@domain.hid> (raw)
In-Reply-To: <4F6209FD.5080808@domain.hid>
On 03/15/2012 04:25 PM, Jan Kiszka wrote:
> Not only page faults are processed by __ipipe_handle_exception, so the
> validity and encoding of error_code varies. Use user_mode_vm instead to
> detect if the fault was raised over a user context.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@domain.hid>
> ---
> arch/x86/kernel/ipipe.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
> index 5be7005..b2e2a5b 100644
> --- a/arch/x86/kernel/ipipe.c
> +++ b/arch/x86/kernel/ipipe.c
> @@ -560,7 +560,8 @@ int __ipipe_handle_exception(struct pt_regs *regs, long error_code, int vector)
> ipipe_trace_panic_freeze();
>
> /* Always warn about user land and unfixable faults. */
> - if ((error_code& 4) || !search_exception_tables(instruction_pointer(regs))) {
> + if (user_mode_vm(regs) ||
> + !search_exception_tables(instruction_pointer(regs))) {
> printk(KERN_ERR "BUG: Unhandled exception over domain"
> " %s at 0x%lx - switching to ROOT\n",
> ipd->name, instruction_pointer(regs));
Merged, thanks.
--
Philippe.
prev parent reply other threads:[~2012-03-17 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 15:25 [Adeos-main] [PATCH 2.6.38+] ipipe: x86: Fix user land detection on unhandled non-root faults Jan Kiszka
2012-03-17 10:13 ` Philippe Gerum [this message]
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=4F6463BB.7040607@domain.hid \
--to=rpm@xenomai.org \
--cc=adeos-main@gna.org \
--cc=jan.kiszka@domain.hid \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.