[PATCH v3 2/8] arm: use asm-generic for seccomp.h

2015-03-04 Thread Kees Cook
Switch to using the newly created asm-generic/seccomp.h for the seccomp strict mode syscall definitions. Definitions were identical. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/include/asm/Kbuild| 1 + arch/arm/include/asm/seccomp.h | 11 --- 2 files changed, 1

[PATCH v3 7/8] sparc: switch to using asm-generic for seccomp.h

2015-03-04 Thread Kees Cook
Switch to using the newly created asm-generic/seccomp.h for the seccomp strict mode syscall definitions. The obsolete sigreturn in COMPAT mode is retained as an override. Remaining definitions are identical. Also corrected missing #define for header reinclusion protection. Signed-off-by: Kees

[PATCH v3 4/8] mips: switch to using asm-generic for seccomp.h

2015-03-04 Thread Kees Cook
Switch to using the newly created asm-generic/seccomp.h for the seccomp strict mode syscall definitions. COMPAT definitions retain their overrides and the remaining definitions were identical. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/mips/include/asm/seccomp.h | 7 ++- 1 file

Re: [PATCH v2 0/5] split ET_DYN ASLR from mmap ASLR

2015-03-03 Thread Kees Cook
On Mon, Mar 2, 2015 at 11:31 PM, Ingo Molnar mi...@kernel.org wrote: * Kees Cook keesc...@chromium.org wrote: To address the offset2lib ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips

Re: [PATCH v2] seccomp: switch to using asm-generic for seccomp.h

2015-03-03 Thread Kees Cook
On Tue, Mar 3, 2015 at 12:30 AM, Ingo Molnar mi...@kernel.org wrote: * Kees Cook keesc...@chromium.org wrote: Most architectures don't need to do anything special for the strict seccomp syscall entries. Remove the redundant headers and reduce the others. 19 files changed, 27 insertions

[PATCH v3 05/10] powerpc: standardize mmap_rnd() usage

2015-03-03 Thread Kees Cook
In preparation for splitting out ET_DYN ASLR, this refactors the use of mmap_rnd() to be used similarly to arm and x86. Signed-off-by: Kees Cook keesc...@chromium.org --- Can mmap ASLR be safely enabled in the legacy mmap case here? Other archs use mm-mmap_base = TASK_UNMAPPED_BASE

[PATCH v3 04/10] mips: extract logic for mmap_rnd()

2015-03-03 Thread Kees Cook
In preparation for splitting out ET_DYN ASLR, extract the mmap ASLR selection into a separate function. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/mips/mm/mmap.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/mips/mm/mmap.c b/arch

[PATCH v3 06/10] s390: standardize mmap_rnd() usage

2015-03-03 Thread Kees Cook
In preparation for splitting out ET_DYN ASLR, this refactors the use of mmap_rnd() to be used similarly to arm and x86, and extracts the checking of PF_RANDOMIZE. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/s390/mm/mmap.c | 34 +++--- 1 file changed, 23

[PATCH v3 09/10] mm: split ET_DYN ASLR from mmap ASLR

2015-03-03 Thread Kees Cook
for handling ET_DYN ASLR in a separate region from mmap ASLR, as was already done on s390. Removes CONFIG_BINFMT_ELF_RANDOMIZE_PIE, which is no longer needed. Reported-by: Hector Marco-Gisbert hecma...@upv.es Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/Kconfig| 1 - arch/arm64

[PATCH v3 01/10] arm: factor out mmap ASLR into mmap_rnd

2015-03-03 Thread Kees Cook
In preparation for splitting out ET_DYN ASLR, this moves the ASLR calculations for mmap on ARM into a separate routine, similar to x86. This also removes the redundant check of personality (PF_RANDOMIZE is already set before calling arch_pick_mmap_layout). Signed-off-by: Kees Cook keesc

[PATCH v3 02/10] x86: standardize mmap_rnd() usage

2015-03-03 Thread Kees Cook
In preparation for splitting out ET_DYN ASLR, this refactors the use of mmap_rnd() to be used similarly to arm, and extracts the checking of PF_RANDOMIZE. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/x86/mm/mmap.c | 36 1 file changed, 20

[PATCH v3 07/10] mm: expose arch_mmap_rnd when available

2015-03-03 Thread Kees Cook
(). Additionally introduces CONFIG_ARCH_HAS_ELF_RANDOMIZE for describing this feature on architectures that support it (which is a superset of ARCH_BINFMT_ELF_RANDOMIZE_PIE, since s390 already supports a separated ET_DYN ASLR from mmap ASLR without the ARCH_BINFMT_ELF_RANDOMIZE_PIE logic). Signed-off-by: Kees

[PATCH v3 08/10] s390: redefine randomize_et_dyn for ELF_ET_DYN_BASE

2015-03-03 Thread Kees Cook
In preparation for moving ET_DYN randomization into the ELF loader (which requires a static ELF_ET_DYN_BASE), this redefines s390's existing ET_DYN randomization in a call to arch_mmap_rnd(). This refactoring results in the same ET_DYN randomization on s390. Signed-off-by: Kees Cook keesc

[PATCH v3 0/10] split ET_DYN ASLR from mmap ASLR

2015-03-03 Thread Kees Cook
To address the offset2lib ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new

[PATCH v3 03/10] arm64: standardize mmap_rnd() usage

2015-03-03 Thread Kees Cook
declaration of an unused function. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm64/include/asm/elf.h | 1 - arch/arm64/mm/mmap.c | 18 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index

[PATCH v3 10/10] mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE

2015-03-03 Thread Kees Cook
-off-by: Kees Cook keesc...@chromium.org --- arch/Kconfig | 1 + arch/arm/include/asm/elf.h | 4 arch/arm64/include/asm/elf.h | 4 arch/mips/include/asm/elf.h| 4 arch/powerpc/include/asm/elf.h | 4 arch/s390/include/asm/elf.h| 3 --- arch/x86

[PATCH v2] seccomp: switch to using asm-generic for seccomp.h

2015-03-02 Thread Kees Cook
Most architectures don't need to do anything special for the strict seccomp syscall entries. Remove the redundant headers and reduce the others. Signed-off-by: Kees Cook keesc...@chromium.org --- v2: - use Kbuild generic-y instead of explicit #include lines (sfr) --- arch/arm/include/asm/Kbuild

Re: [PATCH 0/5] split ET_DYN ASLR from mmap ASLR

2015-03-02 Thread Kees Cook
On Mon, Mar 2, 2015 at 1:26 PM, Andrew Morton a...@linux-foundation.org wrote: On Thu, 26 Feb 2015 19:07:09 -0800 Kees Cook keesc...@chromium.org wrote: This separates ET_DYN ASLR from mmap ASLR, as already done on s390. The various architectures that are already randomizing mmap (arm, arm64

[PATCH 4/5] mm: split ET_DYN ASLR from mmap ASLR

2015-03-02 Thread Kees Cook
for handling ET_DYN ASLR in a separate region from mmap ASLR, as already done on s390. Removes CONFIG_BINFMT_ELF_RANDOMIZE_PIE, which is no longer needed. Reported-by: Hector Marco-Gisbert hecma...@upv.es Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/Kconfig| 1 - arch/arm64

[PATCH 3/5] mm: move randomize_et_dyn into ELF_ET_DYN_BASE

2015-03-02 Thread Kees Cook
in the same ET_DYN randomization on s390. Additionally removes a copy/pasted unused arm64 extern. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm64/include/asm/elf.h | 1 - arch/s390/include/asm/elf.h | 9 + arch/s390/mm/mmap.c | 11 --- 3 files changed, 5

[PATCH 1/5] arm: factor out mmap ASLR into mmap_rnd

2015-03-02 Thread Kees Cook
In preparation for exporting per-arch mmap randomization functions, this moves the ASLR calculations for mmap on ARM into a separate routine. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/mm/mmap.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git

[PATCH v2 0/5] split ET_DYN ASLR from mmap ASLR

2015-03-02 Thread Kees Cook
To address the offset2lib ASLR weakness[1], this separates ET_DYN ASLR from mmap ASLR, as already done on s390. The architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new

[PATCH 2/5] mm: expose arch_mmap_rnd when available

2015-03-02 Thread Kees Cook
(). Additionally introduces CONFIG_ARCH_HAS_ELF_RANDOMIZE for describing this feature on architectures that support it (which is a superset of ARCH_BINFMT_ELF_RANDOMIZE_PIE, since s390 already does this witout the ARCH_BINFMT_ELF_RANDOMIZE_PIE logic). Signed-off-by: Kees Cook keesc...@chromium.org --- arch

[PATCH 5/5] mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE

2015-03-02 Thread Kees Cook
-off-by: Kees Cook keesc...@chromium.org --- arch/Kconfig | 1 + arch/arm/include/asm/elf.h | 4 arch/arm64/include/asm/elf.h | 4 arch/mips/include/asm/elf.h| 4 arch/powerpc/include/asm/elf.h | 4 arch/s390/include/asm/elf.h| 3 --- arch/x86

Re: [PATCH] seccomp: switch to using asm-generic for seccomp.h

2015-02-27 Thread Kees Cook
On Fri, Feb 27, 2015 at 5:36 PM, Stephen Rothwell s...@canb.auug.org.au wrote: Hi Kees, On Fri, 27 Feb 2015 16:52:29 -0800 Kees Cook keesc...@chromium.org wrote: diff --git a/arch/arm/include/asm/seccomp.h b/arch/arm/include/asm/seccomp.h index 52b156b341f5..66ca6a30bf5c 100644 --- a/arch

[PATCH] seccomp: switch to using asm-generic for seccomp.h

2015-02-27 Thread Kees Cook
Most architectures don't need to do anything special for the strict seccomp syscall entries. Remove the redundant headers and reduce the others. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/include/asm/seccomp.h | 12 +--- arch/microblaze/include/asm/seccomp.h

Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS

2015-02-26 Thread Kees Cook
On Thu, Feb 26, 2015 at 4:11 PM, Kees Cook keesc...@chromium.org wrote: On Thu, Feb 26, 2015 at 4:06 PM, Andrew Morton a...@linux-foundation.org wrote: On Thu, 26 Feb 2015 15:37:37 -0800 Kees Cook keesc...@chromium.org wrote: Agh, no, please let's avoid the CONFIG addition

Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS

2015-02-26 Thread Kees Cook
Marinas catalin.mari...@arm.com Cc: Hector Marco Gisbert hecma...@upv.es Cc: Hector Marco-Gisbert hecma...@upv.es Cc: Ingo Molnar mi...@kernel.org Cc: Ismael Ripoll irip...@upv.es Cc: Kees Cook keesc...@chromium.org Cc: Ralf Baechle r...@linux-mips.org Cc: Russell King r...@arm.linux.org.uk Cc

[PATCH 3/5] mm: move randomize_et_dyn into ELF_ET_DYN_BASE

2015-02-26 Thread Kees Cook
This moves s390's randomize_et_dyn base into ELF_ET_DYN_BASE, and removes an unused arm64 extern. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm64/include/asm/elf.h | 1 - arch/s390/include/asm/elf.h | 9 + arch/s390/mm/mmap.c | 11 --- 3 files changed, 5

[PATCH 0/5] split ET_DYN ASLR from mmap ASLR

2015-02-26 Thread Kees Cook
This separates ET_DYN ASLR from mmap ASLR, as already done on s390. The various architectures that are already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have their various forms of arch_mmap_rnd() made available via the new CONFIG_ARCH_HAS_ELF_RANDOMIZE. For these architectures,

[PATCH 2/5] mm: expose arch_mmap_rnd when available

2015-02-26 Thread Kees Cook
When an architecture fully supports randomizing the ELF load location, the arch_mmap_rnd() function becomes available. Rename and expose these functions where they exist. Introduces CONFIG_ARCH_HAS_ELF_RANDOMIZE. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/Kconfig

[PATCH 1/5] arm: factor out mmap ASLR into mmap_rnd

2015-02-26 Thread Kees Cook
Move logic for mmap ASLR into separate function. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/mm/mmap.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index 5e85ed371364..0f8bc158f2c6 100644 --- a/arch/arm

[PATCH 5/5] mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE

2015-02-26 Thread Kees Cook
On architectures that define CONFIG_ARCH_HAS_ELF_RANDOMIZE, collapse the function declarations while continuing to handle CONFIG_COMPAT_BRK. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/Kconfig | 1 + arch/arm/include/asm/elf.h | 4 arch/arm64/include/asm

[PATCH 4/5] mm: split ET_DYN ASLR from mmap ASLR

2015-02-26 Thread Kees Cook
This moves arch_mmap_rnd() into the ELF loader for handling ET_DYN ASLR in a separate region from mmap ASLR, as already done on s390. Removes CONFIG_BINFMT_ELF_RANDOMIZE_PIE. Reported-by: Hector Marco-Gisbert hecma...@upv.es Signed-off-by: Kees Cook keesc...@chromium.org --- arch/arm/Kconfig

Re: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS

2015-02-23 Thread Kees Cook
/aslrv2.html Signed-off-by: Hector Marco-Gisbert hecma...@upv.es Signed-off-by: Ismael Ripoll irip...@upv.es Acked-by: Kees Cook keesc...@chromium.org diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 97d07ed..ee7ea7e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1,7

Re: [PATCH v5 0/4] powerpc/pstore: Add pstore support for nvram partitions

2015-02-05 Thread Kees Cook
skimmed this, and it looks good to me. Reviewed-by: Kees Cook keesc...@chromium.org -Kees arch/powerpc/include/asm/nvram.h| 50 ++ arch/powerpc/include/asm/rtas.h |5 arch/powerpc/kernel/nvram_64.c | 677 +++ arch/powerpc

Re: [RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature

2014-11-04 Thread Kees Cook
default y -- 1.7.10.4 -- Kees Cook Chrome OS Security ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature

2014-11-04 Thread Kees Cook
On Tue, Nov 4, 2014 at 11:59 AM, Leif Lindholm leif.lindh...@linaro.org wrote: On Tue, Nov 04, 2014 at 10:43:00AM -0800, Kees Cook wrote: diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index efefd12..39f7817 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -6,6

[PATCH] powerpc/xmon: avoid format string leaking to printk

2014-06-10 Thread Kees Cook
This makes sure format strings cannot leak into printk (the string has already been correctly processed for format arguments). Signed-off-by: Kees Cook keesc...@chromium.org --- arch/powerpc/xmon/nonstdio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/xmon

Re: [RFC PATCH v2 11/11] pstore/ram: Read and write to the 'compressed' flag of pstore

2013-08-17 Thread Kees Cook
-off-by: Aruna Balakrishnaiah ar...@linux.vnet.ibm.com Nice work! Acked-by: Kees Cook keesc...@chromium.org -- Kees Cook Chrome OS Security ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC PATCH v2 00/11] Add (de)compression support to pstore

2013-08-17 Thread Kees Cook
issues from v1 Yeah, this is great. While I haven't tested it myself yet, the code seems to be in good shape. I acked the ram piece separately, but consider the entire series: Reviewed-by: Kees Cook keesc...@chromium.org Thanks! -Kees -- Kees Cook Chrome OS Security

Re: [PATCH v2 0/3] Nvram-to-pstore: compression support for oops data

2013-06-27 Thread Kees Cook
, but that doesn't need to be part of this series. :) Acked-by: Kees Cook keesc...@chromium.org Thanks, -Kees -- Kees Cook Chrome OS Security ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 3/3] powerpc/pseries: Support compression of oops text via pstore

2013-06-25 Thread Kees Cook
On Tue, Jun 25, 2013 at 12:04 AM, Aruna Balakrishnaiah ar...@linux.vnet.ibm.com wrote: Hi Kees, On Monday 24 June 2013 11:27 PM, Kees Cook wrote: On Sun, Jun 23, 2013 at 11:23 PM, Aruna Balakrishnaiah ar...@linux.vnet.ibm.com wrote: The patch set supports compression of oops messages

Re: [PATCH 3/3] powerpc/pseries: Support compression of oops text via pstore

2013-06-24 Thread Kees Cook
); if (rc != 0) { pr_err(nvram: kmsg_dump_register() failed; returned %d\n, rc); -- Kees Cook Chrome OS Security ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 7/8] powerpc/pseries: Read of-config partition via pstore

2013-04-24 Thread Kees Cook
@@ enum pstore_type_id { PSTORE_TYPE_FTRACE = 3, /* PPC64 partition types */ PSTORE_TYPE_PPC_RTAS= 4, + PSTORE_TYPE_PPC_OF = 5, PSTORE_TYPE_UNKNOWN = 255 }; Should this be named just PSTORE_TYPE_OF instead of ...PPC_OF? -Kees -- Kees

Re: [PATCH v2 0/8] powerpc/pseries: Nvram-to-pstore

2013-04-24 Thread Kees Cook
3 files changed, 313 insertions(+), 53 deletions(-) This series looks good! Other than the naming conventions (are these new pstore types really PPC-only?) I think it's a fine addition. Thanks! -Kees -- Kees Cook Chrome OS Security ___ Linuxppc-dev

Re: [PATCH 3/5] v2 seccomp_filters: Enable ftrace-based system call filtering

2011-05-12 Thread Kees Cook
has a lot more to do with trace event filters than the minimal old seccomp code ... Would this require privileges to get the event fd to start with? If so, I would prefer to avoid that, since using prctl() as shown in the patch set won't require any privs. -Kees -- Kees Cook Ubuntu Security

<    3   4   5   6   7   8