Re: [PATCH v2] cpufreq: powernv: Replacing pstate_id with frequency table index

2016-07-15 Thread Rafael J. Wysocki
On Monday, July 11, 2016 11:47:53 AM Viresh Kumar wrote: > On 30-06-16, 11:53, Akshay Adiga wrote: > > Refactoring code to use frequency table index instead of pstate_id. > > This abstraction will make the code independent of the pstate values. > > > > - No functional changes > > - The highest

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread H. Peter Anvin
,Johannes Weiner ,Alexei Starovoitov ,Arnaldo Carvalho de Melo ,Alexander Shishkin ,Balbir Singh ,Markus Elfring ,"David S.

Re: [kernel-hardening] Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-15 Thread Daniel Micay
> I'd like it to dump stack and be fatal to the process involved, but > yeah, I guess BUG() would work. Creating an infrastructure for > handling security-related Oopses can be done separately from this > (and > I'd like to see that added, since it's a nice bit of configurable > reactivity to

Re: [kernel-hardening] Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-15 Thread Daniel Micay
> This could be a BUG, but I'd rather not panic the entire kernel. It seems unlikely that it will panic without panic_on_oops and that's an explicit opt-in to taking down the system on kernel logic errors exactly like this. In grsecurity, it calls the kernel exploit handling logic (panic if root,

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Topi Miettinen
On 07/15/16 14:19, Richard Weinberger wrote: > Hi! > > Am 15.07.2016 um 12:35 schrieb Topi Miettinen: >> Hello, >> >> There are many basic ways to control processes, including capabilities, >> cgroups and resource limits. However, there are far fewer ways to find out >> useful values for the

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Topi Miettinen
On 07/15/16 13:59, Peter Zijlstra wrote: > On Fri, Jul 15, 2016 at 01:52:48PM +, Topi Miettinen wrote: >> On 07/15/16 12:43, Peter Zijlstra wrote: >>> On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: Hello, There are many basic ways to control processes, including

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Topi Miettinen
On 07/15/16 13:04, Balbir Singh wrote: > On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: >> Hello, >> >> There are many basic ways to control processes, including capabilities, >> cgroups and resource limits. However, there are far fewer ways to find out >> useful values for the

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Richard Weinberger
Hi! Am 15.07.2016 um 12:35 schrieb Topi Miettinen: > Hello, > > There are many basic ways to control processes, including capabilities, > cgroups and resource limits. However, there are far fewer ways to find out > useful values for the limits, except blind trial and error. > > This patch

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Peter Zijlstra
On Fri, Jul 15, 2016 at 01:52:48PM +, Topi Miettinen wrote: > On 07/15/16 12:43, Peter Zijlstra wrote: > > On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: > >> Hello, > >> > >> There are many basic ways to control processes, including capabilities, > >> cgroups and resource

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Topi Miettinen
On 07/15/16 12:43, Peter Zijlstra wrote: > On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: >> Hello, >> >> There are many basic ways to control processes, including capabilities, >> cgroups and resource limits. However, there are far fewer ways to find out >> useful values for the

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Balbir Singh
On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: > Hello, > > There are many basic ways to control processes, including capabilities, > cgroups and resource limits. However, there are far fewer ways to find out > useful values for the limits, except blind trial and error. > > This

Re: [PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Peter Zijlstra
On Fri, Jul 15, 2016 at 01:35:47PM +0300, Topi Miettinen wrote: > Hello, > > There are many basic ways to control processes, including capabilities, > cgroups and resource limits. However, there are far fewer ways to find out > useful values for the limits, except blind trial and error. > > This

Re: [v10, 3/7] soc: fsl: add GUTS driver for QorIQ platforms

2016-07-15 Thread Paul Gortmaker
[Re: [v10, 3/7] soc: fsl: add GUTS driver for QorIQ platforms] On 15/07/2016 (Fri 14:12) Scott Wood wrote: > On Fri, 2016-07-15 at 12:43 -0400, Paul Gortmaker wrote: > > > +source "drivers/soc/fsl/qe/Kconfig" [...] > > > + > > > +config FSL_GUTS > > > +   bool > > > diff --git

[PATCH v3 11/11] mm: SLUB hardened usercopy support

2016-07-15 Thread Kees Cook
Under CONFIG_HARDENED_USERCOPY, this adds object size checking to the SLUB allocator to catch any copies that may span objects. Includes a redzone handling fix discovered by Michael Ellerman. Based on code from PaX and grsecurity. Signed-off-by: Kees Cook Tested-by:

[PATCH v3 10/11] mm: SLAB hardened usercopy support

2016-07-15 Thread Kees Cook
Under CONFIG_HARDENED_USERCOPY, this adds object size checking to the SLAB allocator to catch any copies that may span objects. Based on code from PaX and grsecurity. Signed-off-by: Kees Cook Tested-By: Valdis Kletnieks --- init/Kconfig | 1 +

[PATCH v3 08/11] sparc/uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on sparc. Based on code from PaX and grsecurity. Signed-off-by: Kees Cook --- arch/sparc/Kconfig | 1 + arch/sparc/include/asm/uaccess_32.h | 14 ++ arch/sparc/include/asm/uaccess_64.h | 11 +--

[PATCH v3 09/11] s390/uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on s390. Signed-off-by: Kees Cook --- arch/s390/Kconfig | 1 + arch/s390/lib/uaccess.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index a8c259059adf..9f694311c9ed 100644 ---

[PATCH v3 06/11] ia64/uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on ia64. Based on code from PaX and grsecurity. Signed-off-by: Kees Cook --- arch/ia64/Kconfig | 1 + arch/ia64/include/asm/uaccess.h | 18 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff

[PATCH v3 07/11] powerpc/uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on powerpc. Based on code from PaX and grsecurity. Signed-off-by: Kees Cook Tested-by: Michael Ellerman --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/uaccess.h | 21

[PATCH v3 03/11] x86/uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on x86. This is done both in copy_*_user() and __copy_*_user() because copy_*_user() actually calls down to _copy_*_user() and not __copy_*_user(). Based on code from PaX and grsecurity. Signed-off-by: Kees Cook Tested-By: Valdis

[PATCH v3 05/11] arm64/uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on arm64. As done by KASAN in -next, renames the low-level functions to __arch_copy_*_user() so a static inline can do additional work before the copy. Signed-off-by: Kees Cook --- arch/arm64/Kconfig | 2 ++

[PATCH v3 02/11] mm: Hardened usercopy

2016-07-15 Thread Kees Cook
This is the start of porting PAX_USERCOPY into the mainline kernel. This is the first set of features, controlled by CONFIG_HARDENED_USERCOPY. The work is based on code by PaX Team and Brad Spengler, and an earlier port from Casey Schaufler. Additional non-slab page tests are from Rik van Riel.

[PATCH v3 00/11] mm: Hardened usercopy

2016-07-15 Thread Kees Cook
Hi, [I'm going to carry this series in my kspp -next tree now, though I'd really love to have some explicit Acked-bys or Reviewed-bys. If you've looked through it or tested it, please consider it. :) (I added Valdis and mpe's Tested-bys where they seemed correct, thank you!)] This is a start of

[PATCH v3 01/11] mm: Implement stack frame object validation

2016-07-15 Thread Kees Cook
This creates per-architecture function arch_within_stack_frames() that should validate if a given object is contained by a kernel stack frame. Initial implementation is on x86. This is based on code from PaX. Signed-off-by: Kees Cook --- arch/Kconfig

[PATCH v3 04/11] ARM: uaccess: Enable hardened usercopy

2016-07-15 Thread Kees Cook
Enables CONFIG_HARDENED_USERCOPY checks on arm. Based on code from PaX and grsecurity. Signed-off-by: Kees Cook --- arch/arm/Kconfig | 1 + arch/arm/include/asm/uaccess.h | 11 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Thiago Jung Bauermann
Am Freitag, 15 Juli 2016, 22:26:09 schrieb Arnd Bergmann: > On Friday, July 15, 2016 2:42:10 PM CEST Russell King - ARM Linux wrote: > > On other architectures, DT can also contain open-firmware "functions" > > but I don't think there's much support in the kernel for that - maybe > > the PPC folk

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Arnd Bergmann
On Friday, July 15, 2016 2:42:10 PM CEST Russell King - ARM Linux wrote: > > On other architectures, DT can also contain open-firmware "functions" > but I don't think there's much support in the kernel for that - maybe > the PPC folk can reply on that point. The open firmware runtime interface

Re: [kernel-hardening] Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-15 Thread Kees Cook
On Fri, Jul 15, 2016 at 12:19 PM, Daniel Micay wrote: >> I'd like it to dump stack and be fatal to the process involved, but >> yeah, I guess BUG() would work. Creating an infrastructure for >> handling security-related Oopses can be done separately from this >> (and >> I'd

Re: [patch] ibmvfc: prevent a potential deadlock

2016-07-15 Thread Martin K. Petersen
> "Dan" == Dan Carpenter writes: Dan> My static checker complains that we need to unlock on this path. Dan> Seems true. Applied to 4.8/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering ___ Linuxppc-dev

Re: [kernel-hardening] Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-15 Thread Kees Cook
On Fri, Jul 15, 2016 at 12:00 PM, Daniel Micay wrote: >> This could be a BUG, but I'd rather not panic the entire kernel. > > It seems unlikely that it will panic without panic_on_oops and that's > an explicit opt-in to taking down the system on kernel logic errors >

Re: [v10, 3/7] soc: fsl: add GUTS driver for QorIQ platforms

2016-07-15 Thread Scott Wood
On Fri, 2016-07-15 at 12:43 -0400, Paul Gortmaker wrote: > On Wed, May 4, 2016 at 11:12 PM, Yangbo Lu wrote: > > > > The global utilities block controls power management, I/O device > > enabling, power-onreset(POR) configuration monitoring, alternate > > function selection for

Re: [patch v2 -next] wan/fsl_ucc_hdlc: info leak in uhdlc_ioctl()

2016-07-15 Thread David Miller
From: Dan Carpenter Date: Thu, 14 Jul 2016 14:16:53 +0300 > There is a 2 byte struct whole after line.loopback so we need to clear > that out to avoid disclosing stack information. > > Fixes: c19b6d246a35 ('drivers/net: support hdlc function for QE-UCC') >

Re: [PATCH 09/14] resource limits: track highwater mark of locked memory

2016-07-15 Thread Topi Miettinen
On 07/15/16 15:14, Oleg Nesterov wrote: > On 07/15, Topi Miettinen wrote: >> >> Track maximum size of locked memory, to be able to configure >> RLIMIT_MEMLOCK resource limits. The information is available >> with taskstats and cgroupstats netlink socket. > > So I personally still dislike the very

Re: [patch V2 30/67] powerpc/numa: Convert to hotplug state machine

2016-07-15 Thread Sebastian Andrzej Siewior
* Anton Blanchard | 2016-07-15 10:28:25 [+1000]: >Hi Anna-Maria, Hi Anton, >> >> Install the callbacks via the state machine and let the core invoke >> >> the callbacks on the already online CPUs. >> > >> > This is causing an oops on ppc64le QEMU, looks like a NULL >> > pointer: >> >> Did

Re: [v10, 3/7] soc: fsl: add GUTS driver for QorIQ platforms

2016-07-15 Thread Paul Gortmaker
On Wed, May 4, 2016 at 11:12 PM, Yangbo Lu wrote: > The global utilities block controls power management, I/O device > enabling, power-onreset(POR) configuration monitoring, alternate > function selection for multiplexed signals,and clock control. > > This patch adds GUTS

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Mark Rutland
On Fri, Jul 15, 2016 at 12:29:09PM -0300, Thiago Jung Bauermann wrote: > Am Freitag, 15 Juli 2016, 14:33:47 schrieb Mark Rutland: > > On Fri, Jul 15, 2016 at 09:26:10AM -0400, Vivek Goyal wrote: > > > I don't know anything about DTB. So here comes a very basic question. > > > Does DTB allow

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-15 Thread Pan Xinhui
Hi, Baibir sorry for late responce, I missed reading your mail. 在 16/7/6 18:54, Balbir Singh 写道: On Tue, 2016-06-28 at 10:43 -0400, Pan Xinhui wrote: This is to fix some lock holder preemption issues. Some other locks implementation do a spin loop before acquiring the lock itself.

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Thiago Jung Bauermann
Am Freitag, 15 Juli 2016, 14:33:47 schrieb Mark Rutland: > On Fri, Jul 15, 2016 at 09:26:10AM -0400, Vivek Goyal wrote: > > On Fri, Jul 15, 2016 at 09:31:02AM +0200, Arnd Bergmann wrote: > > > On Thursday, July 14, 2016 10:44:14 PM CEST Thiago Jung Bauermann wrote: > > > > Am Donnerstag, 14 Juli

Re: [PATCH 09/14] resource limits: track highwater mark of locked memory

2016-07-15 Thread Oleg Nesterov
On 07/15, Topi Miettinen wrote: > > Track maximum size of locked memory, to be able to configure > RLIMIT_MEMLOCK resource limits. The information is available > with taskstats and cgroupstats netlink socket. So I personally still dislike the very idea of this series... but I won't argue if you

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Russell King - ARM Linux
On Fri, Jul 15, 2016 at 09:26:10AM -0400, Vivek Goyal wrote: > On Fri, Jul 15, 2016 at 09:31:02AM +0200, Arnd Bergmann wrote: > > I think that helps, as it makes the problem space correspond to that > > of modifying the command line, but I can still come up with countless > > attacks based on

Re: [patch] ibmvfc: prevent a potential deadlock

2016-07-15 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Mark Rutland
On Fri, Jul 15, 2016 at 09:26:10AM -0400, Vivek Goyal wrote: > On Fri, Jul 15, 2016 at 09:31:02AM +0200, Arnd Bergmann wrote: > > On Thursday, July 14, 2016 10:44:14 PM CEST Thiago Jung Bauermann wrote: > > > Am Donnerstag, 14 Juli 2016, 10:29:11 schrieb Arnd Bergmann: > > > > > > > > > > Right,

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Vivek Goyal
On Fri, Jul 15, 2016 at 09:31:02AM +0200, Arnd Bergmann wrote: > On Thursday, July 14, 2016 10:44:14 PM CEST Thiago Jung Bauermann wrote: > > Am Donnerstag, 14 Juli 2016, 10:29:11 schrieb Arnd Bergmann: > > > > > > > Right, but the question remains whether this helps while you allow the > > >

Re: [RFC 3/3] kexec: extend kexec_file_load system call

2016-07-15 Thread Mark Rutland
On Fri, Jul 15, 2016 at 09:09:55AM -0400, Vivek Goyal wrote: > On Tue, Jul 12, 2016 at 10:42:01AM +0900, AKASHI Takahiro wrote: > > [..] > > -SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd, > > +SYSCALL_DEFINE6(kexec_file_load, int, kernel_fd, int, initrd_fd, > >

Re: [PATCH v7 01/11] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle

2016-07-15 Thread Balbir Singh
On Fri, Jul 08, 2016 at 02:17:02AM +0530, Shreyas B. Prabhu wrote: > Signed-off-by: Shreyas B. Prabhu > --- > -No changes since v4 > > Changes in v4 > = > - New in v4 > > arch/powerpc/kernel/idle_power7.S | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [RFC 3/3] kexec: extend kexec_file_load system call

2016-07-15 Thread Vivek Goyal
On Tue, Jul 12, 2016 at 10:42:01AM +0900, AKASHI Takahiro wrote: [..] > -SYSCALL_DEFINE5(kexec_file_load, int, kernel_fd, int, initrd_fd, > +SYSCALL_DEFINE6(kexec_file_load, int, kernel_fd, int, initrd_fd, > unsigned long, cmdline_len, const char __user *, cmdline_ptr, > -

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Vivek Goyal
On Fri, Jul 15, 2016 at 09:49:25AM +0100, Russell King - ARM Linux wrote: > On Wed, Jul 13, 2016 at 03:13:42PM +0200, Arnd Bergmann wrote: > > On Wednesday, July 13, 2016 10:41:28 AM CEST Mark Rutland wrote: > > > The big question is whether this is a realistic case on a secure boot > > > system.

Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-15 Thread Balbir Singh
On Thu, Jul 14, 2016 at 09:53:31PM -0700, Kees Cook wrote: > On Thu, Jul 14, 2016 at 9:05 PM, Kees Cook wrote: > > On Thu, Jul 14, 2016 at 6:41 PM, Balbir Singh wrote: > >> On Thu, Jul 14, 2016 at 09:04:18PM -0400, Rik van Riel wrote: > >>> On Fri,

Re: [patch V2 30/67] powerpc/numa: Convert to hotplug state machine

2016-07-15 Thread Anton Blanchard via Linuxppc-dev
> > I noticed tip started failing in my CI environment which tests on > > QEMU. The failure bisected to commit > > 425209e0abaf2c6e3a90ce4fedb935c10652bf80 > > That's very useful, thanks Anton! > > I have removed this commit from the series for the time being, > refactored the followup

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-07-15 Thread Tejun Heo
On Fri, Jul 15, 2016 at 03:30:41PM +1000, Michael Ellerman wrote: > It looks like this still hasn't gone to Linus for 4.7? > > Could it please, it's a pretty nasty regression on our boxes. Sorry about that. Just sent out the pull request. Thanks. -- tejun

[PATCH 00/14] Present useful limits to user (v2)

2016-07-15 Thread Topi Miettinen
Hello, There are many basic ways to control processes, including capabilities, cgroups and resource limits. However, there are far fewer ways to find out useful values for the limits, except blind trial and error. This patch series attempts to fix that by giving at least a nice starting point

Re: [4.1.28 PATCH] powerpc: Fix build break due to missing PPC_FEATURE2_HTM_NOSC

2016-07-15 Thread Sasha Levin
On 07/14/2016 07:10 AM, Michael Ellerman wrote: > The backport of 4705e02498d6 ("powerpc: Update TM user feature bits in > scan_features()") (f49eb503f0f9), missed the fact that 4.1 doesn't > include the commit that added PPC_FEATURE2_HTM_NOSC. > > The correct fix is simply to omit

RE: [PATCH for-4.8 03/12] powerpc/mm: use _raw variant of page table accessors

2016-07-15 Thread David Laight
From: Aneesh Kumar K.V > Sent: 13 July 2016 10:35 > > This switch few of the page table accessor to use the __raw variant > and does the cpu to big endian conversion of constants. This helps in > generating better code. It might be better to say that checks for a value being 0 don't depend on

[patch] ibmvfc: prevent a potential deadlock

2016-07-15 Thread Dan Carpenter
My static checker complains that we need to unlock on this path. Seems true. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index fc523c3..ab67ec4 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++

[patch] usb: gadget: fsl_qe_udc: signedness bug in qe_get_frame()

2016-07-15 Thread Dan Carpenter
We can't assign -EINVAL to a u16. Fixes: 3948f0e0c999 ('usb: add Freescale QE/CPM USB peripheral controller driver') Signed-off-by: Dan Carpenter diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c index 93d28cb..901366f 100644 ---

[patch] crypto: nx - off by one bug in nx_of_update_msc()

2016-07-15 Thread Dan Carpenter
The props->ap[] array is defined like this: struct alg_props ap[NX_MAX_FC][NX_MAX_MODE][3]; So we can see that if msc->fc and msc->mode are == to NX_MAX_FC or NX_MAX_MODE then we're off by one. Fixes: ae0222b7289d ('powerpc/crypto: nx driver code supporting nx encryption')

[PATCH] powerpc/mm: Cleanup LPCR defines

2016-07-15 Thread Michael Ellerman
From: "Aneesh Kumar K.V" This makes it easy to verify we are not overloading the bits. No functionality change by this patch. mpe: Cleanup more. Completely fixup whitespace, convert all UL values to ASM_CONST(), and replace all occurrences of 63-x with the

Re: selftests/powerpc: Add a test for PROT_SAO

2016-07-15 Thread Michael Ellerman
On Mon, 2016-11-07 at 05:25:18 UTC, Michael Ellerman wrote: > PROT_SAO is a powerpc-specific flag to mmap(), and we rely on arch > specific logic to allow it to be passed to mmap(). > > Add a small test to ensure mmap() accepts PROT_SAO. We don't have a good > way to test that it actually causes

Re: powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-15 Thread Michael Ellerman
On Mon, 2016-11-07 at 04:17:31 UTC, Suraj Jitindar Singh wrote: > The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when > we loop over the elements of the list we check crash_shutdown_handles[i] > && i < CRASH_HANDLER_MAX. However this means that when we increment i to >

Re: powerpc/pmac/smp: Add missing FROZEN hotplug notifier transitions

2016-07-15 Thread Michael Ellerman
On Mon, 2016-04-04 at 09:30:01 UTC, Anna-Maria Gleixner wrote: > The FROZEN transitions are used when a CPU suspends/resumes. In case > of a suspend/resume, only the up prepare (CPU_UP_PREPARE_FROZEN) is > handled. The error handling transition CPU_UP_CANCELED_FROZEN as well > as the

Re: [v2,5/5] powerpc/sparse: Make ppc_md.{halt, restart} __noreturn

2016-07-15 Thread Michael Ellerman
On Tue, 2016-12-07 at 00:54:52 UTC, Daniel Axtens wrote: > PowerNV marks it's halt and restart calls as __noreturn. However, > ppc_md does not have this annotation. Add the annotation to ppc_md, > and then to every halt/restart function that is missing it. > > Additionally, I have verified that

Re: [5/5] powerpc/xmon: Dump ISA 2.07 SPRs

2016-07-15 Thread Michael Ellerman
On Thu, 2016-07-07 at 12:54:30 UTC, Michael Ellerman wrote: > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/e0ddf7a24558b356d5cf5ecc12 cheers ___ Linuxppc-dev mailing list

Re: [v2,4/5] powerpc/sparse: Pass endianness to sparse

2016-07-15 Thread Michael Ellerman
On Tue, 2016-12-07 at 00:54:51 UTC, Daniel Axtens wrote: > Explicitly give sparse an endianness in the Makefile, so that it > doesn't get confused. > > Normally we have #ifdef one and #else the other, so it doesn't usually > matter, but we have been bitten by it before, and indeed this patch >

Re: [4/5] powerpc/xmon: Dump ISA 2.06 SPRs

2016-07-15 Thread Michael Ellerman
On Thu, 2016-07-07 at 12:54:29 UTC, Michael Ellerman wrote: > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/1846193b178dcc58435fdc5735 cheers ___ Linuxppc-dev mailing list

Re: [3/5] powerpc/xmon: Adjust spacing of existing SPRs to make room for more

2016-07-15 Thread Michael Ellerman
On Thu, 2016-07-07 at 12:54:28 UTC, Michael Ellerman wrote: > Purely to make it pleasing to the eye. > > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/56346ad88d65fd60dde7b0535f cheers

Re: [28/41] powerpc/85xx/mpc85xx_rdb: Don't use the flat device-tree after boot

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:04:04 UTC, Benjamin Herrenschmidt wrote: > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/acd3578ed9100565ef1b39685e cheers ___ Linuxppc-dev

Re: [27/41] powerpc/85xx/mpc85xx_ds: Don't use the flat device-tree after boot

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:04:03 UTC, Benjamin Herrenschmidt wrote: > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/5b0f9f83684dff40014ce1d3c0 cheers ___ Linuxppc-dev

Re: [26/41] powerpc/85xx/ge_imp3a: Don't use the flat device-tree after boot

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:04:02 UTC, Benjamin Herrenschmidt wrote: > ge_imp3a_pic_init() is called way beyond the unflattening of > the tree, it shouldn't be using of_flat_dt_* > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks.

Re: [25/41] powerpc/cell: Don't use flat device-tree after boot

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:04:01 UTC, Benjamin Herrenschmidt wrote: > Some bit of SPU code was using the FDT rather than the expanded > device-tree. Fix it. > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks.

Re: [2/5] powerpc/xmon: Move static regno into its only user

2016-07-15 Thread Michael Ellerman
On Thu, 2016-07-07 at 12:54:27 UTC, Michael Ellerman wrote: > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/13629dad1e30e310bb21baa102 cheers ___ Linuxppc-dev mailing list

Re: [19/41] powerpc: Don't test for machine type in smp_setup_cpu_maps()

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:03:55 UTC, Benjamin Herrenschmidt wrote: > The subsequent test for RTAS along with the LPAR test are sufficient > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks.

Re: [18/41] powerpc/rtas: Don't test for machine type in rtas_initialize()

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:03:54 UTC, Benjamin Herrenschmidt wrote: > The test is unnecessary, the FW_FEATURE_LPAR is sufficient as there > exist no other LPAR type that has RTAS. > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks.

Re: [15/15] cxl: Add cxl_check_and_switch_mode() API to switch bi-modal cards

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:14 UTC, Ian Munsie wrote: > From: Andrew Donnellan > > Add a new API, cxl_check_and_switch_mode() to allow for switching of > bi-modal CAPI cards, such as the Mellanox CX-4 network card. ... > > Co-authored-by: Ian Munsie

Re: [14/15] PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:13 UTC, Ian Munsie wrote: > From: Andrew Donnellan > > When calling pnv_php_set_slot_power_state() with state == > OPAL_PCI_SLOT_OFFLINE, remove devices from the device tree as if we're > dealing with OPAL_PCI_SLOT_POWER_OFF. > > Cc:

Re: [13/15] PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:12 UTC, Ian Munsie wrote: > From: Andrew Donnellan > > The cxl driver will use infrastructure from pnv_php to handle device tree > updates when switching bi-modal CAPI cards into CAPI mode. > > To enable this, export pnv_php_find_slot()

Re: [12/15] cxl: Workaround PE=0 hardware limitation in Mellanox CX4

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:11 UTC, Ian Munsie wrote: > From: Ian Munsie > > The CX4 card cannot cope with a context with PE=0 due to a hardware > limitation, resulting in: > > [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 > [ 34.166580]

Re: [11/15] cxl: Add support for interrupts on the Mellanox CX4

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:10 UTC, Ian Munsie wrote: > From: Ian Munsie > > The Mellanox CX4 in cxl mode uses a hybrid interrupt model, where > interrupts are routed from the networking hardware to the XSL using the > MSIX table, and from there will be transformed back into

Re: [10/41] powerpc: Add comment explaining the purpose of setup_kdump_trampoline()

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:03:46 UTC, Benjamin Herrenschmidt wrote: > Anything in early_setup() needs to be justified to be there, in > this case, we need the trampolines before we can take exceptions > and thus before we turn on the MMU. > > Also remove a pretty meaningless and misplaced debug

Re: [10/15] cxl: Add preliminary workaround for CX4 interrupt limitation

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:09 UTC, Ian Munsie wrote: > From: Ian Munsie > > The Mellanox CX4 has a hardware limitation where only 4 bits of the > AFU interrupt number can be passed to the XSL when sending an interrupt, > limiting it to only 15 interrupts per context (AFU

Re: [1/5] powerpc/xmon: Remove unused externs

2016-07-15 Thread Michael Ellerman
On Thu, 2016-07-07 at 12:54:26 UTC, Michael Ellerman wrote: > None of these are used, or have been since we merged ppc & ppc64. > > Signed-off-by: Michael Ellerman Applied to powerpc next. https://git.kernel.org/powerpc/c/5b71eff78267a1e0d2f178a8b5 cheers

Re: [v2,1/5] powerpc/kvm: Clarify __user annotations

2016-07-15 Thread Michael Ellerman
On Tue, 2016-12-07 at 00:54:48 UTC, Daniel Axtens wrote: > kvmppc_h_put_tce_indirect labels a u64 pointer as __user. It also > labelled the u64 where get_user puts the result as __user. This isn't > a pointer and so doesn't need to be labelled __user. > > Split the u64 value definition onto a new

Re: [09/41] powerpc: Update obsolete comments in setup_32.c about entry conditions

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:03:45 UTC, Benjamin Herrenschmidt wrote: > early_init() is called in-place before kernel relocation and using > whatever MMU setup exists at the point the kernel is entered. > > machine_init() is called after relocation and after some initial > mapping of PAGE_OFFSET has

Re: [09/15] cxl: Add kernel APIs to get & set the max irqs per context

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:08 UTC, Ian Munsie wrote: > From: Ian Munsie > > These APIs will be used by the Mellanox CX4 support. While they function > standalone to configure existing behaviour, their primary purpose is to > allow the Mellanox driver to inform the cxl

Re: [08/41] powerpc: Move epapr_paravirt_early_init() to early_init_devtree()

2016-07-15 Thread Michael Ellerman
On Tue, 2016-05-07 at 05:03:44 UTC, Benjamin Herrenschmidt wrote: > The function is called by both 32-bit and 64-bit early setup right > after early_init_devtree(). All it does is run yet another early > DT parser which is precisely what early_init_devtree() is about, > so move it in there. > >

Re: [08/15] cxl: Add support for using the kernel API with a real PHB

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:07 UTC, Ian Munsie wrote: > From: Ian Munsie > > This hooks up support for using the kernel API with a real PHB. After > the AFU initialisation has completed it calls into the PHB code to pass > it the AFU that will be used by other peer physical

Re: [07/15] powerpc/powernv: Add support for the cxl kernel api on the real phb

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:06 UTC, Ian Munsie wrote: > From: Ian Munsie > > This adds support for the peer model of the cxl kernel api to the > PowerNV PHB, in which physical function 0 represents the cxl function on > the card (an XSL in the case of the CX4), which other

Re: [06/15] cxl: Do not create vPHB if there are no AFU configuration records

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:05 UTC, Ian Munsie wrote: > From: Ian Munsie > > The vPHB model of the cxl kernel API is a hierarchy where the AFU is > represented by the vPHB, and it's AFU configuration records are exposed > as functions under that vPHB. If there are no AFU

Re: [05/15] cxl: Allow a default context to be associated with an external pci_dev

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:04 UTC, Ian Munsie wrote: > From: Ian Munsie > > The cxl kernel API has a concept of a default context associated with > each PCI device under the virtual PHB. The Mellanox CX4 will also use > the cxl kernel API, but it does not use a virtual PHB

Re: [04/15] cxl: Move cxl_afu_get / cxl_afu_put to base

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:03 UTC, Ian Munsie wrote: > From: Ian Munsie > > The Mellanox CX4 uses a model where the AFU is one physical function of > the device, and is used by other peer physical functions of the same > device. This will require those other devices to grab

Re: [03/15] cxl: Enable bus mastering for devices using CAPP DMA mode

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:02 UTC, Ian Munsie wrote: > From: Ian Munsie > > Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus > master to be enabled in order for the CAPI traffic to flow. This should > be harmless to enable for other cxl devices, so

Re: [02/15] cxl: Add cxl_slot_is_supported API

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:01 UTC, Ian Munsie wrote: > From: Ian Munsie > > This extends the check that the adapter is in a CAPI capable slot so > that it may be called by external users in the kernel API. This will be > used by the upcoming Mellanox CX4 support, which

Re: [01/15] powerpc/powernv: Split cxl code out into a separate file

2016-07-15 Thread Michael Ellerman
On Wed, 2016-13-07 at 21:17:00 UTC, Ian Munsie wrote: > From: Ian Munsie > > The support for using the Mellanox CX4 in cxl mode will require > additions to the PHB code. In preparation for this, move the existing > cxl code out of pci-ioda.c into a separate pci-cxl.c file to

Re: [-next] cxl: Use for_each_compatible_node() macro

2016-07-15 Thread Michael Ellerman
On Tue, 2016-12-07 at 11:30:11 UTC, weiyj...@163.com wrote: > From: Wei Yongjun > > Use for_each_compatible_node() macro instead of open coding it. > > Generated by Coccinelle. > > Signed-off-by: Wei Yongjun > Reviewed-by: Andrew

[PATCH 09/14] resource limits: track highwater mark of locked memory

2016-07-15 Thread Topi Miettinen
Track maximum size of locked memory, to be able to configure RLIMIT_MEMLOCK resource limits. The information is available with taskstats and cgroupstats netlink socket. Signed-off-by: Topi Miettinen --- arch/ia64/kernel/perfmon.c | 1 +

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Russell King - ARM Linux
On Wed, Jul 13, 2016 at 03:13:42PM +0200, Arnd Bergmann wrote: > On Wednesday, July 13, 2016 10:41:28 AM CEST Mark Rutland wrote: > > The big question is whether this is a realistic case on a secure boot > > system. > > What does x86 do here? I assume changes to the command line are also >

Re: [patch V2 30/67] powerpc/numa: Convert to hotplug state machine

2016-07-15 Thread Ingo Molnar
* Anton Blanchard wrote: > Hi Anna-Maria, > > > >> Install the callbacks via the state machine and let the core invoke > > >> the callbacks on the already online CPUs. > > > > > > This is causing an oops on ppc64le QEMU, looks like a NULL > > > pointer: > > > > Did you

Re: [PATCH V2 5/5] powerpc/kvm/stats: Implement existing and add new halt polling vcpu stats

2016-07-15 Thread Suraj Jitindar Singh
On 14/07/16 03:20, David Matlack wrote: > On Tue, Jul 12, 2016 at 11:07 PM, Suraj Jitindar Singh > wrote: >> On 12/07/16 16:17, Suraj Jitindar Singh wrote: >>> On 12/07/16 02:49, David Matlack wrote: > [snip] It's possible to poll and wait in one halt, conflating

Re: [PATCH V2 4/5] kvm/stats: Add provisioning for 64-bit vcpu statistics

2016-07-15 Thread Suraj Jitindar Singh
On 14/07/16 19:42, Paolo Bonzini wrote: > > On 13/07/2016 20:00, Christian Borntraeger wrote: >> I thought u64 still existed on 32-bit architectures. unsigned long >> would be fine but with the caveat that certain stats would overflow on >> 32-bit architectures. Yes, but not all

Re: [PATCH V3 4/5] kvm/stats: Add provisioning for 64-bit vm and vcpu statistics

2016-07-15 Thread Suraj Jitindar Singh
On 13/07/16 19:04, Christian Borntraeger wrote: > On 07/13/2016 10:53 AM, Suraj Jitindar Singh wrote: >> vms and vcpus have statistics associated with them which can be viewed >> within the debugfs. Currently it is assumed within the vcpu_stat_get() and >> vm_stat_get() functions that all of

Re: [RFC 0/3] extend kexec_file_load system call

2016-07-15 Thread Arnd Bergmann
On Thursday, July 14, 2016 10:44:14 PM CEST Thiago Jung Bauermann wrote: > Am Donnerstag, 14 Juli 2016, 10:29:11 schrieb Arnd Bergmann: > > > > Right, but the question remains whether this helps while you allow the > > boot loader to modify the dtb. If an attacker gets in and cannot modify > >

  1   2   >