aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/pageattr.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index c870424aa9ad..8493c855582b 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -167,8 +167,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address)
167 if (within(address, virt_to_highmap(_text), virt_to_highmap(_etext))) 167 if (within(address, virt_to_highmap(_text), virt_to_highmap(_etext)))
168 pgprot_val(forbidden) |= _PAGE_NX; 168 pgprot_val(forbidden) |= _PAGE_NX;
169 169
170
171#ifdef CONFIG_DEBUG_RODATA
172 /* The .rodata section needs to be read-only */ 170 /* The .rodata section needs to be read-only */
173 if (within(address, (unsigned long)__start_rodata, 171 if (within(address, (unsigned long)__start_rodata,
174 (unsigned long)__end_rodata)) 172 (unsigned long)__end_rodata))
@@ -179,7 +177,6 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address)
179 if (within(address, virt_to_highmap(__start_rodata), 177 if (within(address, virt_to_highmap(__start_rodata),
180 virt_to_highmap(__end_rodata))) 178 virt_to_highmap(__end_rodata)))
181 pgprot_val(forbidden) |= _PAGE_RW; 179 pgprot_val(forbidden) |= _PAGE_RW;
182#endif
183 180
184 prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden)); 181 prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
185 182