* [Adeos-main] [PATCH 2.6.38+] ipipe: x86: Fix user land detection on unhandled non-root faults
@ 2012-03-15 15:25 Jan Kiszka
2012-03-17 10:13 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2012-03-15 15:25 UTC (permalink / raw)
To: Philippe Gerum, adeos-main
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));
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Adeos-main] [PATCH 2.6.38+] ipipe: x86: Fix user land detection on unhandled non-root faults
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
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2012-03-17 10:13 UTC (permalink / raw)
To: Jan Kiszka; +Cc: adeos-main
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-17 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.