[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 <dan.a.cash...@gmail.com> Wrap arguments of call to vnt_control_out() to avoid exceeding 80 character limit, but maintain alignment. Signed-off-by: Daniel Cashman <dan.a.cash...@gmail.com> --- drivers/staging/vt6656/rf.c | 3 ++- 1 file changed, 2 insertions(+)

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

2017-04-02 Thread Daniel Cashman
From: Dan Cashman <dan.a.cash...@gmail.com> 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 <d

[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

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

2017-04-02 Thread Daniel Cashman
gs, which are an embedded function name in a debug statement and an exceeded 80-char line, respectively. Signed-off-by: Daniel Cashman <dan.a.cash...@gmail.com> Dan Cashman (3): staging: vt6656: convert spaces to tabs for rf.c staging: vt6656: Replace embedded function name with _

[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 1/3] staging: vt6656: convert spaces to tabs for rf.c

2017-04-02 Thread Daniel Cashman
From: Dan Cashman <dan.a.cash...@gmail.com> Address checkpatch errors encountered in rf.c by removing use of spaces and replacing with properly aligned tabs. Signed-off-by: Daniel Cashman <dan.a.cash...@gmail.com> --- drivers/staging/vt6656/rf.c | 10 +- 1 file changed,

[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] staging: vt6656: Fix spaces, char limit and embedded func name in print.

2017-04-01 Thread Daniel Cashman
) call. Signed-off-by: Daniel Cashman <dan.a.cash...@gmail.com> --- drivers/staging/vt6656/rf.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 068c1c8..23581af 100644 --- a/drivers/staging/vt665

[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

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 <dan.a.cash...@gmail.com> >> >> Signed-off-by: Dan Cashman <dan.a.cash...@

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 - ple

[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

[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

[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

[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 ---

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 <dcash...@android.com> wrote: >> Upstream commit: d07e22597d1d355829b7b18ac19afa912cf758d1 added the >> ability to choose from a range of values to use for entropy count in >> g

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

[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 0/2] Fix mmap_base entropy for >31 bits.

2016-02-04 Thread Daniel Cashman
as a no-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 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
as a no-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 <dcash...@android.com> --- 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

[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 <dcash...@android.com> --- arch/arm/

[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 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 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 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

[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 1/4] mm: mmap: Add new /proc tunable for mmap_base ASLR.

2015-12-21 Thread Daniel Cashman
is may not be an issue on all 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 <dcash...@android.com> --- Documentation/sysctl/vm.txt | 29 +

[PATCH v7 2/4] arm: 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 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman <dcash...@android.com> --- arch/arm/Kconfig | 9 + arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+),

[PATCH v7 3/4] arm64: 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 <dcash...@android.com> --- arch/arm64/Kconfig | 29 + arch/arm64/mm/mmap.c | 8 ++-- 2 files

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

2015-12-21 Thread Daniel Cashman
eplace it with a Kconfig option, 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 <dcash...@android.com> --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 +++

[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

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 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

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

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 @@

[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

[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 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 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 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 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
eplace it with a Kconfig option, 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 <dcash...@android.com> --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 +++

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

2015-12-11 Thread Daniel Cashman
is may not be an issue on all 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 <dcash...@android.com> --- Documentation/sysctl/vm.txt | 29 +

[PATCH v6 3/4] arm64: 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 <dcash...@android.com> --- arch/arm64/Kconfig | 33 + arch/arm64/mm/mmap.c | 8 ++-- 2 files

[PATCH v6 2/4] arm: 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 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman <dcash...@android.com> --- arch/arm/Kconfig | 9 + arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+),

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

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

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

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

[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

[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 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

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
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 <dcash...@android.com> --- arch/arm64/Kconfig | 31 +++ arch/arm64/mm/mmap.c | 8 ++-- 2 files

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

2015-12-01 Thread Daniel Cashman
is may not be an issue on all 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 <dcash...@android.com> --- Documentation/sysctl/vm.txt | 29 +

[PATCH v5 2/4] arm: 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 8 as the minimum acceptable value. Signed-off-by: Daniel Cashman <dcash...@android.com> --- arch/arm/Kconfig | 9 + arch/arm/mm/mmap.c | 3 +-- 2 files changed, 10 insertions(+),

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

2015-12-01 Thread Daniel Cashman
eplace it with a Kconfig option, 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 <dcash...@android.com> --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 +++

[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 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 <dcash...@android.com> 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.

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

2015-11-30 Thread Daniel Cashman
e 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. Declare the pointed-to values to > be const so we can act

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

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

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

2015-11-30 Thread Daniel Cashman
IG options that calculate the valid min/maxes. Only >> mmap_rnd_bits itself should be changing. > > hmpf. > > From: Andrew Morton <a...@linux-foundation.org> > Subject: include/linux/sysctl.h: make ctl_table.extra1/2 const > > Nothing should be altering these values. De

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 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

[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 4/4] x86: mm: support ARCH_MMAP_RND_BITS.

2015-11-26 Thread Daniel Cashman
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(-) diff --git

[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 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 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 <dcash...@android.com> --- Documentation/sysctl/vm.txt | 29 +++ arch/Kconfig

[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 <dcash...@android.com> --- arch/arm64/Kconfig | 31 +++ arch/arm64/mm/mmap.c | 8 ++-- 2 files changed, 37 insertions(+), 2 deletions(-)

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

2015-11-26 Thread Daniel Cashman
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 <dcash...@android.com> --- arch/x86/Kconfig | 16 arch/x86/mm/mmap.c | 12 ++-- 2 files changed, 22 insertions

[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 <dcash...@android.com> --- arch/arm/Kconfig | 10 ++ arch/arm/mm/mmap.c | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/K

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 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

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_BI

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/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_BI

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 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

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 > <a...@linux-foundation.org> wrote: >> On Wed, 18 Nov 2015 15:20:05 -0800 Daniel Cashman <dcash...@android.com> >> wrote: >> >>> --- a/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_BI

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

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 <dcash...@google.com> >> >> ASLR currently only uses 8 bits to generate the random offset for the >> mmap base address on 32 bit

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_BI

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 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 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 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 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

[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

[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 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 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

  1   2   >