Skip to content

Commit dad6f37

Browse files
kvaneeshozbenh
authored andcommitted
powerpc: subpage_protect: Increase the array size to take care of 64TB
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 Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent e698b96 commit dad6f37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/powerpc/include/asm/mmu-hash64.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*/
2323
#include <asm/pgtable-ppc64.h>
2424
#include <asm/bug.h>
25+
#include <asm/processor.h>
2526

2627
/*
2728
* Segment table
@@ -496,7 +497,7 @@ extern void slb_set_size(u16 size);
496497
*/
497498
struct subpage_prot_table {
498499
unsigned long maxaddr; /* only addresses < this are protected */
499-
unsigned int **protptrs[2];
500+
unsigned int **protptrs[(TASK_SIZE_USER64 >> 43)];
500501
unsigned int *low_prot[4];
501502
};
502503

0 commit comments

Comments
 (0)