> Also, since mips64 doesn't have a real hardware NX bit, splitting the > .text and .rodata segments doesn't actually get us anything from a > protection standpoint. So, unset PAD_NO to smoosh them back together.
The Loongson processors are supposed to have an NX bit, but it's only mentioned once in the documentation, without enough details (in particular, there is no mention of what exception is triggered when an instruction fetch would hit a tlb entry with the NX bit set). Mention of this bit disappeared in the 2F documentation, but that's because most of the english language 2F documentation is actually the R4000 manual with "R4000" replaced with "Loongson 2F" in it. > What I'm not sure is if the pmap would be happier with them separate: the > workaround for the "R4000 EOP" bug applies to PROT_EXEC pages only, so > maybe it would be better to keep them separate for that? Anyone? The R4000 EOP workaround is triggered by pmap_enter() when entering a page with PROT_EXEC, and rodata pages could cause false positives. It would make sense to keep text and rodata separate.
