lkml.org 
[lkml]   [2004]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Comparing PROT_EXEC-only pages on different CPUs
Thanks for your input, Richard.

Richard Henderson wrote:
> > Richard raises an interesting point: exec-only pages are useless if
> > the code needs to read jump tables and constant pools. It seems very
> > likely Alpha and IA64 have these.
>
> Only if the processor is crippled enough that mixing jump tables and
> constant pools in the same pages as code is considered reasonable.

That's a good point, if the i-cache and/or DTLB are separate from
d-cache and/or DTLB. Then it makes more sense to put tables in a
separate address block.

However if the caches are unified then it makes sense to put them
together. Somehow I doubt if any of these 64-bit chips have unified
i- and d-caches though :)

> Anyway, that's a strawman -- it's the toolchain's job to get the bits
> on the pt_load segments correct.
>
> If the pt_load segment or the mmap prot argument says execute-only,
> then you should honor it.

In other words, PA-RISC and SH64 kernels _should_ create exec-only
pages if requested, as the hardware can do it, right?

And the toolchain _should_ ask read permssion for code segments, if
(and only if) the compiler has generated code which needs that, right?

I very much agree.

(Fwiw, Alpha does gives read permission to a write-only request, even
on chips which don't need that for byte writes to work. Isn't that a
similar case?)

Thanks,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.068 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site