* Question: how to make one page readonly on ARM
@ 2012-02-16 4:54 晁永生
2012-02-16 8:55 ` Russell King - ARM Linux
0 siblings, 1 reply; 6+ messages in thread
From: 晁永生 @ 2012-02-16 4:54 UTC (permalink / raw)
To: linux-arm-kernel
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?
--
Thanks a lot!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Question: how to make one page readonly on ARM
2012-02-16 4:54 Question: how to make one page readonly on ARM 晁永生
@ 2012-02-16 8:55 ` Russell King - ARM Linux
2012-02-16 10:33 ` 晁永生
0 siblings, 1 reply; 6+ messages in thread
From: Russell King - ARM Linux @ 2012-02-16 8:55 UTC (permalink / raw)
To: linux-arm-kernel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Question: how to make one page readonly on ARM
2012-02-16 8:55 ` Russell King - ARM Linux
@ 2012-02-16 10:33 ` 晁永生
2012-02-16 18:31 ` Nicolas Pitre
0 siblings, 1 reply; 6+ messages in thread
From: 晁永生 @ 2012-02-16 10:33 UTC (permalink / raw)
To: linux-arm-kernel
2012/2/16 Russell King - ARM Linux <linux@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?
--
Thanks a lot!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Question: how to make one page readonly on ARM
2012-02-16 10:33 ` 晁永生
@ 2012-02-16 18:31 ` Nicolas Pitre
2012-02-17 1:01 ` 晁永生
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2012-02-16 18:31 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 16 Feb 2012, ??? wrote:
> 2012/2/16 Russell King - ARM Linux <linux@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Question: how to make one page readonly on ARM
2012-02-16 18:31 ` Nicolas Pitre
@ 2012-02-17 1:01 ` 晁永生
2012-02-29 14:10 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: 晁永生 @ 2012-02-17 1:01 UTC (permalink / raw)
To: linux-arm-kernel
I just want to alloc some readonly pages to detect memory corruption.
is it workable?
2012/2/17, Nicolas Pitre <nico@fluxnic.net>:
> On Thu, 16 Feb 2012, ??? wrote:
>
>> 2012/2/16 Russell King - ARM Linux <linux@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!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-29 14:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 4:54 Question: how to make one page readonly on ARM 晁永生
2012-02-16 8:55 ` Russell King - ARM Linux
2012-02-16 10:33 ` 晁永生
2012-02-16 18:31 ` Nicolas Pitre
2012-02-17 1:01 ` 晁永生
2012-02-29 14:10 ` Arnd Bergmann
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).