Re: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address

2006-12-06 Thread Hirokazu Takata
Hi, Andrew,

Sorry, I sent a patch with wrong title.
On m32r, ACE is an acronym of not "access error", but "access exception".

Please drop the previous patch entitled "[PATCH 2.6.19] m32r: Fix access
error handler to pass full 32-bit address".
I will resend a correct patch again.

Thanks,

From: Hirokazu Takata <[EMAIL PROTECTED]>
Subject: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit 
address
Date: Wed, 06 Dec 2006 19:00:40 +0900
> Don't mask the lower 12-bit of the page fault address.
> 
> In the current m32r kernel implementation, we use an access error handler
> to detect page faults.
> In order to check userspace address in do_page_fault, we have to pass
> full 32-bit address to do_page_fault.
> 
> Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]>
> ---
>  arch/m32r/kernel/entry.S |2 --
>  arch/m32r/mm/fault.c |4 ++--
>  2 files changed, 2 insertions(+), 4 deletions(-)

-- Takata
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address

2006-12-06 Thread Hirokazu Takata
Don't mask the lower 12-bit of the page fault address.

In the current m32r kernel implementation, we use an access error handler
to detect page faults.
In order to check userspace address in do_page_fault, we have to pass
full 32-bit address to do_page_fault.

Signed-off-by: Hirokazu Takata <[EMAIL PROTECTED]>
---
 arch/m32r/kernel/entry.S |2 --
 arch/m32r/mm/fault.c |4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index 5b01fd2..a2c472c 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -596,8 +596,6 @@ ENTRY(ace_handler)
beqzr1, inst
 oprand:
ld  r2, @(low(MDEVA_offset),r2) ; set address
-   srlir2, #12
-   sllir2, #12
srlir1, #1
bra 1f
 inst:
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index 8d5f551..9b9feb0 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, 
unsigned long error_code,
goto good_area;
if (!(vma->vm_flags & VM_GROWSDOWN))
goto bad_area;
-#if 0
+
if (error_code & ACE_USERMODE) {
/*
 * accessing the stack below "spu" is always a bug.
@@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, 
unsigned long error_code,
if (address + 4 < regs->spu)
goto bad_area;
}
-#endif
+
if (expand_stack(vma, address))
goto bad_area;
 /*
-- 
1.4.4.1

--
Hirokazu Takata <[EMAIL PROTECTED]>
Linux/M32R Project:  http://www.linux-m32r.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address

2006-12-06 Thread Hirokazu Takata
Don't mask the lower 12-bit of the page fault address.

In the current m32r kernel implementation, we use an access error handler
to detect page faults.
In order to check userspace address in do_page_fault, we have to pass
full 32-bit address to do_page_fault.

Signed-off-by: Hirokazu Takata [EMAIL PROTECTED]
---
 arch/m32r/kernel/entry.S |2 --
 arch/m32r/mm/fault.c |4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index 5b01fd2..a2c472c 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -596,8 +596,6 @@ ENTRY(ace_handler)
beqzr1, inst
 oprand:
ld  r2, @(low(MDEVA_offset),r2) ; set address
-   srlir2, #12
-   sllir2, #12
srlir1, #1
bra 1f
 inst:
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index 8d5f551..9b9feb0 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -173,7 +173,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, 
unsigned long error_code,
goto good_area;
if (!(vma-vm_flags  VM_GROWSDOWN))
goto bad_area;
-#if 0
+
if (error_code  ACE_USERMODE) {
/*
 * accessing the stack below spu is always a bug.
@@ -184,7 +184,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, 
unsigned long error_code,
if (address + 4  regs-spu)
goto bad_area;
}
-#endif
+
if (expand_stack(vma, address))
goto bad_area;
 /*
-- 
1.4.4.1

--
Hirokazu Takata [EMAIL PROTECTED]
Linux/M32R Project:  http://www.linux-m32r.org/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit address

2006-12-06 Thread Hirokazu Takata
Hi, Andrew,

Sorry, I sent a patch with wrong title.
On m32r, ACE is an acronym of not access error, but access exception.

Please drop the previous patch entitled [PATCH 2.6.19] m32r: Fix access
error handler to pass full 32-bit address.
I will resend a correct patch again.

Thanks,

From: Hirokazu Takata [EMAIL PROTECTED]
Subject: [PATCH 2.6.19] m32r: Fix access error handler to pass full 32-bit 
address
Date: Wed, 06 Dec 2006 19:00:40 +0900
 Don't mask the lower 12-bit of the page fault address.
 
 In the current m32r kernel implementation, we use an access error handler
 to detect page faults.
 In order to check userspace address in do_page_fault, we have to pass
 full 32-bit address to do_page_fault.
 
 Signed-off-by: Hirokazu Takata [EMAIL PROTECTED]
 ---
  arch/m32r/kernel/entry.S |2 --
  arch/m32r/mm/fault.c |4 ++--
  2 files changed, 2 insertions(+), 4 deletions(-)

-- Takata
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/