Re: [PATCH v1] Arm64: ASLR: fix text randomization

2014-10-09 Thread Mark Rutland
On Wed, Oct 08, 2014 at 12:21:55PM +0100, Will Deacon wrote: > On Wed, Oct 08, 2014 at 07:51:54AM +0100, Arun Chandran wrote: > > On Tue, Oct 7, 2014 at 7:13 PM, Mark Rutland wrote: > > > I wasn't able to spot where the randomness came from in the > > > ARCH_BINFMT_ELF_RANDOMIZE_PIE case, so it's

Re: [PATCH v1] Arm64: ASLR: fix text randomization

2014-10-08 Thread Will Deacon
On Wed, Oct 08, 2014 at 07:51:54AM +0100, Arun Chandran wrote: > On Tue, Oct 7, 2014 at 7:13 PM, Mark Rutland wrote: > > I wasn't able to spot where the randomness came from in the > > ARCH_BINFMT_ELF_RANDOMIZE_PIE case, so it's not clear to me if the > > generic implementation behaves identically

Re: [PATCH v1] Arm64: ASLR: fix text randomization

2014-10-07 Thread Arun Chandran
Hi Mark, On Tue, Oct 7, 2014 at 7:13 PM, Mark Rutland wrote: > > On Tue, Oct 07, 2014 at 01:40:28PM +0100, Arun Chandran wrote: > > This is due to incorrect definition of ELF_ET_DYN_BASE. It > > introduces randomization for text even if user does a "echo 0 > > > /proc/sys/kernel/randomize_va_spac

Re: [PATCH v1] Arm64: ASLR: fix text randomization

2014-10-07 Thread Mark Rutland
On Tue, Oct 07, 2014 at 01:40:28PM +0100, Arun Chandran wrote: > This is due to incorrect definition of ELF_ET_DYN_BASE. It > introduces randomization for text even if user does a "echo 0 > > /proc/sys/kernel/randomize_va_space" Interesting. It looks like this was a copy of what powerpc and s390

[PATCH v1] Arm64: ASLR: fix text randomization

2014-10-07 Thread Arun Chandran
This is due to incorrect definition of ELF_ET_DYN_BASE. It introduces randomization for text even if user does a "echo 0 > /proc/sys/kernel/randomize_va_space" Signed-off-by: Arun Chandran --- This can be tested using the code below #include int main(int argc, char *argv) { printf("main =