Question: how to make one page readonly on ARM

晁永生 chaoys155 at gmail.com
Thu Feb 16 20:01:05 EST 2012


I just want to alloc some readonly pages to detect memory corruption.
is it workable?

2012/2/17, Nicolas Pitre <nico at fluxnic.net>:
> On Thu, 16 Feb 2012, 晁永生 wrote:
>
>> 2012/2/16 Russell King - ARM Linux <linux at arm.linux.org.uk>:
>> > On Thu, Feb 16, 2012 at 12:54:27PM +0800, 晁永生 wrote:
>> >> Hi,
>> >> I get one page by __get_free_page and can make it readonly by
>> >> set_memory_ro on X86,
>> >> but how to do this on ARM?
>> >
>> > You can't, because we map all kernel space with 1MB section mappings.
>>
>> sorry, I don't quite understand. I am kernel newbie.
>> Do you mean that if I want to make one memory region readonly, it has
>> to be in MB unit?
>> Does ARM kernel have any functions similar to set_memory_ro?
>
> No.
>
> Maybe if you tell us more about what your end goal is, we might be able
> to suggest alternatives for solving your problem.
>
>
> Nicolas
>


-- 
Thanks a lot!



More information about the linux-arm-kernel mailing list