Re: [PATCH 1/3] powerpc/pseries: Simplify check for suspendability during suspend/migration

2015-03-04 Thread Nathan Fontenot
On 03/03/2015 02:16 PM, Tyrel Datwyler wrote: On 03/02/2015 10:15 PM, Michael Ellerman wrote: On Mon, 2015-03-02 at 13:30 -0800, Tyrel Datwyler wrote: On 03/01/2015 08:19 PM, Cyril Bur wrote: On Fri, 2015-02-27 at 18:24 -0800, Tyrel Datwyler wrote: During suspend/migration operation we must

Re: [PATCH V3] powerpc/85xx: workaround for chips with MSI hardware errata

2015-03-04 Thread Scott Wood
On Wed, 2015-03-04 at 00:44 -0600, Jia Hongtao-B38951 wrote: Hi Scott, I sent V3 of this patch a few days ago. Comments are welcome. Patience is welcome. :-) -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

[Patch v2] powerpc/pseries: Little endian fixes for post mobility device tree update

2015-03-04 Thread Tyrel Datwyler
We currently use the device tree update code in the kernel after resuming from a suspend operation to re-sync the kernels view of the device tree with that of the hypervisor. The code as it stands is not endian safe as it relies on parsing buffers returned by RTAS calls that thusly contains data

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

2015-03-04 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 v4 02/10] x86: standardize mmap_rnd() usage

2015-03-04 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 v4 10/10] mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE

2015-03-04 Thread Kees Cook
The arch_randomize_brk() function is used on several architectures, even those that don't support ET_DYN ASLR. To avoid bulky extern/#define tricks, consolidate the support under CONFIG_ARCH_HAS_ELF_RANDOMIZE for the architectures that support it, while still handling CONFIG_COMPAT_BRK.

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

2015-03-04 Thread Kees Cook
When an architecture fully supports randomizing the ELF load location, a per-arch mmap_rnd() function is used to find a randomized mmap base. In preparation for randomizing the location of ET_DYN binaries separately from mmap, this renames and exports these functions as arch_mmap_rnd().

[PATCH v2] powerpc/pseries: Simplify check for suspendability during suspend/migration

2015-03-04 Thread Tyrel Datwyler
During suspend/migration operation we must wait for the VASI state reported by the hypervisor to become Suspending prior to making the ibm,suspend-me RTAS call. Calling routines to rtas_ibm_supend_me() pass a vasi_state variable that exposes the VASI state to the caller. This is unnecessary as the

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

2015-03-04 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. This additionally enables mmap ASLR on legacy mmap layouts, which appeared to be missing on arm64, and was already supported on arm. Additionally removes a copy/pasted

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

2015-03-04 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 --- It seems the entropy gets smaller as the PAGE_SIZE increases. Is this intentional? --- arch/mips/mm/mmap.c | 24 1

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

2015-03-04 Thread Kees Cook
On Tue, Mar 3, 2015 at 8:16 PM, Michael Ellerman m...@ellerman.id.au wrote: On Mon, 2015-03-02 at 16:19 -0800, Kees Cook wrote: This fixes the offset2lib weakness in ASLR for arm, arm64, mips, powerpc, and x86. The problem is that if there is a leak of ASLR from the executable (ET_DYN), it

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

2015-03-04 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 Acked-by: Michael Ellerman m...@ellerman.id.au --- Can mmap ASLR be safely enabled in the legacy mmap case here? Other archs use

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

2015-03-04 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

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

2015-03-04 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

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

2015-03-04 Thread Ingo Molnar
* 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, powerpc, s390, and x86), have their various forms of arch_mmap_rnd()

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

2015-03-04 Thread Kees Cook
On Wed, Mar 4, 2015 at 1:54 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,

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

2015-03-04 Thread Kees Cook
This fixes the offset2lib weakness in ASLR for arm, arm64, mips, powerpc, and x86. The problem is that if there is a leak of ASLR from the executable (ET_DYN), it means a leak of shared library offset as well (mmap), and vice versa. Further details and a PoC of this attack is available here:

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

2015-03-04 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

[PATCH v3 8/8] x86: 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 syscall override is retained in 32-bit mode, and the ia32 syscall overrides are used in the compat case. Remaining definitions were identical. Signed-off-by: Kees Cook

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

2015-03-04 Thread Kees Cook
Most architectures don't need to do much special for the strict-mode seccomp syscall entries. Remove the redundant headers and reduce the others. Signed-off-by: Kees Cook keesc...@chromium.org --- v3: - split patch series by architecture - fix up architectures that need sigreturn overrides (ingo)

[PATCH v3 6/8] powerpc: 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, though they incorrectly appeared in uapi, which has been corrected. Signed-off-by: Kees

[PATCH v3 1/8] seccomp: allow COMPAT sigreturn overrides

2015-03-04 Thread Kees Cook
Some architectures may need to override the compat sigreturn definition, as is already possible in the non-compat case. Signed-off-by: Kees Cook keesc...@chromium.org --- include/asm-generic/seccomp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/asm-generic/seccomp.h

[PATCH v3 3/8] microblaze: 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. Since microblaze is 32-bit, the COMPAT seccomp defines are unused and can be dropped. The obsolete sigreturn for seccomp strict mode is retained as an override. Remaining definitions are

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

2015-03-04 Thread Michael Ellerman
On Wed, 2015-03-04 at 13:13 -0800, Kees Cook wrote: I had a question in the powerpc-specific change that may have gone unnoticed: Can mmap ASLR be safely enabled in the legacy mmap case here? Other archs use mm-mmap_base = TASK_UNMAPPED_BASE + random_factor. Separate from this series, do

[PATCH v3 5/8] parisc: 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. Definitions were identical. Signed-off-by: Kees Cook keesc...@chromium.org --- arch/parisc/include/asm/Kbuild| 1 + arch/parisc/include/asm/seccomp.h | 16 2 files

Re: Problems with Kernels 3.17-rc1 and onwards on Acube Sam460 AMCC 460ex board

2015-03-04 Thread Michael Ellerman
On Wed, 2015-03-04 at 07:46 -0400, Julian Margetson wrote: Still stuck. Problem still exist with 4.0.0-rc2 and I cant finish the bisect. Triggered when using HDMI. No problem when using DVI. [ 33.535692] Unable to handle kernel paging request for data at address 0x0008 [ 33.566786]

[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

Re: [PATCH] clk: ppc-corenet: Add support for the FMD clock

2015-03-04 Thread Scott Wood
On Fri, 2015-02-27 at 10:02 -0600, Kumar Gala wrote: On Jan 20, 2015, at 6:03 AM, Igal.Liberman igal.liber...@freescale.com wrote: + guts_regs = of_iomap(guts, 0); + of_node_put(guts); + if (!guts_regs) { + pr_err(ioremap of GUTS node failed\n); + return

[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] powerpc/pseries: Introduce api_version to migration sysfs interface

2015-03-04 Thread Tyrel Datwyler
The /sys/kernel/mobility/migration interface was added all the way back in 2.6.37. However, the drmgr userspace tool was never augmented to use this interface to perfrom migrations. Instead it has continued using a faux rtas call coupled with performing the device tree update processing in

[PATCH 7/7] soc/fman: Add the FMan SP FLIB

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com Signed-off-by: Igal Liberman igal.liber...@freescale.com --- drivers/soc/fsl/fman/Makefile | 1 + drivers/soc/fsl/fman/sp/Makefile | 13 +++ drivers/soc/fsl/fman/sp/fman_sp.c | 204 ++ 3 files changed,

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

2015-03-04 Thread Ingo Molnar
* Kees Cook keesc...@chromium.org wrote: Switch to using the newly created asm-generic/seccomp.h for the seccomp strict mode syscall definitions. The obsolete sigreturn syscall override is retained in 32-bit mode, and the ia32 syscall overrides are used in the compat case. Remaining

[PATCH] ASoC: fsl_ssi: Don't try to round-up for PM divisor calculation

2015-03-04 Thread Nicolin Chen
According to i.MX6 Series Reference Manual, the formula to calculate the sys clock is sysclk rate = bclk rate * (div2 + 1) * (7 * psr + 1) * (pm + 1) * 2 Commit aafa85e71a75 (ASoC: fsl_ssi: Add DAI master mode support for SSI on i.MX series) added the divisor calculation which relies on the

[PATCH 2/7] soc/fman: Add the FMan FLIB

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com Signed-off-by: Igal Liberman igal.liber...@freescale.com --- drivers/soc/Kconfig |1 + drivers/soc/Makefile |1 + drivers/soc/fsl/Kconfig |1 + drivers/soc/fsl/Makefile |1 +

[PATCH 3/7] soc/fman: Add the FMan port FLIB

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com Signed-off-by: Igal Liberman igal.liber...@freescale.com --- drivers/soc/fsl/fman/Kconfig | 10 + drivers/soc/fsl/fman/Makefile |2 + drivers/soc/fsl/fman/port/Makefile| 13 + drivers/soc/fsl/fman/port/fman_port.c |

[PATCH 5/7] soc/fman: Add the FMan parser and KeyGen FLIB(s)

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com Signed-off-by: Igal Liberman igal.liber...@freescale.com --- drivers/soc/fsl/fman/Kconfig| 6 + drivers/soc/fsl/fman/Makefile | 1 + drivers/soc/fsl/fman/pcd/Makefile | 13 + drivers/soc/fsl/fman/pcd/fman_kg.c | 850

[PATCH 6/7] soc/fman: Add the FMan RTC FLIB

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com Signed-off-by: Igal Liberman igal.liber...@freescale.com --- drivers/soc/fsl/fman/Kconfig| 6 + drivers/soc/fsl/fman/Makefile | 1 + drivers/soc/fsl/fman/rtc/Makefile | 13 ++ drivers/soc/fsl/fman/rtc/fman_rtc.c | 354

[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

[PATCH 4/7] soc/fman: Add the FMan MAC FLIB

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com Signed-off-by: Igal Liberman igal.liber...@freescale.com --- drivers/soc/fsl/fman/Kconfig | 6 + drivers/soc/fsl/fman/Makefile | 7 +- drivers/soc/fsl/fman/mac/Makefile | 15 +

[PATCH 0/7] Freescale DPAA FMan FLIB(s)

2015-03-04 Thread Emil Medve
From: Igal Liberman igal.liber...@freescale.com The Freescale Data Path Acceleration Architecture (DPAA) is a set of hardware components on specific QorIQ P and T series multicore processors. This architecture provides the infrastructure to support simplified sharing of networking interfaces and

Re: [PATCH] spi: fsl-spi: use of_iomap() to map parameter ram on CPM1

2015-03-04 Thread leroy christophe
Le 03/03/2015 19:44, Mark Brown a écrit : On Thu, Feb 26, 2015 at 05:11:42PM +0100, Christophe Leroy wrote: On CPM2, the SPI parameter RAM is dynamically allocated in the dualport RAM whereas in CPM1, it is statically allocated to a default address with capability to relocate it somewhere else

Re: [PATCH v5 2/4] pstore: Add pstore type id for PPC64 opal nvram partition

2015-03-04 Thread Hari Bathini
On 02/06/2015 01:06 AM, Hari Bathini wrote: This patch adds a new PPC64 partition type to be used for opal specific nvram partition. A new partition type is needed as none of the existing type matches this partition type. Signed-off-by: Hari Bathini hbath...@linux.vnet.ibm.com This patch

[PATCH 2/4] perf: Split perf_event_read() and perf_event_count()

2015-03-04 Thread Sukadev Bhattiprolu
perf_event_read() does two things: - call the PMU to read/update the counter value - and compute the total count of the event and its children perf_event_reset() needs the first piece but doesn't need the second. Similarly, when we implement the ability to read a group of events

[PATCH 1/4] perf: Add 'flags' parameter to pmu txn interfaces

2015-03-04 Thread Sukadev Bhattiprolu
In addition to using the transaction interface to schedule events on a PMU, we will use it to also read a group of counters at once. Accordingly, add a flags parameter to the transaction interfaces. The flags indicate wheether the transaction is to add events to the PMU (PERF_PMU_TXN_ADD) or to

[PATCH 3/4] perf: Add 'update' parameter to perf_event_read_value()

2015-03-04 Thread Sukadev Bhattiprolu
perf_event_read_value() reads the counter from the PMC and computes the total count (including child events). Add an 'update' parameter and have it read the PMC only if 'update' parameter is TRUE (which it always is for now). When we add support for reading multiple events using the transaction

Re: [v1,1/3] crypto: powerpc/md5 - assembler

2015-03-04 Thread Herbert Xu
On Sun, Mar 01, 2015 at 07:30:35PM +0100, Markus Stockhausen wrote: This is the assembler code for the MD5 implementation. Handling of algorithm constants has been slightly changed to reduce register usage and make better use of cores with multiple ALUs. Thus they are stored as delta values.

[PATCH 4/4] perf/powerpc: Implement group_read() txn interface for 24x7 counters

2015-03-04 Thread Sukadev Bhattiprolu
The 24x7 counters in Powerpc allow monitoring a large number of counters simultaneously. They also allow reading several counters in a single HCALL so we can get a more consistent snapshot of the system. Use the PMU's transaction interface to monitor and read several event counters at once. The

[PATCH 0/4] perf: Implement event group read using txn interface

2015-03-04 Thread Sukadev Bhattiprolu
Unlike normal hardware PMCs, the 24x7 counters[1] in Power8 are stored in memory and accessed via a hypervisor call (HCALL). A major aspect of the HCALL is that it allows retireving _SEVERAL_ counters at once (unlike regular PMCs, which are read one at a time). By reading several counters at

[PATCH v2] cpufreq: ppc: Add missing #include asm/smp.h

2015-03-04 Thread Geert Uytterhoeven
If CONFIG_SMP=n, linux/smp.h does not include asm/smp.h, causing: drivers/cpufreq/ppc-corenet-cpufreq.c: In function 'corenet_cpufreq_cpu_init': drivers/cpufreq/ppc-corenet-cpufreq.c:173:3: error: implicit declaration of function 'get_hard_smp_processor_id'

Re: [PATCH v2 3/5] crypto: talitos: Fix off-by-one and use all hardware slots

2015-03-04 Thread Martin Hicks
Ok, I'm fine dropping this patch. I'm sure it doesn't affect performance in a measurable way. mh On Tue, Mar 3, 2015 at 7:35 PM, Kim Phillips kim.phill...@freescale.com wrote: On Tue, 3 Mar 2015 08:21:35 -0500 Martin Hicks m...@bork.org wrote: The submission count was off by one.

Re: Problems with Kernels 3.17-rc1 and onwards on Acube Sam460 AMCC 460ex board

2015-03-04 Thread Julian Margetson
Still stuck. Problem still exist with 4.0.0-rc2 and I cant finish the bisect. Triggered when using HDMI. No problem when using DVI. [ 33.535692] Unable to handle kernel paging request for data at address 0x0008 [ 33.566786] Faulting instruction address: 0xc049db84 [ 33.574188] Vector:

Re: [PATCH v2] cpufreq: ppc: Add missing #include asm/smp.h

2015-03-04 Thread Rafael J. Wysocki
On Wednesday, March 04, 2015 12:56:20 PM Geert Uytterhoeven wrote: If CONFIG_SMP=n, linux/smp.h does not include asm/smp.h, causing: drivers/cpufreq/ppc-corenet-cpufreq.c: In function 'corenet_cpufreq_cpu_init': drivers/cpufreq/ppc-corenet-cpufreq.c:173:3: error: implicit declaration of