Re: [PATCH] powernv: Use __printf in pe_level_printk

2016-07-14 Thread Michael Ellerman
Joe Perches writes: > On Fri, 2016-07-15 at 14:36 +1000, Michael Ellerman wrote: >> Joe Perches writes: >> > >> > diff --git a/arch/powerpc/platforms/powernv/pci.h >> > b/arch/powerpc/platforms/powernv/pci.h >> > index 3a97990..1c1a586 100644 >> > ---

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

2016-07-14 Thread Michael Ellerman
Tejun Heo writes: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: >> Subject: workqueue: Fix setting affinity of unbound worker threads >> From: Peter Zijlstra >> Date: Thu Jun 16 14:38:42 CEST 2016 >> >> With commit e9d867a67fd03ccc

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

2016-07-14 Thread Gautham R Shenoy
Hi Tejun, On Thu, Jun 16, 2016 at 03:39:05PM -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > >

Re: [PATCH] powernv: Use __printf in pe_level_printk

2016-07-14 Thread Joe Perches
On Fri, 2016-07-15 at 14:36 +1000, Michael Ellerman wrote: > Joe Perches writes: > > > > > Make the compiler detect format and argument mismatches. > > > > Signed-off-by: Joe Perches > > --- > >  arch/powerpc/platforms/powernv/pci.h | 1 + > >  1 file

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

2016-07-14 Thread Kees Cook
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, 2016-07-15 at 09:20 +1000, Balbir Singh wrote: >>> >>> > > == >>> >

Re: [PATCH] powernv: Use __printf in pe_level_printk

2016-07-14 Thread Michael Ellerman
Joe Perches writes: > Make the compiler detect format and argument mismatches. > > Signed-off-by: Joe Perches > --- > arch/powerpc/platforms/powernv/pci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/platforms/powernv/pci.h >

Re: [PATCH v2 11/11] mm: SLUB hardened usercopy support

2016-07-14 Thread Kees Cook
On Thu, Jul 14, 2016 at 7:05 PM, Balbir Singh wrote: > On Wed, Jul 13, 2016 at 02:56:04PM -0700, Kees Cook wrote: >> Under CONFIG_HARDENED_USERCOPY, this adds object size checking to the >> SLUB allocator to catch any copies that may span objects. Includes a >> redzone

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

2016-07-14 Thread Kees Cook
On Thu, Jul 14, 2016 at 4:20 PM, Balbir Singh wrote: > On Wed, Jul 13, 2016 at 02:55:55PM -0700, Kees Cook wrote: >> [...] >> +++ b/mm/usercopy.c >> @@ -0,0 +1,219 @@ >> [...] >> +/* >> + * Checks if a given pointer and length is contained by the current >> + * stack frame

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

2016-07-14 Thread Michael Ellerman
Nathan Fontenot writes: > On 06/30/2016 04:44 PM, Michael Bringmann wrote: >> Several properties in the DRC device tree format are replaced by >> more compact representations to allow, for example, for the encoding >> of vast amounts of memory, and or reduced

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

2016-07-14 Thread Kees Cook
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, 2016-07-15 at 09:20 +1000, Balbir Singh wrote: >> >> > > == >> > > +((unsigned long)end & (unsigned >> > > long)PAGE_MASK))) >> > > +

Problems with prom.h

2016-07-14 Thread Christian Zigotzky
Hi All, We have problems with some latest stable longterm kernels. >> I tested the kernel for some hours today. Unfortunately our computers >> frequently freezes or completely halts with the latest longterm kernels. - Christian Sent from my iPhone > On 15 Jul 2016, at 05:39, Christian

Re: Kernel 4.1.28: Update TM user feature bits in scan_features()

2016-07-14 Thread Michael Ellerman
Christian Zigotzky writes: > Hi Michael, > > I was able to compile the kernel 4.1.28 with your patch. It boots and works. Thanks. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

Re: [bug report] Linux-2.6.12-rc2

2016-07-14 Thread Michael Ellerman
Dan Carpenter writes: > Hi PPC Devs, > > The patch 1da177e4c3f4: "Linux-2.6.12-rc2" from Apr 16, 2005, leads Might want to special case that one :) > to the following static checker warning: > > arch/powerpc/sysdev/ipic.c:783 ipic_set_priority() > error:

Re: [PATCH v2 11/11] mm: SLUB hardened usercopy support

2016-07-14 Thread Balbir Singh
On Wed, Jul 13, 2016 at 02:56:04PM -0700, Kees Cook wrote: > 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 from Michael Ellerman. > > Based on code from PaX and grsecurity. > >

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

2016-07-14 Thread Alexey Kardashevskiy
On 14/07/16 21:52, Alexey Kardashevskiy wrote: > On 14/07/16 20:12, Balbir Singh wrote: >> On Thu, Jul 14, 2016 at 3:16 PM, Alexey Kardashevskiy wrote: >>> At the moment VFIO IOMMU SPAPR v2 driver pins all guest RAM pages when >>> the userspace starts using VFIO. When the

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

2016-07-14 Thread Thiago Jung Bauermann
Am Donnerstag, 14 Juli 2016, 10:29:11 schrieb Arnd Bergmann: > On Wednesday, July 13, 2016 11:18:04 PM CEST Thiago Jung Bauermann wrote: > > Am Mittwoch, 13 Juli 2016, 21:59:18 schrieb Arnd Bergmann: > > > On Wednesday, July 13, 2016 3:45:41 PM CEST Thiago Jung Bauermann wrote: > > > > Am

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

2016-07-14 Thread Balbir Singh
On Thu, Jul 14, 2016 at 09:04:18PM -0400, Rik van Riel wrote: > On Fri, 2016-07-15 at 09:20 +1000, Balbir Singh wrote: > > > > == > > > +    ((unsigned long)end & (unsigned > > > long)PAGE_MASK))) > > > + return NULL; > > > + > > > + /* Allow if start and end are inside the same

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

2016-07-14 Thread Rik van Riel
On Fri, 2016-07-15 at 09:20 +1000, Balbir Singh wrote: > > == > > +    ((unsigned long)end & (unsigned > > long)PAGE_MASK))) > > + return NULL; > > + > > + /* Allow if start and end are inside the same compound > > page. */ > > + endpage = virt_to_head_page(end); > > +

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

2016-07-14 Thread Anton Blanchard via Linuxppc-dev
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 tested it against tip WIP.hotplug? I noticed tip started failing

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

2016-07-14 Thread Anna-Maria Gleixner
Hi, On 2016-07-14 23:42, Anton Blanchard wrote: Hi, From: Sebastian Andrzej Siewior 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:

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

2016-07-14 Thread Balbir Singh
On Wed, Jul 13, 2016 at 02:55:55PM -0700, 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 Spengler, and an earlier port > from Casey

[bug report] powerpc/qe: Increase MAX_QE_RISC to 4

2016-07-14 Thread Dan Carpenter
Hello Anton Vorontsov, The patch 98eaa0987afd: "powerpc/qe: Increase MAX_QE_RISC to 4" from Aug 27, 2009, leads to the following static checker warning: drivers/soc/fsl/qe/qe.c:524 qe_upload_firmware() error: buffer overflow 'qe_immr->rsp' 2 <= 3 drivers/soc/fsl/qe/qe.c 425

[bug report] Linux-2.6.12-rc2

2016-07-14 Thread Dan Carpenter
Hi PPC Devs, The patch 1da177e4c3f4: "Linux-2.6.12-rc2" from Apr 16, 2005, leads to the following static checker warning: arch/powerpc/sysdev/ipic.c:783 ipic_set_priority() error: buffer overflow 'ipic_info' 95 <= 127 arch/powerpc/sysdev/ipic.c 36 static struct ipic_info

[bug report] cxl: Add guest-specific code

2016-07-14 Thread Dan Carpenter
Hello Christophe Lombard, The patch 14baf4d9c739: "cxl: Add guest-specific code" from Mar 4, 2016, leads to the following static checker warning: drivers/misc/cxl/guest.c:1115 cxl_guest_init_adapter() error: we previously assumed 'adapter->guest' could be null (see line 1114)

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

2016-07-14 Thread Anton Blanchard via Linuxppc-dev
Hi, > From: Sebastian Andrzej Siewior > > 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: percpu: Embedded 3 pages/cpu @c0001fe0

Kernel 4.1.28: Update TM user feature bits in scan_features()

2016-07-14 Thread Christian Zigotzky
Hi Michael, I was able to compile the kernel 4.1.28 with your patch. It boots and works. Thanks, Christian On 14 July 2016 at 1:33 PM, Christian Zigotzky wrote: Hi Michael, When I received your email with your solution, I had already compiled the kernel 4.1.28 with the following temporary

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

2016-07-14 Thread Kees Cook
On Thu, Jul 14, 2016 at 12:23 PM, Josh Poimboeuf wrote: > On Thu, Jul 14, 2016 at 11:10:18AM -0700, Kees Cook wrote: >> On Wed, Jul 13, 2016 at 10:48 PM, Josh Poimboeuf wrote: >> > On Wed, Jul 13, 2016 at 03:04:26PM -0700, Kees Cook wrote: >> >> On Wed,

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

2016-07-14 Thread Josh Poimboeuf
On Thu, Jul 14, 2016 at 11:10:18AM -0700, Kees Cook wrote: > On Wed, Jul 13, 2016 at 10:48 PM, Josh Poimboeuf wrote: > > On Wed, Jul 13, 2016 at 03:04:26PM -0700, Kees Cook wrote: > >> On Wed, Jul 13, 2016 at 3:01 PM, Andy Lutomirski > >> wrote: > >> >

[PATCH for -mm] signal: Consolidate {TS,TLF}_RESTORE_SIGMASK code

2016-07-14 Thread Andy Lutomirski
In general, there's no need for the "restore sigmask" flag to live in ti->flags. alpha, ia64, microblaze, powerpc, sh, sparc (64-bit only), tile, and x86 use essentially identical alternative implementations, placing the flag in ti->status. Replace those optimized implementations with an equally

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

2016-07-14 Thread Kees Cook
On Wed, Jul 13, 2016 at 10:48 PM, Josh Poimboeuf wrote: > On Wed, Jul 13, 2016 at 03:04:26PM -0700, Kees Cook wrote: >> On Wed, Jul 13, 2016 at 3:01 PM, Andy Lutomirski wrote: >> > On Wed, Jul 13, 2016 at 2:55 PM, Kees Cook wrote:

[PATCH] powernv: Use __printf in pe_level_printk

2016-07-14 Thread Joe Perches
Make the compiler detect format and argument mismatches. Signed-off-by: Joe Perches --- arch/powerpc/platforms/powernv/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h index 3a97990..1c1a586

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

2016-07-14 Thread Mark Rutland
On Wed, Jul 13, 2016 at 09:57:28PM +0200, Arnd Bergmann wrote: > On Wednesday, July 13, 2016 6:58:32 PM CEST Mark Rutland wrote: > > > > > we may want to remove unnecessary devices and even add a dedicated > > > storage device for storing a core dump image. > > > > I suspect that bringing up

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

2016-07-14 Thread Alexey Kardashevskiy
On 14/07/16 20:12, Balbir Singh wrote: > On Thu, Jul 14, 2016 at 3:16 PM, Alexey Kardashevskiy wrote: >> 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

Re: [patch] ide: missing break statement in set_timings_mdma()

2016-07-14 Thread Benjamin Herrenschmidt
On Thu, 2016-07-14 at 13:48 +0300, Dan Carpenter wrote: > There was clearly supposed to be a break statement here.  Currently we > use the k2 ata timings instead of sh ata ones we intended.  Probably no > one has this hardware anymore so it likely doesn't make a difference > beyond the static

Kernel 4.1.28: Update TM user feature bits in scan_features()

2016-07-14 Thread Christian Zigotzky
Hi Michael, When I received your email with your solution, I had already compiled the kernel 4.1.28 with the following temporary solution: Not suitable for 4.1-stable (no PPC_FEATURE2_HTM_NOSC_COMP). - * If the kernel doesn't support TM (ie CONFIG_PPC_TRANSACTIONAL_MEM=n), - * we

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

2016-07-14 Thread Dan Carpenter
Good point. Thanks. regards, dan carpenter ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2016-07-14 Thread Dan Carpenter
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') Signed-off-by: Dan Carpenter --- v2: remove the other initialization to zero

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

2016-07-14 Thread Michael Ellerman
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 PPC_FEATURE2_HTM_NOSC. Fixes: f49eb503f0f9 ("powerpc: Update TM user

Re: Kernel 4.1.28: Update TM user feature bits in scan_features()

2016-07-14 Thread Michael Ellerman
Christian Zigotzky writes: > Hi All, > > I tried to compile the kernel 4.1.28 today. Unfortunately it doesn't > compile because of an undeclared variable PPC_FEATURE2_HTM_NOSC_COMP. > > Error message: > >CHK include/config/kernel.release >CHK

Re: [patch] KVM: PPC: fix a sanity check

2016-07-14 Thread Alexander Graf
On 07/14/2016 12:15 PM, Dan Carpenter wrote: We use logical negate where bitwise negate was intended. It means that we never return -EINVAL here. Fixes: ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support') Signed-off-by: Dan Carpenter Oops :).

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

2016-07-14 Thread walter harms
Am 14.07.2016 12:34, schrieb Dan Carpenter: > 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') > Signed-off-by: Dan Carpenter

[patch] ide: missing break statement in set_timings_mdma()

2016-07-14 Thread Dan Carpenter
There was clearly supposed to be a break statement here. Currently we use the k2 ata timings instead of sh ata ones we intended. Probably no one has this hardware anymore so it likely doesn't make a difference beyond the static checker warning. Signed-off-by: Dan Carpenter

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

2016-07-14 Thread Dan Carpenter
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') Signed-off-by: Dan Carpenter diff --git a/drivers/net/wan/fsl_ucc_hdlc.c

Kernel 4.1.28: Update TM user feature bits in scan_features()

2016-07-14 Thread Christian Zigotzky
Hi All, I tried to compile the kernel 4.1.28 today. Unfortunately it doesn't compile because of an undeclared variable PPC_FEATURE2_HTM_NOSC_COMP. Error message: CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h

[patch] KVM: PPC: fix a sanity check

2016-07-14 Thread Dan Carpenter
We use logical negate where bitwise negate was intended. It means that we never return -EINVAL here. Fixes: ce11e48b7fdd ('KVM: PPC: E500: Add userspace debug stub support') Signed-off-by: Dan Carpenter diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c

Re: [PATCH] powerpc/configs: Enable VMX crypto

2016-07-14 Thread Michael Ellerman
Anton Blanchard writes: > From: Anton Blanchard > > We see big improvements with the VMX crypto functions (often 10x or more), > so enable it as a module. I can't build pseries_defconfig with this applied: /tmp/ccsjEdNB.s: Assembler messages:

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

2016-07-14 Thread Balbir Singh
On Thu, Jul 14, 2016 at 3:16 PM, Alexey Kardashevskiy wrote: > 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

Re: [kernel-hardening] [PATCH v2 11/11] mm: SLUB hardened usercopy support

2016-07-14 Thread Michael Ellerman
Kees Cook writes: > 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 from Michael Ellerman. Actually I think you wrote the fix, I just pointed you in that

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

2016-07-14 Thread Paolo Bonzini
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 32-bit architectures can do atomic

Re: [PATCH for-4.8 12/12] powerpc/mm/radix: Add a kernel command line to disable radix

2016-07-14 Thread Aneesh Kumar K.V
Balbir Singh writes: > On Wed, Jul 13, 2016 at 03:05:31PM +0530, Aneesh Kumar K.V wrote: >> This patch adds the kernel command line disable_radix which disable >> the radix MMU mode even if firmware indicates radix support via >> ibm,pa-features device tree node. >> >>

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

2016-07-14 Thread Arnd Bergmann
On Wednesday, July 13, 2016 11:18:04 PM CEST Thiago Jung Bauermann wrote: > Am Mittwoch, 13 Juli 2016, 21:59:18 schrieb Arnd Bergmann: > > On Wednesday, July 13, 2016 3:45:41 PM CEST Thiago Jung Bauermann wrote: > > > Am Mittwoch, 13 Juli 2016, 15:13:42 schrieb Arnd Bergmann: > > > > > > For