ARM: LPAE: fix access flag setup in mem_type_table
PATCH 1/1 ARM: LPAE: fix access flag setup in mem_type_table
A zero value for prot_sect in the memory types table implies that section mappings should never be created for the memory type in question. This is checked for in alloc_init_section().
With LPAE, we set a bit to mask access flag faults for kernel mappings. This breaks the aforementioned (!prot_sect) check in alloc_init_section().
This patch fixes this bug by first checking for a non-zero prot_sect before setting the PMD_SECT_AF flag.
--- arch/arm/mm/mmu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mm/mmu.c +2 -1
@@ -494,7 +494,8 @@ static void __init build_mem_type_table(void)*/ for (i =0 ; i <ARRAY_SIZE (mem_types); i++) { mem_types[i].prot_pte |=PTE_EXT_AF ; - mem_types[i].prot_sect |=PMD_SECT_AF ; +if (mem_types[i].prot_sect) + mem_types[i].prot_sect |=PMD_SECT_AF ; } kern_pgprot |=PTE_EXT_AF ; vecs_pgprot |=PTE_EXT_AF ;
Signature · 1 line
1.7.5.4
PATCH 1/1 ARM: LPAE: fix access flag setup in mem_type_table
Quoted 7 lines · Vitaly Andrianov
A zero value for
prot_sectin the memory types table implies that section mappings should never be created for the memory type in question. This is checked for inalloc_init_section().With LPAE, we set a bit to mask access flag faults for kernel mappings. This breaks the aforementioned (!prot_sect) check in
alloc_init_section().
Quoted 6 lines
This patch fixes this bug by first checking for a non-zero
prot_sectbefore setting thePMD_SECT_AFflag.Signed-off-by Vitaly Andrianov <[email protected]>Acked-by Catalin Marinas <[email protected]>
Please put this in the patch system. No blank line is needed between s-off-by and acked-by.
PATCH 1/1 ARM: LPAE: fix access flag setup in mem_type_table
Hello,
Quoted 11 lines · Russell King - ARM Linux
Quoted 10 lines · Vitaly Andrianov
A zero value for
prot_sectin the memory types table implies that section mappings should never be created for the memory type in question. This is checked for inalloc_init_section().With LPAE, we set a bit to mask access flag faults for kernel mappings. This breaks the aforementioned (!prot_sect) check in
alloc_init_section().This patch fixes this bug by first checking for a non-zero
prot_sectbefore setting thePMD_SECT_AFflag.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Vitaly Andrianov<[email protected]>Acked-by Catalin Marinas<[email protected]>Please put this in the patch system. No blank line is needed between s-off-by and acked-by.
This patch fixes the issue introduced by adding CMA to ARM architecture which I've pushed for testing to linux-next. I've added it to my for-next-cma branch:
Best regards
Signature · 2 lines
Marek Szyprowski Samsung Poland R&D Center