All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: subpage_protect: Increase the array size to take care of 64TB
@ 2014-07-15 14:52 Aneesh Kumar K.V
  2014-07-15 15:06 ` Aneesh Kumar K.V
  2014-08-06 10:38 ` Aneesh Kumar K.V
  0 siblings, 2 replies; 3+ messages in thread
From: Aneesh Kumar K.V @ 2014-07-15 14:52 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev, Aneesh Kumar K.V

We now support TASK_SIZE of 16TB, hence the array should be 8.

Fixes the below crash:

Unable to handle kernel paging request for data at address 0x000100bd
Faulting instruction address: 0xc00000000004f914
cpu 0x13: Vector: 300 (Data Access) at [c000000fea75fa90]
    pc: c00000000004f914: .sys_subpage_prot+0x2d4/0x5c0
    lr: c00000000004fb5c: .sys_subpage_prot+0x51c/0x5c0
    sp: c000000fea75fd10
   msr: 9000000000009032
   dar: 100bd
 dsisr: 40000000
  current = 0xc000000fea6ae490
  paca    = 0xc00000000fb8ab00   softe: 0        irq_happened: 0x00
    pid   = 8237, comm = a.out
enter ? for help
[c000000fea75fe30] c00000000000a164 syscall_exit+0x0/0x98
--- Exception: c00 (System Call) at 00003fff89737004

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/mmu-hash64.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 807014dde821..c2b4dcf23d03 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -22,6 +22,7 @@
  */
 #include <asm/pgtable-ppc64.h>
 #include <asm/bug.h>
+#include <asm/processor.h>
 
 /*
  * Segment table
@@ -496,7 +497,7 @@ extern void slb_set_size(u16 size);
  */
 struct subpage_prot_table {
 	unsigned long maxaddr;	/* only addresses < this are protected */
-	unsigned int **protptrs[2];
+	unsigned int **protptrs[(TASK_SIZE_USER64 >> 43)];
 	unsigned int *low_prot[4];
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc: subpage_protect: Increase the array size to take care of 64TB
  2014-07-15 14:52 [PATCH] powerpc: subpage_protect: Increase the array size to take care of 64TB Aneesh Kumar K.V
@ 2014-07-15 15:06 ` Aneesh Kumar K.V
  2014-08-06 10:38 ` Aneesh Kumar K.V
  1 sibling, 0 replies; 3+ messages in thread
From: Aneesh Kumar K.V @ 2014-07-15 15:06 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> We now support TASK_SIZE of 16TB, hence the array should be 8.

should be                     ^^^ 64TB   

>
> Fixes the below crash:

-aneesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] powerpc: subpage_protect: Increase the array size to take care of 64TB
  2014-07-15 14:52 [PATCH] powerpc: subpage_protect: Increase the array size to take care of 64TB Aneesh Kumar K.V
  2014-07-15 15:06 ` Aneesh Kumar K.V
@ 2014-08-06 10:38 ` Aneesh Kumar K.V
  1 sibling, 0 replies; 3+ messages in thread
From: Aneesh Kumar K.V @ 2014-08-06 10:38 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> We now support TASK_SIZE of 16TB, hence the array should be 8.
>
> Fixes the below crash:
>
> Unable to handle kernel paging request for data at address 0x000100bd
> Faulting instruction address: 0xc00000000004f914
> cpu 0x13: Vector: 300 (Data Access) at [c000000fea75fa90]
>     pc: c00000000004f914: .sys_subpage_prot+0x2d4/0x5c0
>     lr: c00000000004fb5c: .sys_subpage_prot+0x51c/0x5c0
>     sp: c000000fea75fd10
>    msr: 9000000000009032
>    dar: 100bd
>  dsisr: 40000000
>   current = 0xc000000fea6ae490
>   paca    = 0xc00000000fb8ab00   softe: 0        irq_happened: 0x00
>     pid   = 8237, comm = a.out
> enter ? for help
> [c000000fea75fe30] c00000000000a164 syscall_exit+0x0/0x98
> --- Exception: c00 (System Call) at 00003fff89737004
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

This should go to stable also. Merged upstream as
dad6f37c2602e4af6c3aecfdb41f2d8bd4668163. Let me know how it should be
handled.

-aneesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-06 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 14:52 [PATCH] powerpc: subpage_protect: Increase the array size to take care of 64TB Aneesh Kumar K.V
2014-07-15 15:06 ` Aneesh Kumar K.V
2014-08-06 10:38 ` Aneesh Kumar K.V

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.