linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] STRICT_KERNEL_RWX weakened on ARM by CONFIG_ARM_LPAE=y
@ 2017-11-09  0:41 Philip Derrin
  2017-11-09  0:41 ` [PATCH 1/2] ARM: mm: make STRICT_KERNEL_RWX effective for LPAE Philip Derrin
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Philip Derrin @ 2017-11-09  0:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

This patch series fixes a bug which makes CONFIG_STRICT_KERNEL_RWX ineffective
when CONFIG_ARM_LPAE is enabled. Specifically, the kernel text and rodata are
mapped writeable. This has been the case since DEBUG_RODATA for ARM was first
merged in 3.19.

The cause was an incorrect conflict resolution in 1e3479225acb ("ARM: 8275/1:
mm: fix PMD_SECT_RDONLY undeclared compile error") between the commit that
implemented DEBUG_RODATA, 80d6b0c2eed2 ("ARM: mm: allow text and rodata
sections to be read-only"), and another that moved the LPAE read-only bit into
a software bit, ded947798469 ("ARM: 8109/1: mm: Modify pte_write and pmd_write
logic for LPAE").

The incorrect mappings were not apparent in the debugfs kernel_page_tables
dump because that was checking only the software RO bit, not the hardware RO
bit.

Regards,
Philip


Philip Derrin (2):
  ARM: mm: make STRICT_KERNEL_RWX effective for LPAE
  ARM: mm: dump: check hardware RO bit for LPAE

 arch/arm/mm/dump.c | 4 ++--
 arch/arm/mm/init.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.15.0

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

end of thread, other threads:[~2017-11-20 19:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09  0:41 [PATCH 0/2] STRICT_KERNEL_RWX weakened on ARM by CONFIG_ARM_LPAE=y Philip Derrin
2017-11-09  0:41 ` [PATCH 1/2] ARM: mm: make STRICT_KERNEL_RWX effective for LPAE Philip Derrin
2017-11-09  0:41 ` [PATCH 2/2] ARM: mm: dump: check hardware RO bit " Philip Derrin
2017-11-09  1:23 ` [PATCH 0/2] STRICT_KERNEL_RWX weakened on ARM by CONFIG_ARM_LPAE=y Kees Cook
2017-11-09  9:37   ` Russell King - ARM Linux
2017-11-09  9:49     ` Baruch Siach
2017-11-09 23:13       ` Russell King - ARM Linux
2017-11-14  2:48     ` Philip Derrin
2017-11-20 18:45 ` Florian Fainelli
2017-11-20 19:01   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).