On Thu, Apr 07, 2011 at 08:26:36PM +0200, Peter Wächtler wrote: > Hello Linux ARM developers, > > on Linux x86 there is infrastructure to set rodata to, aeh, readonly. ;) > > I also want to protect some pages to readonly as a guard. > So if some kernel code writes to the memory the kernel panics. > > I tried the following without success: > > And I have to admit that I don't understand all the macros for > manipulating the page table entries ;( > Any clue what's wrong? We don't map kernel space using pages, but section mappings which have a granularity of 1MB. That makes it difficult to set read-only status on just small areas of memory because you'd have to ensure that the .rodata starts at a 1MB boundary, and the following data also starts at a 1MB boundary - which would be quite wasteful. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-arm-kernel