Re: [PATCH v2 1/2] crypto: vmx - Adding asm subroutines for XTS

2016-07-19 Thread Herbert Xu
On Mon, Jul 18, 2016 at 12:26:25PM -0300, Paulo Flabiano Smorigo wrote: > This patch add XTS subroutines using VMX-crypto driver. > > It gives a boost of 20 times using XTS. > > These code has been adopted from OpenSSL project in collaboration > with the original author (Andy Polyakov ). > > Sig

[PATCH V4 1/5] kvm/ppc/book3s: Move struct kvmppc_vcore from kvm_host.h to kvm_book3s.h

2016-07-19 Thread Suraj Jitindar Singh
The next commit will introduce a member to the kvmppc_vcore struct which references MAX_SMT_THREADS which is defined in kvm_book3s_asm.h, however this file isn't included in kvm_host.h directly. Thus compiling for certain platforms such as pmac32_defconfig and ppc64e_defconfig with KVM fails due to

[PATCH V4 2/5] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array

2016-07-19 Thread Suraj Jitindar Singh
The struct kvmppc_vcore is a structure used to store various information about a virtual core for a kvm guest. The runnable_threads element of the struct provides a list of all of the currently runnable vcpus on the core (those in the KVMPPC_VCPU_RUNNABLE state). The previous implementation of this

[PATCH V4 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-19 Thread Suraj Jitindar Singh
This patch introduces new halt polling functionality into the kvm_hv kernel module. When a vcore is idle it will poll for some period of time before scheduling itself out. When all of the runnable vcpus on a vcore have ceded (and thus the vcore is idle) we schedule ourselves out to allow something

[PATCH V4 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats

2016-07-19 Thread Suraj Jitindar Singh
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 these statistics are represented as u32s, however the next patch adds some u64 vcpu statistics. Change all vcpu stat

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

2016-07-19 Thread Suraj Jitindar Singh
vcpu stats are used to collect information about a vcpu which can be viewed in the debugfs. For example halt_attempted_poll and halt_successful_poll are used to keep track of the number of times the vcpu attempts to and successfully polls. These stats are currently not used on powerpc. Implement i

Re: [PATCH V4 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-19 Thread Christian Borntraeger
On 07/19/2016 10:12 AM, Suraj Jitindar Singh wrote: > This patch introduces new halt polling functionality into the kvm_hv kernel > module. When a vcore is idle it will poll for some period of time before > scheduling itself out. Some wording on why you cannot use the common code might be useful.

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

2016-07-19 Thread Christian Borntraeger
On 07/19/2016 10:12 AM, Suraj Jitindar Singh wrote: > Also add new vcpu stats: halt_poll_success_ns, halt_poll_fail_ns and > halt_wait_ns to be used to accumulate the total time spend polling > successfully, polling unsuccessfully and waiting respectively, and > halt_successful_wait to accumulate

Re: [PATCH V4 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats

2016-07-19 Thread Christian Borntraeger
On 07/19/2016 10:12 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 these statistics are represented as > u32s, however the nex

Re: [PATCH 0/2] Automatically load the vmx_crypto module if supported

2016-07-19 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Jul 19, 2016 at 11:01:55AM +1000, Michael Ellerman wrote: >> >> Can you please ask for an ack before merging arch patches? >> >> That's a 70 line powerpc patch and a 6 line crypto patch. It has no >> reviews and no acks. I would have preferred it if we could take it

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

2016-07-19 Thread Christian Borntraeger
On 07/15/2016 11:44 PM, Kees Cook wrote: > +config HAVE_ARCH_LINEAR_KERNEL_MAPPING > + bool > + help > + An architecture should select this if it has a secondary linear > + mapping of the kernel text. This is used to verify that kernel > + text exposures are not visible un

Re: [1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Michael Ellerman
Sam Bobroff writes: > On Fri, Jul 08, 2016 at 08:49:49PM +1000, Michael Ellerman wrote: >> On Wed, 2016-06-07 at 06:05:54 UTC, Sam bobroff wrote: >> > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c >> > index 02416fe..06d79bc 100644 >> > --- a/arch/powerpc/kvm/powerpc.c >> >

Re: [PATCH 0/2] Automatically load the vmx_crypto module if supported

2016-07-19 Thread Herbert Xu
On Tue, Jul 19, 2016 at 07:13:24PM +1000, Michael Ellerman wrote: > > I'll assume patch 2 has your ack :) Sure, Acked-by: Herbert Xu Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ___

Suspected regression?

2016-07-19 Thread Alessio Igor Bogani
Hi all, I have got two boards MVME5100 (MPC7410 cpu) and MVME7100 (MPC8641D cpu) for which I use the same cross-compiler (ppc7400). I tested these against kernel HEAD to found that these don't boot anymore (PID 1 crash). Bisecting results in first offending commit: 7aef4136566b0539a1a98391181e18

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

2016-07-19 Thread Mark Rutland
On Tue, Jul 19, 2016 at 08:55:56AM +0800, Dave Young wrote: > On 07/18/16 at 11:07am, Mark Rutland wrote: > > On Mon, Jul 18, 2016 at 10:30:24AM +0800, Dave Young wrote: > > > I do not think it is worth to add another syscall for extra fds. > > > We have open(2) as an example for different numbers

[PATCH -next] wan/fsl_ucc_hdlc: use module_platform_driver to simplify the code

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun --- drivers/net/wan/fsl_ucc_hdlc.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fs

[PATCH -next] wan/fsl_ucc_hdlc: remove .owner field for driver

2016-07-19 Thread Wei Yongjun
From: Wei Yongjun Remove .owner field if calls are used which set it automatically. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Wei Yongjun --- drivers/net/wan/fsl_ucc_hdlc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wan/fsl_ucc_hdlc.c

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

2016-07-19 Thread Vivek Goyal
On Tue, Jul 19, 2016 at 11:52:00AM +0100, Mark Rutland wrote: > On Tue, Jul 19, 2016 at 08:55:56AM +0800, Dave Young wrote: > > On 07/18/16 at 11:07am, Mark Rutland wrote: > > > On Mon, Jul 18, 2016 at 10:30:24AM +0800, Dave Young wrote: > > > > I do not think it is worth to add another syscall for

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

2016-07-19 Thread Mark Rutland
On Tue, Jul 19, 2016 at 08:24:06AM -0400, Vivek Goyal wrote: > On Tue, Jul 19, 2016 at 11:52:00AM +0100, Mark Rutland wrote: > > Regardless, this extended syscall changes some underlying assumptions > > made with the development of kexec_file_load, and I think treating this > > as an extension is n

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

2016-07-19 Thread Vivek Goyal
On Tue, Jul 19, 2016 at 01:47:28PM +0100, Mark Rutland wrote: > On Tue, Jul 19, 2016 at 08:24:06AM -0400, Vivek Goyal wrote: > > On Tue, Jul 19, 2016 at 11:52:00AM +0100, Mark Rutland wrote: > > > Regardless, this extended syscall changes some underlying assumptions > > > made with the development

[PATCH] crypto: vmx - Ignore generated files

2016-07-19 Thread Paulo Flabiano Smorigo
Ignore assembly files generated by the perl script. Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 drivers/crypto/vmx/.gitignore diff --git a/drivers/crypto/vmx/.gitignore b/drivers/crypto/vmx/.gitignore new fi

Re: [Patch v2] rpaphp: fix slot registration for multiple slots under a PHB

2016-07-19 Thread Nathan Fontenot
On 07/11/2016 05:16 PM, Tyrel Datwyler wrote: > PowerVM seems to only ever provide a single hotplug slot per PHB. > The under lying slot hotplug registration code assumed multiple slots, > but the actual implementation is broken for multiple slots. This went > unnoticed for years due to the nature

RE: [PATCH V2 7/7] thermal: qoriq: Add thermal management support

2016-07-19 Thread Hongtao Jia
Hi Eduardo, Any comments on this patch? Thanks. -Hongtao. > -Original Message- > From: Jia Hongtao [mailto:hongtao@nxp.com] > Sent: Thursday, June 30, 2016 11:09 AM > To: edubez...@gmail.com; rui.zh...@intel.com; robh...@kernel.org; > ga...@codeaurora.org; Scott Wood ; > shawn...@ker

Re: [PATCH v2 1/2] powerpc/pseries: Implemented indexed-count hotplug memory add

2016-07-19 Thread Nathan Fontenot
On 07/18/2016 10:07 AM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory c

Re: [PATCH v2 2/2] powerpc/pseries: Implemented indexed-count hotplug memory remove

2016-07-19 Thread Nathan Fontenot
On 07/18/2016 10:08 AM, Sahil Mehta wrote: > Indexed-count remove for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be unassigned (NOT > that lmbs will be removed). Because of Qemu's per-DIMM memory > management, the removal of a contiguous block of me

Re: [PATCH v2 1/2] powerpc/pseries: Implemented indexed-count hotplug memory add

2016-07-19 Thread Tyrel Datwyler
On 07/18/2016 08:07 AM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory c

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

2016-07-19 Thread Kees Cook
On Mon, Jul 18, 2016 at 6:06 PM, Laura Abbott wrote: > On 07/15/2016 02:44 PM, Kees Cook wrote: >> >> 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

Re: [PATCH V4 3/5] kvm/ppc/book3s_hv: Implement halt polling in the kvm_hv kernel module

2016-07-19 Thread David Matlack via Linuxppc-dev
On Tue, Jul 19, 2016 at 1:12 AM, Suraj Jitindar Singh wrote: > This patch introduces new halt polling functionality into the kvm_hv kernel > module. When a vcore is idle it will poll for some period of time before > scheduling itself out. > > When all of the runnable vcpus on a vcore have ceded (a

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

2016-07-19 Thread Kees Cook
On Mon, Jul 18, 2016 at 6:52 PM, Laura Abbott wrote: > On 07/15/2016 02:44 PM, Kees Cook wrote: >> >> 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

Re: [PATCH V4 4/5] kvm/stats: Add provisioning for ulong vm stats and u64 vcpu stats

2016-07-19 Thread David Matlack via Linuxppc-dev
On Tue, Jul 19, 2016 at 1:12 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 these statistics are represented as > u32s, howev

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

2016-07-19 Thread David Matlack
On Tue, Jul 19, 2016 at 1:12 AM, Suraj Jitindar Singh wrote: > vcpu stats are used to collect information about a vcpu which can be viewed > in the debugfs. For example halt_attempted_poll and halt_successful_poll > are used to keep track of the number of times the vcpu attempts to and > successfu

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

2016-07-19 Thread Kees Cook
On Tue, Jul 19, 2016 at 2:21 AM, Christian Borntraeger wrote: > On 07/15/2016 11:44 PM, Kees Cook wrote: >> +config HAVE_ARCH_LINEAR_KERNEL_MAPPING >> + bool >> + help >> + An architecture should select this if it has a secondary linear >> + mapping of the kernel text. This is

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

2016-07-19 Thread Christian Borntraeger
On 07/19/2016 09:31 PM, Kees Cook wrote: > On Tue, Jul 19, 2016 at 2:21 AM, Christian Borntraeger > wrote: >> On 07/15/2016 11:44 PM, Kees Cook wrote: >>> +config HAVE_ARCH_LINEAR_KERNEL_MAPPING >>> + bool >>> + help >>> + An architecture should select this if it has a secondary line

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

2016-07-19 Thread Kees Cook
On Tue, Jul 19, 2016 at 1:14 PM, Christian Borntraeger wrote: > On 07/19/2016 09:31 PM, Kees Cook wrote: >> On Tue, Jul 19, 2016 at 2:21 AM, Christian Borntraeger >> wrote: >>> On 07/15/2016 11:44 PM, Kees Cook wrote: +config HAVE_ARCH_LINEAR_KERNEL_MAPPING + bool + help >>

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

2016-07-19 Thread Christian Borntraeger
On 07/19/2016 10:34 PM, Kees Cook wrote: [...] >> >> So what about for the CONFIG text: >> >>An architecture should select this if the kernel mapping has a >> secondary >>linear mapping of the kernel text - in other words more than one >> virtual >>kernel address that poin

Re: Suspected regression?

2016-07-19 Thread Scott Wood
On Tue, 2016-07-19 at 12:00 +0200, Alessio Igor Bogani wrote: > Hi all, > > I have got two boards MVME5100 (MPC7410 cpu) and MVME7100 (MPC8641D > cpu) for which I use the same cross-compiler (ppc7400). > > I tested these against kernel HEAD to found that these don't boot > anymore (PID 1 crash).

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

2016-07-19 Thread Topi Miettinen
On 07/18/16 22:05, Doug Ledford wrote: > On 7/15/2016 12:35 PM, Topi Miettinen wrote: >> 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, cgro

[PATCH] mm: Add is_migrate_cma_page

2016-07-19 Thread Laura Abbott
Code such as hardened user copy[1] needs a way to tell if a page is CMA or not. Add is_migrate_cma_page in a similar way to is_migrate_isolate_page. [1]http://article.gmane.org/gmane.linux.kernel.mm/155238 Signed-off-by: Laura Abbott --- Here's an explicit patch, slightly different than what I p

Re: [PATCH] mm: Add is_migrate_cma_page

2016-07-19 Thread Kees Cook
On Tue, Jul 19, 2016 at 3:00 PM, Laura Abbott wrote: > Code such as hardened user copy[1] needs a way to tell if a > page is CMA or not. Add is_migrate_cma_page in a similar way > to is_migrate_isolate_page. > > [1]http://article.gmane.org/gmane.linux.kernel.mm/155238 > > Signed-off-by: Laura Abbo

Re: [PATCH] linuxppc/devtree: Parse new DRC mem/cpu/dev device tree elements

2016-07-19 Thread Michael Bringmann
Responses to your remarks about the patch. Note that I will repost it in smaller segments later this week. On 07/13/2016 03:41 PM, Nathan Fontenot wrote: > On 06/30/2016 04:44 PM, Michael Bringmann wrote: >> Several properties in the DRC device tree format are replaced by >> more compact represen

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

2016-07-19 Thread Kees Cook
On Tue, Jul 19, 2016 at 12:12 PM, Kees Cook wrote: > On Mon, Jul 18, 2016 at 6:52 PM, Laura Abbott wrote: >> On 07/15/2016 02:44 PM, Kees Cook wrote: >>> +static inline const char *check_heap_object(const void *ptr, unsigned >>> long n, >>> + bool to_user

Re: [PATCH v2 1/2] powerpc/pseries: Implemented indexed-count hotplug memory add

2016-07-19 Thread Thomas Falcon
On 07/18/2016 10:07 AM, Sahil Mehta wrote: > Indexed-count add for memory hotplug guarantees that a contiguous block > of lmbs beginning at a specified will be assigned (NOT > that lmbs will be added). Because of Qemu's per-DIMM memory > management, the addition of a contiguous block of memory c

[PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Sam Bobroff
Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to determine if a PowerPC KVM guest should use HTM (Hardware Transactional Memory). This will be used by QEMU to populate the pa-features bits in the guest's device tree. Signed-off-by: Sam Bobroff --- v2: * Use CPU_FTR_TM_CO

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

2016-07-19 Thread Balbir Singh
> > Command line options are not signed. I thought idea behind secureboot > was to execute only trusted code and command line options don't enforce > you to execute unsigned code. > >> >> You can set module.sig_enforce=0 and open up the system a bit assuming >> that you can

Re: [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Balbir Singh
On 20/07/16 13:41, Sam Bobroff wrote: > Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to > determine if a PowerPC KVM guest should use HTM (Hardware Transactional > Memory). > > This will be used by QEMU to populate the pa-features bits in the > guest's device tree. > > S

Re: [v2,1/2] refactor code parsing size based on memory range

2016-07-19 Thread Hari Bathini
Ping.. On Friday 24 June 2016 10:45 PM, Hari Bathini wrote: On 06/24/2016 10:56 AM, Michael Ellerman wrote: On Wed, 2016-22-06 at 19:25:26 UTC, Hari Bathini wrote: Currently, crashkernel parameter supports the below syntax to parse size based on memory range: crashkernel=:[,:,...] W

[PATCH kernel] powerpc/powernv/ioda: Fix endianness when reading TCEs

2016-07-19 Thread Alexey Kardashevskiy
The iommu_table_ops::exchange() callback writes new TCE to the table and returns old value and permission mask. The old TCE value is correctly converted from BE to CPU endian; however permission mask was calculated from BE value and therefore always returned DMA_NONE which could cause memory leak o

[PATCH kernel v2 2/2] powerpc/mm/iommu: Put pages on process exit

2016-07-19 Thread Alexey Kardashevskiy
At the moment VFIO IOMMU SPAPR v2 driver pins all guest RAM pages when the userspace starts using VFIO. When the userspace process finishes, all the pinned pages need to be put; this is done as a part of the userspace memory context (MM) destruction which happens on the very last mmdrop(). This ap

[PATCH kernel v2 0/2] powerpc/mm/iommu: Put pages on process exit

2016-07-19 Thread Alexey Kardashevskiy
This is a fix to a bug when guest memory stays Active after QEMU process exited. This happened because the QEMU memory context was not released in a short period of time after QEMU process exited. More details are in the commit logs. Please comment. Thanks. Alexey Kardashevskiy (2): powerpc/iom

[PATCH kernel v2 1/2] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-07-19 Thread Alexey Kardashevskiy
In some situations the userspace memory context may live longer than the userspace process itself so if we need to do proper memory context cleanup, we better cache @mm and use it later when the process is gone (@current or @current->mm are NULL). This changes mm_iommu_xxx API to receive mm_struct

Re: [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Michael Ellerman
Sam Bobroff writes: > Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to > determine if a PowerPC KVM guest should use HTM (Hardware Transactional Minor nit, "should" should be "can" IMHO. > Memory). > > This will be used by QEMU to populate the pa-features bits in the > gu

Re: [PATCH v3] of: fix memory leak related to safe_name()

2016-07-19 Thread Mathieu Malaterre
On Fri, Jun 24, 2016 at 10:38 PM, Rob Herring wrote: > On Fri, Jun 17, 2016 at 2:51 AM, Mathieu Malaterre > wrote: >> v3 tested here multiple times ! memleak is now gone. >> >> Tested-by: Mathieu Malaterre >> >> Thanks >> >> On Thu, Jun 16, 2016 at 7:51 PM, Frank Rowand wrote: >>> From: Frank R

Re: [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Paolo Bonzini
On 20/07/2016 07:46, Michael Ellerman wrote: > Thanks. > > Acked-by: Michael Ellerman > > Or do you want me to merge this before Paul gets back? No, this should be merged through the KVM tree. Please Cc the KVM maintainers before offering to apply a patch that formally belongs to another tre