linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: David Laight <David.Laight@aculab.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"naveen.n.rao@linux.vnet.ibm.com"
	<naveen.n.rao@linux.vnet.ibm.com>,
	"paulus@samba.org" <paulus@samba.org>
Subject: Re: [PATCH v5 2/7] powerpc/vmlinux.lds: Align __init_begin to 16M
Date: Thu, 29 Jun 2017 21:36:27 +1000	[thread overview]
Message-ID: <CAKTCnzkptf=p9SzpyFRtDXEHRMDznukFsaeFxVERZvDLq5Bf_w@mail.gmail.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD002D97F@AcuExch.aculab.com>

On Thu, Jun 29, 2017 at 9:29 PM, David Laight <David.Laight@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	other threads:[~2017-06-29 11:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 17:04 [PATCH v5 0/7] Provide STRICT_KERNEL_RWX for powerpc Balbir Singh
2017-06-28 17:04 ` [PATCH v5 1/7] powerpc/lib/code-patching: Use alternate map for patch_instruction() Balbir Singh
2017-06-28 17:04 ` [PATCH v5 2/7] powerpc/vmlinux.lds: Align __init_begin to 16M Balbir Singh
2017-06-29 11:29   ` David Laight
2017-06-29 11:36     ` Balbir Singh [this message]
2017-06-28 17:04 ` [PATCH v5 3/7] powerpc/platform/pseries/lpar: Fix updatepp and updateboltedpp Balbir Singh
2017-06-28 17:04 ` [PATCH v5 4/7] powerpc/mm/hash: Implement mark_rodata_ro() for hash Balbir Singh
2017-06-28 17:04 ` [PATCH v5 5/7] powerpc/mm/radix: Implement mark_rodata_ro() for radix Balbir Singh
2017-06-28 17:04 ` [PATCH v5 6/7] mm/radix: Fix permissions correctly for interrupt_vectors Balbir Singh
2017-06-28 17:04 ` [PATCH v5 7/7] powerpc/Kconfig: Enable STRICT_KERNEL_RWX Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKTCnzkptf=p9SzpyFRtDXEHRMDznukFsaeFxVERZvDLq5Bf_w@mail.gmail.com' \
    --to=bsingharora@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).