On Thu, Jun 29, 2017 at 9:29 PM, David Laight <david.lai...@aculab.com> wrote:
> From: Balbir Singh
>> Sent: 28 June 2017 18:04
>> For CONFIG_STRICT_KERNEL_RWX align __init_begin to 16M.
>> We use 16M since its the larger of 2M on radix and 16M
>> on hash for our linear mapping. The plan is to have
>> .text, .rodata and everything upto __init_begin marked
>> as RX. Note we still have executable read only data.
>> We could further align rodata to another 16M boundary.
>> I've used keeping text plus rodata as read-only-executable
>> as a trade-off to doing read-only-executable for text and
>> read-only for rodata.
> ...
>
> Doesn't this go against 'address space randomisation'?
> (Yes I realise a PIC kernel is probably non-trivial to compile
> and load.)

I presume you mean Kernel ASLR. I am not sure why you think
it goes against KASLR, it's just aligning the _stext and __init_begin,
they can be anywhere in memory. I've tested with a relocatable kernel

Balbir Singh.

Reply via email to