Re: [PATCH v5 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-12-07 Thread Daniel Cashman
On 12/07/2015 03:13 AM, Arnd Bergmann wrote: > On Monday 07 December 2015 10:26:16 Jon Hunter wrote: >> >> diff --git a/arch/arm64/mm/mmap.c b/arch/arm64/mm/mmap.c >> index af461b935137..e59a75a308bc 100644 >> --- a/arch/arm64/mm/mmap.c >> +++ b/arch/arm64/mm/mmap.c >> @@ -51,7 +51,7 @@ unsigned lo

[PATCH 0/4] Allow customizable random offset to mmap_base address.

2015-11-18 Thread Daniel Cashman
From: dcashman Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the locati

[PATCH 2/4] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 10 ++ arch/arm/mm/mmap.c | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b

[PATCH 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-18 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/vm.txt | 29 arch/Kconfig| 64

[PATCH 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/arm64/Kconfig | 23 +++ arch/arm64/mm/mmap.c | 6 -- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/arch/arm64

[PATCH 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions(+), 6 deletions

[PATCH v3 2/4] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 10 ++ arch/arm/mm/mmap.c | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b

[PATCH v3 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions(+), 6 deletions

[PATCH v3 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/arm64/Kconfig | 23 +++ arch/arm64/mm/mmap.c | 6 -- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/arch/arm64

[PATCH v3 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-18 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/vm.txt | 29 arch/Kconfig| 64

[PATCH v3 0/4] Allow customizable random offset to mmap_base address.

2015-11-18 Thread Daniel Cashman
From: dcashman Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the locati

Re: [PATCH 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-18 Thread Daniel Cashman
> I think the min/max values should be const, since they're determined > at build time and should never change. Ok. Also, I just submitted the patch-set again with [PATCH v3] instead of [PATCH] so I'd prefer discussion there; sorry for the mistake. -Dan -- To unsubscribe from this list: send the

Re: [PATCH v3 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-18 Thread Daniel Cashman
On 11/18/2015 03:20 PM, Daniel Cashman wrote: > == > > +mmap_rnd_bits: > + > +This value can be used to select the number of bits to use to > +determine the random offset to the base address of vma regions >

Re: [PATCH v3 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-11-18 Thread Daniel Cashman
On 11/18/2015 03:20 PM, Daniel Cashman wrote: > - /* > - * 8 bits of randomness in 32bit mmaps, 20 address space bits > - * 28 bits of randomness in 64bit mmaps, 40 address space bits > - */ This should be removed. -- To unsubscribe from this list: send the line

Re: [PATCH] ARM: avoid ARCH_MMAP_RND_BITS for NOMMU

2015-11-30 Thread Daniel Cashman
Thank you for this. I will add this to the recently posted patchset v4. Without CONFIG_MMU, arch_pick_mmap_layout() is a no-op and the arch/$ARCH/mm/mmap.c source is not included, so this change makes sense. In addition, we should drop the nommu default and add depends-on for the Kconfig portio

Re: [PATCH v4 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-30 Thread Daniel Cashman
;> on the various CONFIG options that calculate the valid min/maxes. Only >> mmap_rnd_bits itself should be changing. > > hmpf. > > From: Andrew Morton > Subject: include/linux/sysctl.h: make ctl_table.extra1/2 const > > Nothing should be altering these values. Decl

Re: [PATCH v4 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-12-01 Thread Daniel Cashman
On 11/30/2015 04:03 PM, Kees Cook wrote: > On Thu, Nov 26, 2015 at 2:59 PM, Daniel Cashman wrote: >> diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c >> index 844b06d..647fecf 100644 >> --- a/arch/x86/mm/mmap.c >> +++ b/arch/x86/mm/mmap.c >> @@ -69,14 +69,

[PATCH v5 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-12-01 Thread Daniel Cashman
that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/arm64/Kconfig | 31 +++ arch/arm64/mm/mmap.c | 8 ++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a

[PATCH v5 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-12-01 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/vm.txt | 29 +++ arch/Kconfig| 68

[PATCH v5 2/4] arm: mm: support ARCH_MMAP_RND_BITS.

2015-12-01 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 9 + arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch

[PATCH v5 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-12-01 Thread Daniel Cashman
, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions(+), 6 deletions

[PATCH v5 0/4] Allow customizable random offset to mmap_base address.

2015-12-01 Thread Daniel Cashman
Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the location of regions in

Re: [PATCH v5 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-12-03 Thread Daniel Cashman
On 12/3/15 4:17 AM, Will Deacon wrote: >> +select HAVE_ARCH_MMAP_RND_BITS if MMU >> +select HAVE_ARCH_MMAP_RND_COMPAT_BITS if MMU && COMPAT > > You can drop the 'if MMU' bits, since we don't support !MMU on arm64. Ok, will do. I was a little uneasy leaving it implicit, but even if somethi

Re: [PATCH v6 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-12-14 Thread Daniel Cashman
On 12/14/2015 03:19 AM, Will Deacon wrote: >> +# max bits determined by the following formula: >> +# VA_BITS - PAGE_SHIFT - 3 > > Now that we have this comment, I think we can drop the unsupported > combinations from the list below. That means we just end up with: > >> +config ARCH_MMAP_RND_BITS

Re: [PATCH v6 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-12-14 Thread Daniel Cashman
On 12/14/2015 10:58 AM, H. Peter Anvin wrote: > On 12/11/15 09:52, Daniel Cashman wrote: >> diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c >> index 844b06d..647fecf 100644 >> --- a/arch/x86/mm/mmap.c >> +++ b/arch/x86/mm/mmap.c >> @@ -69,14 +69,14 @@

Re: [PATCH v3 0/4] Allow customizable random offset to mmap_base address.

2015-11-25 Thread Daniel Cashman
On 11/24/2015 04:39 PM, Andrew Morton wrote: > mips, powerpc and s390 also implement arch_mmap_rnd(). Are there any > special considerations here, or it just a matter of maintainers wiring > it up and testing it? I had not yet looked at those at all, as I had no way to do even a rudimentary "doe

Re: [PATCH v3 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-25 Thread Daniel Cashman
On 11/24/2015 04:47 PM, Kees Cook wrote: > On Tue, Nov 24, 2015 at 4:40 PM, Andrew Morton > wrote: >> On Wed, 18 Nov 2015 15:20:05 -0800 Daniel Cashman >> wrote: >> >>> --- a/kernel/sysctl.c >>> +++ b/kernel/sysctl.c >>> @@ -

Re: [PATCH v3 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-11-25 Thread Daniel Cashman
On 11/24/2015 08:26 PM, Michael Ellerman wrote: > On Mon, 2015-11-23 at 10:55 -0800, Daniel Cashman wrote: >> On 11/23/2015 07:04 AM, Will Deacon wrote: >>> On Wed, Nov 18, 2015 at 03:20:07PM -0800, Daniel Cashman wrote: >>>> +config ARCH_MMAP_RND_BITS_

Re: [PATCH v3 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-25 Thread Daniel Cashman
On 11/24/2015 08:40 PM, Michael Ellerman wrote: > On Wed, 2015-11-18 at 15:20 -0800, Daniel Cashman wrote: > >> From: dcashman >> >> ASLR currently only uses 8 bits to generate the random offset for the >> mmap base address on 32 bit architectures. This value was

Re: [PATCH v3 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-11-25 Thread Daniel Cashman
On 11/25/2015 04:06 AM, Catalin Marinas wrote: > On Mon, Nov 23, 2015 at 10:55:16AM -0800, Daniel Cashman wrote: >> On 11/23/2015 07:04 AM, Will Deacon wrote: >>> On Wed, Nov 18, 2015 at 03:20:07PM -0800, Daniel Cashman wrote: >>>> +config ARCH_MMAP_RND_BITS_

[PATCH v4 0/4] Allow customizable random offset to mmap_base address.

2015-11-26 Thread Daniel Cashman
Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the location of regions in

[PATCH v4 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-11-26 Thread Daniel Cashman
sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a

[PATCH v4 2/4] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-26 Thread Daniel Cashman
developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 10 ++ arch/arm/mm/mmap.c | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig

[PATCH v4 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-26 Thread Daniel Cashman
the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/vm.txt | 29 +++ arch/Kconfig| 68

[PATCH v4 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-11-26 Thread Daniel Cashman
developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/arm64/Kconfig | 31 +++ arch/arm64/mm/mmap.c | 8 ++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/arch/arm64/Kconfig

Re: [PATCH v4 0/4] Allow customizable random offset to mmap_base address.

2015-11-26 Thread Daniel Cashman
On 11/26/15 2:59 PM, Daniel Cashman wrote: > Address Space Layout Randomization (ASLR) provides a barrier to exploitation > of user-space processes in the presence of security vulnerabilities by making > it more difficult to find desired code/data which could help an attack. This >

[PATCH 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-10-28 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/kernel.txt | 14 ++ include/linux/mm.h | 6 ++ kernel

[PATCH 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-10-28 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 24 arch/arm/mm/mmap.c | 7 +-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/arch

Re: [PATCH 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-10-29 Thread Daniel Cashman
On 10/28/2015 08:41 PM, Eric W. Biederman wrote: > Dan Cashman writes: > This all would be much cleaner if the arm architecture code were just to register the sysctl itself. As it sits this looks like a patchset that does not meaninfully bisect, and would result in code t

Re: [PATCH 0/2] Fix mmap_base entropy for >31 bits.

2016-02-24 Thread Daniel Cashman
On 02/04/2016 02:29 PM, Kees Cook wrote: > On Thu, Feb 4, 2016 at 2:06 PM, Daniel Cashman wrote: >> Upstream commit: d07e22597d1d355829b7b18ac19afa912cf758d1 added the >> ability to choose from a range of values to use for entropy count in >> generating the random offset to

Re: [PATCH v2 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-05 Thread Daniel Cashman
On 11/04/2015 10:30 AM, Daniel Cashman wrote: > On 11/3/15 3:21 PM, Kees Cook wrote: >> On Tue, Nov 3, 2015 at 3:14 PM, Daniel Cashman wrote: >>> On 11/03/2015 11:19 AM, Kees Cook wrote: >>>> Do you have patches for x86 and arm64? >>> >>> I was h

Re: [PATCH v3 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-11-23 Thread Daniel Cashman
On 11/23/2015 07:04 AM, Will Deacon wrote: > On Wed, Nov 18, 2015 at 03:20:07PM -0800, Daniel Cashman wrote: >> +config ARCH_MMAP_RND_BITS_MAX >> + default 20 if ARM64_64K_PAGES && ARCH_VA_BITS=39 >> + default 24 if ARCH_VA_BITS=39 >> +

Re: [PATCH v2 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-09 Thread Daniel Cashman
On 11/08/2015 07:47 PM, Michael Ellerman wrote: > On Fri, 2015-11-06 at 12:52 -0800, Kees Cook wrote: >> On Thu, Nov 5, 2015 at 10:44 AM, Daniel Cashman wrote: >>> On 11/04/2015 10:30 AM, Daniel Cashman wrote: >>>> On 11/3/15 3:21 PM, Kees Cook wrote: >>>&g

[PATCH v2 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-03 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Changes in v2: - Added HAVE_ARCH_MMAP_RND_BITS as Kconfig boolean selector. - Moved

[PATCH v2 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-03 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- Changes in v2: - Changed arch/arm/Kconfig and arch/arm/mm/mmap.c to reflect changes in [PATCH v2 1/2], specifically the movement of variables to

Re: [PATCH 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-03 Thread Daniel Cashman
On 11/01/2015 01:50 PM, Eric W. Biederman wrote: > Daniel Cashman writes: > >> On 10/28/2015 08:41 PM, Eric W. Biederman wrote: >>> Dan Cashman writes: >>> >>>>>> This all would be much cleaner if the arm architecture code were just to >>>

Re: [PATCH v2 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-03 Thread Daniel Cashman
On 11/03/2015 11:19 AM, Kees Cook wrote: > Do you have patches for x86 and arm64? I was holding off on those until I could gauge upstream reception. If desired, I could put those together and add them as [PATCH 3/4] and [PATCH 4/4]. Thank You, Dan -- To unsubscribe from this list: send the line

Re: [PATCH v2 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-04 Thread Daniel Cashman
On 11/3/15 3:18 PM, Kees Cook wrote: > On Tue, Nov 3, 2015 at 2:39 PM, Russell King - ARM Linux > wrote: >> On Tue, Nov 03, 2015 at 11:19:44AM -0800, Kees Cook wrote: >>> On Tue, Nov 3, 2015 at 10:10 AM, Daniel Cashman >>> wrote: >>>> From: dcashman

Re: [PATCH v2 2/2] arm: mm: support ARCH_MMAP_RND_BITS.

2015-11-04 Thread Daniel Cashman
On 11/3/15 3:21 PM, Kees Cook wrote: > On Tue, Nov 3, 2015 at 3:14 PM, Daniel Cashman wrote: >> On 11/03/2015 11:19 AM, Kees Cook wrote: >>> Do you have patches for x86 and arm64? >> >> I was holding off on those until I could gauge upstream reception. If >>

Re: [PATCH v2 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-04 Thread Daniel Cashman
On 11/3/15 5:31 PM, Andrew Morton wrote: > On Tue, 03 Nov 2015 18:40:31 -0600 ebied...@xmission.com (Eric W. Biederman) > wrote: > >> Andrew Morton writes: >> >>> On Tue, 3 Nov 2015 10:10:03 -0800 Daniel Cashman >>> wrote: >>> >>>

Re: [PATCH v2 1/2] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-11-04 Thread Daniel Cashman
On 11/4/15 11:21 AM, Eric W. Biederman wrote: > Michal Hocko writes: > >> On Tue 03-11-15 10:10:03, Daniel Cashman wrote: >> [...] >>> +This value can be changed after boot using the >>> +/proc/sys/kernel/mmap_rnd_bits tunable >> >> Why is this no

[PATCH v6 0/4] Allow customizable random offset to mmap_base address.

2015-12-11 Thread Daniel Cashman
Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the location of regions in

[PATCH v6 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-12-11 Thread Daniel Cashman
, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions(+), 6 deletions

[PATCH v6 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-12-11 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/vm.txt | 29 +++ arch/Kconfig| 68

[PATCH v6 2/4] arm: mm: support ARCH_MMAP_RND_BITS.

2015-12-11 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 9 + arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch

[PATCH v6 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-12-11 Thread Daniel Cashman
that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/arm64/Kconfig | 33 + arch/arm64/mm/mmap.c | 8 ++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a

[PATCH v7 0/4] Allow customizable random offset to mmap_base address.

2015-12-21 Thread Daniel Cashman
Address Space Layout Randomization (ASLR) provides a barrier to exploitation of user-space processes in the presence of security vulnerabilities by making it more difficult to find desired code/data which could help an attack. This is done by adding a random offset to the location of regions in

[PATCH v7 3/4] arm64: mm: support ARCH_MMAP_RND_BITS.

2015-12-21 Thread Daniel Cashman
that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/arm64/Kconfig | 29 + arch/arm64/mm/mmap.c | 8 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a

[PATCH v7 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-12-21 Thread Daniel Cashman
, which is sensibly bounded, so that platform developers may choose where to place this compromise. Keep default values as new minimums. Signed-off-by: Daniel Cashman --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions(+), 6 deletions

[PATCH v7 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-12-21 Thread Daniel Cashman
platforms. Allow the specification of a minimum number of bits so that platforms desiring greater ASLR protection may determine where to place the trade-off. Signed-off-by: Daniel Cashman --- Documentation/sysctl/vm.txt | 29 +++ arch/Kconfig| 68

[PATCH v7 2/4] arm: mm: support ARCH_MMAP_RND_BITS.

2015-12-21 Thread Daniel Cashman
, so that platform developers may choose where to place this compromise. Keep 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman --- arch/arm/Kconfig | 9 + arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch

[PATCH 2/2] use get_random_long().

2016-02-04 Thread Daniel Cashman
Replace calls to get_random_int() followed by a cast to (unsigned long) with calls to get_random_long(). Also address shifting bug which, in case of x86 removed entropy mask for mmap_rnd_bits values > 31 bits. Signed-off-by: Daniel Cashman --- arch/arm/mm/mmap.c | 2 +- a

[PATCH 0/2] Fix mmap_base entropy for >31 bits.

2016-02-04 Thread Daniel Cashman
-op and effectively disables mmap_base randomization. Finally, replace calls to get_random_int() with get_random_long() where appropriate. Daniel Cashman (2): drivers: char: random: Add get_random_long(). use get_random_long(). arch/arm/mm/mmap.c | 2 +- arch/arm64/mm/mmap.c

[PATCH 1/2] drivers: char: random: Add get_random_long().

2016-02-04 Thread Daniel Cashman
Signed-off-by: Daniel Cashman --- drivers/char/random.c | 22 ++ include/linux/random.h | 1 + 2 files changed, 23 insertions(+) diff --git a/drivers/char/random.c b/drivers/char/random.c index d0da5d8..b583e53 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c

[PATCH] Remove atomisp/i2c style errors.

2017-03-28 Thread Daniel Cashman
From: Dan Cashman Remove two ' , ' issues and change spaces to tabs found by poking around in drivers/staging/. Warnings left untouched. Test: Run checkpatch script in drivers/staging/media/atomisp/i2c before and after change. Errors go from 3 to 0. Signed-off-by: Dan Cashman --- drivers/sta

[PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-03-29 Thread Daniel Cashman
From: Dan Cashman Signed-off-by: Dan Cashman --- drivers/staging/media/atomisp/i2c/ap1302.c | 4 ++-- drivers/staging/media/atomisp/i2c/gc0310.c | 2 +- drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomis

Re: [PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-04-01 Thread Daniel Cashman
My apologies; I did not review the TODO. Consider this withdrawn. Dan On 03/29/2017 10:30 AM, Alan Cox wrote: > On Wed, 2017-03-29 at 09:57 -0700, Daniel Cashman wrote: >> From: Dan Cashman >> >> Signed-off-by: Dan Cashman > > > As the TODO asks - please no

[PATCH] staging: vt6656: Fix spaces, char limit and embedded func name in print.

2017-04-01 Thread Daniel Cashman
From: Dan Cashman Address errors and warning found in rf.c by checkpatch kernel style script. Specifically, change spaces to tabs, split function arguments across a new line to avoid 80 character limit, and remove use of embedded function name in a dev_dbg() call. Signed-off-by: Daniel Cashman

[Patch v2 1/3] staging: vt6656: convert spaces to tabs for rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman Address checkpatch errors encountered in rf.c by removing use of spaces and replacing with properly aligned tabs. Signed-off-by: Daniel Cashman --- drivers/staging/vt6656/rf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[Patch v2 0/3] staging: vt6656: Fix checkpatch style violations.

2017-04-02 Thread Daniel Cashman
ion name in a debug statement and an exceeded 80-char line, respectively. Signed-off-by: Daniel Cashman Dan Cashman (3): staging: vt6656: convert spaces to tabs for rf.c staging: vt6656: Replace embedded function name with __func__ in rf.c staging: vt6656: Split arguments to avoid 80-c

[Patch v2 3/3] staging: vt6656: Split arguments to avoid 80-char violation in rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman Wrap arguments of call to vnt_control_out() to avoid exceeding 80 character limit, but maintain alignment. Signed-off-by: Daniel Cashman --- drivers/staging/vt6656/rf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/rf.c b

[Patch v2 2/3] staging: vt6656: Replace embedded function name with __func__ in rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman Change embedded function name in vnt_rf_set_txpower with %s format with __func__ argument to make it consistent with other part of if-else and kernel coding style standards as reported by checkpatch. Signed-off-by: Daniel Cashman --- drivers/staging/vt6656/rf.c | 2 +- 1