Thread (2 messages) flat view 2 messages, 2 authors, 2019-06-16

Re: [PATCH v5 13/16] powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX

From: christophe leroy <hidden>
Date: 2019-06-16 08:21:21
Also in: lkml


Le 15/06/2019 à 14:28, Andreas Schwab a écrit :
On Feb 21 2019, Christophe Leroy [off-list ref] wrote:
quoted
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index a000768a5cc9..6e56a6240bfa 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -353,7 +353,10 @@ void mark_initmem_nx(void)
  	unsigned long numpages = PFN_UP((unsigned long)_einittext) -
  				 PFN_DOWN((unsigned long)_sinittext);
  
-	change_page_attr(page, numpages, PAGE_KERNEL);
+	if (v_block_mapped((unsigned long)_stext) + 1)
That is always true.
Did you boot with 'nobats' kernel parameter ?

If not, that's normal to be true, it means that memory is mapped with BATs.

When you boot with 'nobats' parameter, this should return false.

Christophe

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help