* RO/NX Protections and Modules
@ 2012-01-23 22:04 Dannie Stanley
2012-01-25 19:01 ` Fredrick
0 siblings, 1 reply; 2+ messages in thread
From: Dannie Stanley @ 2012-01-23 22:04 UTC (permalink / raw)
To: kernelnewbies
Regarding the source code for kernel version 2.6.38. In
kernel/module.c the function defined as:
SYSCALL_DEFINE3(init_module...)
Calls set_section_ro_nx for core and init. My first question is this:
Q1: Why doesn't the exit text/data get the RO/NX page protection?
In the set_section_ro_nx function the RO comment reads: "Do not
protect last partial page" and the NX comment reads: "Do not protect
first partial page." In the presence of mixed pages this makes sense.
However, change_page_attr_set_clr seems to check for page alignment.
So my second question is this:
Q2: Does the RO/NX only apply to page aligned sections?
Thank you,
Dannie
--
Dannie M. Stanley
^ permalink raw reply [flat|nested] 2+ messages in thread
* RO/NX Protections and Modules
2012-01-23 22:04 RO/NX Protections and Modules Dannie Stanley
@ 2012-01-25 19:01 ` Fredrick
0 siblings, 0 replies; 2+ messages in thread
From: Fredrick @ 2012-01-25 19:01 UTC (permalink / raw)
To: kernelnewbies
On 01/23/2012 02:04 PM, Dannie Stanley wrote:
> Regarding the source code for kernel version 2.6.38. In
> kernel/module.c the function defined as:
>
> SYSCALL_DEFINE3(init_module...)
>
> Calls set_section_ro_nx for core and init. My first question is this:
>
> Q1: Why doesn't the exit text/data get the RO/NX page protection?
>
I guess this is a trade off.
> In the set_section_ro_nx function the RO comment reads: "Do not
> protect last partial page" and the NX comment reads: "Do not protect
> first partial page." In the presence of mixed pages this makes sense.
> However, change_page_attr_set_clr seems to check for page alignment.
> So my second question is this:
>
> Q2: Does the RO/NX only apply to page aligned sections?
>
Most MMUs/TLBs deal only with page sized memory. They handle access
attributes in page sized memory.
> Thank you,
> Dannie
>
-Fredrick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-25 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-23 22:04 RO/NX Protections and Modules Dannie Stanley
2012-01-25 19:01 ` Fredrick
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.