Re: [PATCH v2] Remove duplicate setting of the B field in tlbie

2016-09-26 Thread Paul Mackerras
On Fri, Sep 16, 2016 at 05:25:50PM +1000, Balbir Singh wrote: > > Remove duplicate setting of the the "B" field when doing a tlbie(l). > In compute_tlbie_rb(), the "B" field is set again just before > returning the rb value to be used for tlbie(l). > > Signed-off-by: Balbir Singh

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

2016-09-26 Thread Paul Mackerras
On Thu, Jul 14, 2016 at 01:15:46PM +0300, 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

Re: [PATCH] KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register

2016-09-26 Thread Paul Mackerras
On Wed, Sep 21, 2016 at 03:06:45PM +0200, Thomas Huth wrote: > The MMCR2 register is available twice, one time with number 785 > (privileged access), and one time with number 769 (unprivileged, > but it can be disabled completely). In former times, the Linux > kernel was using the unprivileged

Re: [PATCH] powernv: Search for new flash DT node location

2016-09-26 Thread Stewart Smith
Michael Ellerman writes: > Jack Miller writes: > >> On Wed, Aug 03, 2016 at 05:16:34PM +1000, Michael Ellerman wrote: >>> We could instead just search for all nodes that are compatible with >>> "ibm,opal-flash". We do that for i2c, see

RE: [v6,2/2] QE: remove PPCisms for QE

2016-09-26 Thread Qiang Zhao
On Tue, Sep 27, 2016 at 7:12AM -0500, Scott Wood wrote: > -Original Message- > From: Scott Wood [mailto:o...@buserror.net] > Sent: Tuesday, September 27, 2016 7:12 AM > To: Qiang Zhao > Cc: linuxppc-dev@lists.ozlabs.org; pku@gmail.com; X.B. Xie >

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-26 Thread Herbert Xu
On Mon, Sep 26, 2016 at 02:43:17PM -0300, Marcelo Cerri wrote: > > Wouldn't be enough to provide a pair of import/export functions as the > padlock-sha driver does? I don't think that will help as ultimately you need to call the export function on the fallback and that's what requires the extra

Re: [PATCH v5 0/4] PCI: Introduce a way to enforce all MMIO BARs not to share PAGE_SIZE

2016-09-26 Thread Yongji Xie
Hi Bjorn, Kindly Ping... Any comment on V5? Thanks, Yongji On 2016/9/13 17:00, Yongji Xie wrote: This series introduces a way for PCI resource allocator to force MMIO BARs not to share PAGE_SIZE. This would make sense to VFIO driver. Because current VFIO implementation disallows to mmap

Re: [RFC PATCH] powerpc/mm: THP page cache support

2016-09-26 Thread Balbir Singh
On 27/09/16 01:53, Aneesh Kumar K.V wrote: >>> >>> +void zap_deposited_table(struct mm_struct *mm, pmd_t *pmd) >> >> static? > > Ok I will fix that. inline as well? Balbir Singh.

Re: [PATCH] crypto: sha1-powerpc: little-endian support

2016-09-26 Thread Paulo Flabiano Smorigo
Fri, Sep 23, 2016 at 04:31:56PM -0300, Marcelo Cerri wrote: > The driver does not handle endianness properly when loading the input > data. Indeed. I tested in both endianesses and it's working fine. Thanks! Herbert, can we go ahead with this fix? > > Signed-off-by: Marcelo Cerri

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-26 Thread Reza Arbab
On Tue, Sep 27, 2016 at 07:15:41AM +1000, Benjamin Herrenschmidt wrote: What is that business with a command line argument ? Do that mean that we'll need some magic command line argument to properly handle LPC memory on CAPI devices or GPUs ? If yes that's bad ... kernel arguments should be a

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Reza Arbab
On Tue, Sep 27, 2016 at 07:12:31AM +1000, Benjamin Herrenschmidt wrote: In any case, if the memory hasn't been hotplug, this shouldn't be necessary as we shouldn't be considering it for allocation. Right. To be clear, the background info I put in the commit log refers to x86, where the SRAT

Re: [PATCH] PCI: Add parameter @mmio_force_on to pci_update_resource()

2016-09-26 Thread Gavin Shan
On Mon, Sep 19, 2016 at 09:53:30AM +1000, Gavin Shan wrote: >In pci_update_resource(), the PCI device's memory decoding (0x2 in >PCI_COMMAND) is disabled when 64-bits memory BAR is updated if the >PCI device's memory space wasn't asked to be always on by @pdev-> >mmio_always_on. The PF's memory

Re: [v6,2/2] QE: remove PPCisms for QE

2016-09-26 Thread Scott Wood
On Mon, 2016-09-26 at 01:46 +, Qiang Zhao wrote: > On Sun, Sep 25, 2016 at 12:19PM -0500, Scott Wood wrote: > > > > > -Original Message- > > From: Scott Wood [mailto:o...@buserror.net] > > Sent: Sunday, September 25, 2016 12:19 PM > > To: Qiang Zhao > > Cc:

Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500

2016-09-26 Thread Scott Wood
On Mon, 2016-09-26 at 10:48 +0200, David Engraf wrote: > Am 25.09.2016 um 08:20 schrieb Scott Wood: > > > > On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote: > > > > > > The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable > > > CONFIG_E500 and CONFIG_PPC_E500MC

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-26 Thread Benjamin Herrenschmidt
On Sun, 2016-09-25 at 13:36 -0500, Reza Arbab wrote: > To create a movable node, we need to hotplug all of its memory into > ZONE_MOVABLE. > > Note that to do this, auto_online_blocks should be off. Since the memory > will first be added to the default zone, we must explicitly use >

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Benjamin Herrenschmidt
On Sun, 2016-09-25 at 13:36 -0500, Reza Arbab wrote: > At boot, the movable_node option sets bottom-up memblock allocation. > > This reduces the chance that, in the window before movable memory has > been identified, an allocation for the kernel might come from a movable > node. By going

Re: [PATCH] i2c_powermac: shut up lockdep warning

2016-09-26 Thread Benjamin Herrenschmidt
On Mon, 2016-09-26 at 14:00 +0300, Denis Kirjanov wrote: > > > On Wednesday, September 21, 2016, Denis Kirjanov rg> wrote: > > That's unclear why lockdep shows the following warning but adding a > > lockdep class to struct pmac_i2c_bus solves it > > HI Ben,  > > could

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Reza Arbab
On Mon, Sep 26, 2016 at 09:17:43PM +0530, Aneesh Kumar K.V wrote: + /* bottom-up allocation may have been set by movable_node */ + memblock_set_bottom_up(false); + By then we have done few memblock allocation right ? Yes, some allocations do occur while bottom-up is set. IMHO,

Re: [PATCH v2] powerpc/mm: export current mmu mode info

2016-09-26 Thread Hari Bathini
Hi Michael/Aneesh, Thanks for reviewing the patch.. On Friday 23 September 2016 04:40 PM, Michael Ellerman wrote: Hari Bathini writes: diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index e2fb408..558987c 100644 ---

Re: [PATHC v2 0/9] ima: carry the measurement list across kexec

2016-09-26 Thread Thiago Jung Bauermann
Hello Eric, Am Dienstag, 20 September 2016, 11:07:29 schrieb Eric W. Biederman: > Thiago Jung Bauermann writes: > > Am Samstag, 17 September 2016, 00:17:37 schrieb Eric W. Biederman: > >> Thiago Jung Bauermann writes: > > Is this what

[PATCH v5 03/10] ima: permit duplicate measurement list entries

2016-09-26 Thread Mimi Zohar
Measurements carried across kexec need to be added to the IMA measurement list, but should not prevent measurements of the newly booted kernel from being added to the measurement list. This patch adds support for allowing duplicate measurements. The "boot_aggregate" measurement entry is the

[PATCH v5 02/10] ima: on soft reboot, restore the measurement list

2016-09-26 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch restores the measurement list. Changelog v5: - replace CONFIG_KEXEC_FILE with

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-26 Thread Jan Stancek
- Original Message - > From: "Marcelo Cerri" > To: "Jan Stancek" > Cc: "rui y wang" , herb...@gondor.apana.org.au, > mhce...@linux.vnet.ibm.com, > leosi...@linux.vnet.ibm.com, pfsmor...@linux.vnet.ibm.com, >

[PATCH v5 04/10] ima: maintain memory size needed for serializing the measurement list

2016-09-26 Thread Mimi Zohar
In preparation for serializing the binary_runtime_measurements, this patch maintains the amount of memory required. Changelog v5: - replace CONFIG_KEXEC_FILE with architecture CONFIG_HAVE_IMA_KEXEC (Thiago) Changelog v3: - include the ima_kexec_hdr size in the binary_runtime_measurement size.

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-26 Thread Marcelo Cerri
Herbert, Wouldn't be enough to provide a pair of import/export functions as the padlock-sha driver does? -- Regards, Marcelo On Mon, Sep 26, 2016 at 10:59:34PM +0800, Herbert Xu wrote: > On Fri, Sep 23, 2016 at 08:22:27PM -0400, Jan Stancek wrote: > > > > This seems to directly correspond

[PATCH v5 10/10] ima: platform-independent hash value

2016-09-26 Thread Mimi Zohar
From: Andreas Steffen For remote attestion it is important for the ima measurement values to be platform-independent. Therefore integer fields to be hashed must be converted to canonical format. Changelog: - Define canonical format as little endian (Mimi)

[PATCH v5 06/10] ima: on soft reboot, save the measurement list

2016-09-26 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and restored on boot. This patch uses the kexec buffer passing mechanism to pass the serialized IMA

[PATCH v5 09/10] ima: define a canonical binary_runtime_measurements list format

2016-09-26 Thread Mimi Zohar
The IMA binary_runtime_measurements list is currently in platform native format. To allow restoring a measurement list carried across kexec with a different endianness than the targeted kernel, this patch defines little-endian as the canonical format. For big endian systems wanting to

[PATCH v5 08/10] ima: support restoring multiple template formats

2016-09-26 Thread Mimi Zohar
The configured IMA measurement list template format can be replaced at runtime on the boot command line, including a custom template format. This patch adds support for restoring a measuremement list containing multiple builtin/custom template formats. Signed-off-by: Mimi Zohar

[PATCH v5 07/10] ima: store the builtin/custom template definitions in a list

2016-09-26 Thread Mimi Zohar
The builtin and single custom templates are currently stored in an array. In preparation for being able to restore a measurement list containing multiple builtin/custom templates, this patch stores the builtin and custom templates as a linked list. This will permit defining more than one custom

[PATCH v5 05/10] powerpc: ima: Send the kexec buffer to the next kernel

2016-09-26 Thread Mimi Zohar
From: Thiago Jung Bauermann The IMA kexec buffer allows the currently running kernel to pass the measurement list via a kexec segment to the kernel that will be kexec'd. This is the architecture-specific part of setting up the IMA kexec buffer for the next kernel.

[PATCH v5 01/10] powerpc: ima: Get the kexec buffer passed by the previous kernel

2016-09-26 Thread Mimi Zohar
From: Thiago Jung Bauermann The IMA kexec buffer allows the currently running kernel to pass the measurement list via a kexec segment to the kernel that will be kexec'd. The second kernel can check whether the previous kernel sent the buffer and retrieve it. This is

[PATCH v5 00/10] ima: carry the measurement list across kexec

2016-09-26 Thread Mimi Zohar
The TPM PCRs are only reset on a hard reboot. In order to validate a TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement list of the running kernel must be saved and then restored on the subsequent boot, possibly of a different architecture. The existing securityfs

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-26 Thread Andi Kleen
On Mon, Sep 26, 2016 at 12:03:43PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Sep 26, 2016 at 10:35:33AM +0200, Jiri Olsa escreveu: > > ping.. is that working for you? IMO we can include this > > as additional patch to the set.. > > No, it doesn't fails to build on the first cross env I

Re: [RFC PATCH] powerpc/mm: THP page cache support

2016-09-26 Thread Aneesh Kumar K.V
"Kirill A. Shutemov" writes: > On Thu, Sep 22, 2016 at 09:32:40PM +0530, Aneesh Kumar K.V wrote: >> Update arch hook in the generic THP page cache code, that will >> deposit and withdarw preallocated page table. Archs like ppc64 use >> this preallocated table to store the

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-26 Thread Aneesh Kumar K.V
Reza Arbab writes: > To create a movable node, we need to hotplug all of its memory into > ZONE_MOVABLE. > > Note that to do this, auto_online_blocks should be off. Since the memory > will first be added to the default zone, we must explicitly use > online_movable to

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Aneesh Kumar K.V
Reza Arbab writes: > At boot, the movable_node option sets bottom-up memblock allocation. > > This reduces the chance that, in the window before movable memory has > been identified, an allocation for the kernel might come from a movable > node. By going bottom-up,

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-26 Thread Arnaldo Carvalho de Melo
Em Mon, Sep 26, 2016 at 10:35:33AM +0200, Jiri Olsa escreveu: > ping.. is that working for you? IMO we can include this > as additional patch to the set.. No, it doesn't fails to build on the first cross env I tried, fixing it now, resulting patch: diff --git a/tools/perf/Makefile.config

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-26 Thread Herbert Xu
On Fri, Sep 23, 2016 at 08:22:27PM -0400, Jan Stancek wrote: > > This seems to directly correspond with: > p8_ghash_alg.descsize = sizeof(struct p8_ghash_desc_ctx) == 56 > shash_tfm->descsize = sizeof(struct p8_ghash_desc_ctx) + > crypto_shash_descsize(fallback) == 56 + 20 > where 20 is

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

2016-09-26 Thread Marcelo Cerri
Hi Jan, Just out of curiosity, have you tried to use "76" on both values to check if the problem still happens? -- Regards, Marcelo On Fri, Sep 23, 2016 at 08:22:27PM -0400, Jan Stancek wrote: > Hi, > > I'm chasing a memory corruption with 4.8-rc7 as I'm observing random Oopses > on ppc BE/LE

Re: [PATCH 4/4] drivers/pci/hotplug: Support surprise hotplug

2016-09-26 Thread Bjorn Helgaas
On Mon, Sep 26, 2016 at 11:08:02PM +1000, Gavin Shan wrote: > On Wed, Sep 21, 2016 at 11:57:03AM -0500, Bjorn Helgaas wrote: > >Hi Gavin, > > > >You don't need my ack for any of these, and I assume you'll merge them > >through the powerpc tree. > > > >Minor comments below, feel free to ignore

Re: [PATCH 4/4] drivers/pci/hotplug: Support surprise hotplug

2016-09-26 Thread Gavin Shan
On Wed, Sep 21, 2016 at 11:57:03AM -0500, Bjorn Helgaas wrote: >Hi Gavin, > >You don't need my ack for any of these, and I assume you'll merge them >through the powerpc tree. > >Minor comments below, feel free to ignore them. > >On Wed, Sep 21, 2016 at 10:15:30PM +1000, Gavin Shan wrote: >> ... >>

[PATCH v2 2/5] powerpc/eeh: Export eeh_pe_state_mark()

2016-09-26 Thread Gavin Shan
This exports eeh_pe_state_mark(). It will be used to mark the surprise hot removed PE as isolated to avoid unexpected EEH error reporting in surprise remove path. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/eeh_pe.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v2 3/5] powerpc/powernv: Unfreeze PE on allocation

2016-09-26 Thread Gavin Shan
This unfreezes PE when it's initialized because the PE might be put into frozen state in the last hot remove path. It's not harmful to do so if the PE is already in unfrozen state. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci-ioda.c | 12

[PATCH v2 4/5] drivers/pci/hotplug: Remove likely() and unlikely() in powernv driver

2016-09-26 Thread Gavin Shan
This removes likely() and unlikely() in pnv_php.c as the code isn't running in hot path. Those macros to affect CPU's branch stream don't help a lot for performance. I used them to identify the cases are likely or unlikely to happen. No logical changes introduced. Signed-off-by: Gavin Shan

[PATCH v2 1/5] powerpc/eeh: Allow to freeze PE in eeh_pe_set_option()

2016-09-26 Thread Gavin Shan
Function eeh_pe_set_option() is used to apply the requested options (enable, disable, unfreeze) in EEH virtualization path. The semantics of this function isn't complete until freezing is supported. This allows to freeze the indicated PE. The new semantics is going to be used in PCI surprise hot

[PATCH v2 5/5] drivers/pci/hotplug: Support surprise hotplug in powernv driver

2016-09-26 Thread Gavin Shan
This supports PCI surprise hotplug. The design is highlighted as below: * The PCI slot's surprise hotplug capability is exposed through device node property "ibm,slot-surprise-pluggable", meaning PCI surprise hotplug will be disabled if skiboot doesn't support it yet. * The

[PATCH v2 0/5] powerpc/powernv: PCI Surprise Hotplug Support

2016-09-26 Thread Gavin Shan
This series of patches supports PCI surprise hotplug on PowerNV platform. Without the corresponding skiboot patches, this feature won't be enabled and workable. * The skiboot patches can be found in below link (PATCH[01/16):

Re: [PATCH] i2c_powermac: shut up lockdep warning

2016-09-26 Thread Denis Kirjanov
On Wednesday, September 21, 2016, Denis Kirjanov wrote: > That's unclear why lockdep shows the following warning but adding a > lockdep class to struct pmac_i2c_bus solves it HI Ben, could you give any comments on this? Thanks! > > [ 20.507795]

Re: ehea crash on boot

2016-09-26 Thread Denis Kirjanov
On Monday, September 26, 2016, Mathieu Malaterre < mathieu.malate...@gmail.com> wrote: > On Fri, Sep 23, 2016 at 2:50 PM, Denis Kirjanov > wrote: > > Heh, another thing to debug :) > > > > mm: Hashing failure ! EA=0xd80080124040

Re: [RFC PATCH] powerpc/mm: THP page cache support

2016-09-26 Thread Kirill A. Shutemov
On Thu, Sep 22, 2016 at 09:32:40PM +0530, Aneesh Kumar K.V wrote: > Update arch hook in the generic THP page cache code, that will > deposit and withdarw preallocated page table. Archs like ppc64 use > this preallocated table to store the hash pte slot information. > > This is an RFC patch and I

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Naveen N. Rao
On 2016/09/26 11:00AM, Daniel Borkmann wrote: > On 09/26/2016 10:56 AM, Naveen N. Rao wrote: > > On 2016/09/24 03:30AM, Alexei Starovoitov wrote: > > > On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: > > > > On 09/23/2016 10:35 PM, Naveen N. Rao wrote: > > > > > Tail calls allow

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Daniel Borkmann
On 09/26/2016 10:56 AM, Naveen N. Rao wrote: On 2016/09/24 03:30AM, Alexei Starovoitov wrote: On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: On 09/23/2016 10:35 PM, Naveen N. Rao wrote: Tail calls allow JIT'ed eBPF programs to call into other JIT'ed eBPF programs. This can

Re: [PATCH 2/3] bpf powerpc: implement support for tail calls

2016-09-26 Thread Naveen N. Rao
On 2016/09/24 03:30AM, Alexei Starovoitov wrote: > On Sat, Sep 24, 2016 at 12:33:54AM +0200, Daniel Borkmann wrote: > > On 09/23/2016 10:35 PM, Naveen N. Rao wrote: > > >Tail calls allow JIT'ed eBPF programs to call into other JIT'ed eBPF > > >programs. This can be achieved either by: > > >(1)

Re: powerpc64: Enable CONFIG_E500 and CONFIG_PPC_E500MC for e5500/e6500

2016-09-26 Thread David Engraf
Am 25.09.2016 um 08:20 schrieb Scott Wood: On Mon, Aug 22, 2016 at 04:46:43PM +0200, David Engraf wrote: The PowerPC e5500/e6500 architecture is based on the e500mc core. Enable CONFIG_E500 and CONFIG_PPC_E500MC when e5500/e6500 is used. This will also fix using CONFIG_PPC_QEMU_E500 on PPC64.

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-26 Thread Jiri Olsa
On Thu, Sep 22, 2016 at 06:27:13PM +0200, Jiri Olsa wrote: > On Thu, Sep 22, 2016 at 05:00:22PM +0200, Jiri Olsa wrote: > > On Mon, Sep 19, 2016 at 09:28:20PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 19, 2016 at 09:02:58PM -0300, Arnaldo Carvalho de Melo > > > escreveu: > > > > Em

Re: ehea crash on boot

2016-09-26 Thread Mathieu Malaterre
On Fri, Sep 23, 2016 at 2:50 PM, Denis Kirjanov wrote: > Heh, another thing to debug :) > > mm: Hashing failure ! EA=0xd80080124040 access=0x800e > current=NetworkManager > trap=0x300 vsid=0x13d349c ssize=1 base psize=2 psize 2 pte=0xc0003bc0300301ae > mm: