Re: [PATCH v5 2/2] powerpc/pseries/iommu: Use dma_iommu_ops for Secure VM.

2019-12-11 Thread Alexey Kardashevskiy
On 11/12/2019 12:43, Michael Roth wrote: > Quoting Ram Pai (2019-12-06 19:12:39) >> Commit edea902c1c1e ("powerpc/pseries/iommu: Don't use dma_iommu_ops on >> secure guests") >> disabled dma_iommu_ops path, for secure VMs. Disabling dma_iommu_ops >> path for secure VMs, helped

Re: [PATCH] powerpc/fault: kernel can extend a user process's stack

2019-12-11 Thread Daniel Black
On Wed, 11 Dec 2019 12:43:37 +1100 Daniel Axtens wrote: > If a process page-faults trying to write beyond the end of its > stack, we attempt to grow the stack. > > However, if the kernel attempts to write beyond the end of a > process's stack, it takes a bad fault. This can occur when the >

Re: [PATCH 5/6] mm, memory_hotplug: Provide argument for the pgprot_t in arch_add_memory()

2019-12-11 Thread Michal Hocko
On Tue 10-12-19 16:52:31, Logan Gunthorpe wrote: [...] > In my opinion, having a coder and reviewer see PAGE_KERNEL and ask if > that makes sense is a benefit. Having it hidden because we don't want > people to think about it is worse, harder to understand and results in > bugs that are more

Re: [PATCH] powerpc/fault: kernel can extend a user process's stack

2019-12-11 Thread Daniel Axtens
> Fixes: 14cf11af6cf6 ("powerpc: Merge enough to start building in > arch/powerpc.") Wow, that's pretty ancient! I'm also not sure it's right - in that same patch, arch/ppc64/mm/fault.c contains: ^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 213) if (address + 2048

Re: [PATCH v5 1/2] powerpc/pseries/iommu: Share the per-cpu TCE page with the hypervisor.

2019-12-11 Thread Alexey Kardashevskiy
On 11/12/2019 02:35, Ram Pai wrote: > On Tue, Dec 10, 2019 at 04:32:10PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 10/12/2019 16:12, Ram Pai wrote: >>> On Tue, Dec 10, 2019 at 02:07:36PM +1100, Alexey Kardashevskiy wrote: On 07/12/2019 12:12, Ram Pai wrote: >

[RFC PATCH] skiboot machine check handler

2019-12-11 Thread Nicholas Piggin
Provide facilities to decode machine checks into human readable strings, with only sufficient information required to deal with them sanely. The old machine check stuff was over engineered. The philosophy here is that OPAL should correct anything it possibly can, what it can't handle but the OS

Re: Call for report - G5/PPC970 status

2019-12-11 Thread jjhdiederen
I have an iMac iSight with a 2.1 GHz PowerPC 970fx (G5) processor, that boots fine with the latest ppc64 kernel. Romain Dolbeau schreef op 2019-12-11 08:19: Le mer. 11 déc. 2019 à 03:20, Aneesh Kumar K.V a écrit : The PowerMac system we have internally was not able to recreate this. To

Re: [PATCH v2 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support

2019-12-11 Thread Balbir Singh
On 11/12/19 4:21 pm, Daniel Axtens wrote: > Hi Balbir, > >>> +Discontiguous memory can occur when you have a machine with memory spread >>> +across multiple nodes. For example, on a Talos II with 64GB of RAM: >>> + >>> + - 32GB runs from 0x0 to 0x_0008__, >>> + - then there's a

Re: [PATCH v1 3/4] arm64: dts: ls1028a: fix little-big endian issue for dcfg

2019-12-11 Thread Shawn Guo
On Tue, Dec 10, 2019 at 02:34:30AM +, Y.b. Lu wrote: > + Shawn, > > > -Original Message- > > From: Michael Walle > > Sent: Tuesday, December 10, 2019 8:06 AM > > To: Yinbo Zhu > > Cc: Ashish Kumar ; Alexandru Marginean > > ; Alison Wang ; > > Amit Jain (aj) ;

[PATCH] powerpc/book3s64: Fix error handling in mm_iommu_do_alloc()

2019-12-11 Thread Jan Kara
The last jump to free_exit in mm_iommu_do_alloc() happens after page pointers in struct mm_iommu_table_group_mem_t were already converted to physical addresses. Thus calling put_page() on these physical addresses will likely crash. Convert physical addresses back to page pointers during the error

Re: [PATCH v9 20/25] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-12-11 Thread Jan Kara
On Tue 10-12-19 18:53:13, John Hubbard wrote: > 1. Convert from get_user_pages() to pin_user_pages(). > > 2. As required by pin_user_pages(), release these pages via > put_user_page(). > > Cc: Jan Kara > Signed-off-by: John Hubbard The patch looks good to me. You can add: Reviewed-by: Jan

Re: [PATCH v9 23/25] mm/gup: track FOLL_PIN pages

2019-12-11 Thread Jan Kara
On Tue 10-12-19 18:53:16, John Hubbard wrote: > Add tracking of pages that were pinned via FOLL_PIN. > > As mentioned in the FOLL_PIN documentation, callers who effectively set > FOLL_PIN are required to ultimately free such pages via unpin_user_page(). > The effect is similar to FOLL_GET, and

Re: [PATCH v2 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support

2019-12-11 Thread Balbir Singh
On 12/12/19 1:24 am, Daniel Axtens wrote: > Hi Balbir, > > +Discontiguous memory can occur when you have a machine with memory spread > +across multiple nodes. For example, on a Talos II with 64GB of RAM: > + > + - 32GB runs from 0x0 to 0x_0008__, > + - then

Re: Call for report - G5/PPC970 status

2019-12-11 Thread jjhdiederen
PowerMac 7,3 G5 2.5 DP PCI-X Mid-2004 is affected with this bug. The machine freezes at boot due to the new ppc64 kernel. Regards, Jeroen Diederen Romain Dolbeau schreef op 2019-12-11 08:19: Le mer. 11 déc. 2019 à 03:20, Aneesh Kumar K.V a écrit : The PowerMac system we have internally was

Re: [PATCH v5 2/5] powerpc/kprobes: Mark newly allocated probes as RO

2019-12-11 Thread Russell Currey
On Fri, 2019-12-06 at 10:47 +1100, Michael Ellerman wrote: > Michael Ellerman writes: > > Russell Currey writes: > > > With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will > > > be one > > > W+X page at boot by default. This can be tested with > > > CONFIG_PPC_PTDUMP=y and

Re: [PATCH v5 2/2] powerpc/pseries/iommu: Use dma_iommu_ops for Secure VM.

2019-12-11 Thread Ram Pai
On Tue, Dec 10, 2019 at 07:43:24PM -0600, Michael Roth wrote: > Quoting Ram Pai (2019-12-06 19:12:39) > > Commit edea902c1c1e ("powerpc/pseries/iommu: Don't use dma_iommu_ops on > > secure guests") > > disabled dma_iommu_ops path, for secure VMs. Disabling dma_iommu_ops > > path

[PATCH AUTOSEL 5.4 069/134] powerpc/security: Fix wrong message when RFI Flush is disable

2019-12-11 Thread Sasha Levin
From: "Gustavo L. F. Walbon" [ Upstream commit 4e706af3cd8e1d0503c25332b30cad33c97ed442 ] The issue was showing "Mitigation" message via sysfs whatever the state of "RFI Flush", but it should show "Vulnerable" when it is disabled. If you have "L1D private" feature enabled and not "RFI Flush"

[PATCH AUTOSEL 5.4 111/134] powerpc: Don't add -mabi= flags when building with Clang

2019-12-11 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 465bfd9c44dea6b55962b5788a23ac87a467c923 ] When building pseries_defconfig, building vdso32 errors out: error: unknown target ABI 'elfv1' This happens because -m32 in clang changes the target to 32-bit, which does not allow the ABI to be changed.

[PATCH AUTOSEL 4.14 10/58] powerpc/pseries: Don't fail hash page table insert for bolted mapping

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 75838a3290cd4ebbd1f567f310ba04b6ef017ce4 ] If the hypervisor returned H_PTEG_FULL for H_ENTER hcall, retry a hash page table insert by removing a random entry from the group. After some runtime, it is very well possible to find all the 8 hash page

[PATCH AUTOSEL 5.4 125/134] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h

2019-12-11 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit a8de1304b7df30e3a14f2a8b9709bb4ff31a0385 ] The DTC v1.5.1 added references to (U)INT32_MAX. This is no problem for user-space programs since defines (U)INT32_MAX along with (u)int32_t. For the kernel space, libfdt_env.h needs to be adjusted before we

[PATCH AUTOSEL 4.19 21/79] powerpc/security/book3s64: Report L1TF status in sysfs

2019-12-11 Thread Sasha Levin
From: Anthony Steinhauser [ Upstream commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d ] Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I

[PATCH AUTOSEL 4.14 09/58] powerpc/pseries: Mark accumulate_stolen_time() as notrace

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eb8e20f89093b64f48975c74ccb114e6775cee22 ] accumulate_stolen_time() is called prior to interrupt state being reconciled, which can trip the warning in arch_local_irq_restore(): WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258

[PATCH AUTOSEL 4.14 11/58] powerpc/tools: Don't quote $objdump in scripts

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit e44ff9ea8f4c8a90c82f7b85bd4f5e497c841960 ] Some of our scripts are passed $objdump and then call it as "$objdump". This doesn't work if it contains spaces because we're using ccache, for example you get errors such as:

Re: [PATCH] net/ibmvnic: Fix typo in retry check

2019-12-11 Thread Thomas Falcon
On 12/11/19 9:32 AM, Thomas Falcon wrote: This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon --- Excuse me, disregard this

Re: [PATCH v3 1/2] powerpc/vcpu: Assume dedicated processors as non-preempt

2019-12-11 Thread Waiman Long
On 12/5/19 3:32 AM, Srikar Dronamraju wrote: > With commit 247f2f6f3c70 ("sched/core: Don't schedule threads on pre-empted > vCPUs"), scheduler avoids preempted vCPUs to schedule tasks on wakeup. > This leads to wrong choice of CPU, which in-turn leads to larger wakeup > latencies. Eventually, it

[PATCH AUTOSEL 5.4 040/134] powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 16f6b67cf03cb43db7104acb2ca877bdc2606c92 ] With large memory (8TB and more) hotplug, we can get soft lockup warnings as below. These were caused by a long loop without any explicit cond_resched which is a problem for !PREEMPT kernels. Avoid this using

[PATCH AUTOSEL 5.4 065/134] powerpc/pseries/cmm: Implement release() function for sysfs device

2019-12-11 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 7d8212747435c534c8d564fbef4541a463c976ff ] When unloading the module, one gets [ cut here ] Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0

[PATCH AUTOSEL 4.19 15/79] powerpc/tools: Don't quote $objdump in scripts

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit e44ff9ea8f4c8a90c82f7b85bd4f5e497c841960 ] Some of our scripts are passed $objdump and then call it as "$objdump". This doesn't work if it contains spaces because we're using ccache, for example you get errors such as:

[PATCH AUTOSEL 4.19 39/79] powerpc/pseries/cmm: Implement release() function for sysfs device

2019-12-11 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 7d8212747435c534c8d564fbef4541a463c976ff ] When unloading the module, one gets [ cut here ] Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0

MODPOST warnings on ppc64le

2019-12-11 Thread Roman Bolshakov
Hello, I'm seeing a set of build warnings on the 5.5-rc1 kernel: WARNING: vmlinux.o(.text+0x31e4): Section mismatch in reference from the variable __boot_from_prom to the function .init.text:prom_init() The function __boot_from_prom() references the function __init prom_init(). This is often

[PATCH AUTOSEL 5.4 023/134] powerpc/pseries: Mark accumulate_stolen_time() as notrace

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eb8e20f89093b64f48975c74ccb114e6775cee22 ] accumulate_stolen_time() is called prior to interrupt state being reconciled, which can trip the warning in arch_local_irq_restore(): WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258

[PATCH AUTOSEL 5.4 027/134] powerpc/tools: Don't quote $objdump in scripts

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit e44ff9ea8f4c8a90c82f7b85bd4f5e497c841960 ] Some of our scripts are passed $objdump and then call it as "$objdump". This doesn't work if it contains spaces because we're using ccache, for example you get errors such as:

[PATCH AUTOSEL 5.4 070/134] powerpc/eeh: differentiate duplicate detection message

2019-12-11 Thread Sasha Levin
From: Sam Bobroff [ Upstream commit de84ffc3ccbeec3678f95a3d898fc188efa0d9c5 ] Currently when an EEH error is detected, the system log receives the same (or almost the same) message twice: EEH: PHB#0 failure detected, location: N/A EEH: PHB#0 failure detected, location: N/A or EEH:

[PATCH AUTOSEL 5.4 088/134] powerpc/fixmap: Use __fix_to_virt() instead of fix_to_virt()

2019-12-11 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 77693a5fb57be4606a6024ec8e3076f9499b906b ] Modify back __set_fixmap() to using __fix_to_virt() instead of fix_to_virt() otherwise the following happens because it seems GCC doesn't see idx as a builtin const. CC mm/early_ioremap.o In file

[PATCH AUTOSEL 4.19 14/79] powerpc/pseries: Don't fail hash page table insert for bolted mapping

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 75838a3290cd4ebbd1f567f310ba04b6ef017ce4 ] If the hypervisor returned H_PTEG_FULL for H_ENTER hcall, retry a hash page table insert by removing a random entry from the group. After some runtime, it is very well possible to find all the 8 hash page

[PATCH AUTOSEL 4.19 43/79] powerpc/security: Fix wrong message when RFI Flush is disable

2019-12-11 Thread Sasha Levin
From: "Gustavo L. F. Walbon" [ Upstream commit 4e706af3cd8e1d0503c25332b30cad33c97ed442 ] The issue was showing "Mitigation" message via sysfs whatever the state of "RFI Flush", but it should show "Vulnerable" when it is disabled. If you have "L1D private" feature enabled and not "RFI Flush"

[PATCH AUTOSEL 4.14 14/58] powerpc/security/book3s64: Report L1TF status in sysfs

2019-12-11 Thread Sasha Levin
From: Anthony Steinhauser [ Upstream commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d ] Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I

[PATCH AUTOSEL 4.14 28/58] powerpc/pseries/cmm: Implement release() function for sysfs device

2019-12-11 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 7d8212747435c534c8d564fbef4541a463c976ff ] When unloading the module, one gets [ cut here ] Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0

[PATCH AUTOSEL 4.14 29/58] powerpc/security: Fix wrong message when RFI Flush is disable

2019-12-11 Thread Sasha Levin
From: "Gustavo L. F. Walbon" [ Upstream commit 4e706af3cd8e1d0503c25332b30cad33c97ed442 ] The issue was showing "Mitigation" message via sysfs whatever the state of "RFI Flush", but it should show "Vulnerable" when it is disabled. If you have "L1D private" feature enabled and not "RFI Flush"

[PATCH] net/ibmvnic: Fix typo in retry check

2019-12-11 Thread Thomas Falcon
This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1

Re: [PATCH v2 4/4] powerpc: Book3S 64-bit "heavyweight" KASAN support

2019-12-11 Thread Daniel Axtens
Hi Balbir, +Discontiguous memory can occur when you have a machine with memory spread +across multiple nodes. For example, on a Talos II with 64GB of RAM: + + - 32GB runs from 0x0 to 0x_0008__, + - then there's a gap, + - then the final 32GB runs from

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-12-11 Thread Rob Herring
On Tue, Dec 10, 2019 at 2:17 AM Frank Rowand wrote: > > On 12/9/19 7:51 PM, Rob Herring wrote: > > On Mon, Dec 9, 2019 at 7:35 AM Sebastian Andrzej Siewior > > wrote: > >> > >> On 2019-12-05 20:01:41 [-0600], Frank Rowand wrote: > >>> Is there a memory usage issue for the systems that led to

[PATCH AUTOSEL 4.19 13/79] powerpc/pseries: Mark accumulate_stolen_time() as notrace

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eb8e20f89093b64f48975c74ccb114e6775cee22 ] accumulate_stolen_time() is called prior to interrupt state being reconciled, which can trip the warning in arch_local_irq_restore(): WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258

[PATCH AUTOSEL 4.19 66/79] powerpc: Don't add -mabi= flags when building with Clang

2019-12-11 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 465bfd9c44dea6b55962b5788a23ac87a467c923 ] When building pseries_defconfig, building vdso32 errors out: error: unknown target ABI 'elfv1' This happens because -m32 in clang changes the target to 32-bit, which does not allow the ABI to be changed.

[PATCH AUTOSEL 4.14 15/58] powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 16f6b67cf03cb43db7104acb2ca877bdc2606c92 ] With large memory (8TB and more) hotplug, we can get soft lockup warnings as below. These were caused by a long loop without any explicit cond_resched which is a problem for !PREEMPT kernels. Avoid this using

[PATCH AUTOSEL 4.14 54/58] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h

2019-12-11 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit a8de1304b7df30e3a14f2a8b9709bb4ff31a0385 ] The DTC v1.5.1 added references to (U)INT32_MAX. This is no problem for user-space programs since defines (U)INT32_MAX along with (u)int32_t. For the kernel space, libfdt_env.h needs to be adjusted before we

[PATCH AUTOSEL 5.4 010/134] powerpc/papr_scm: Fix an off-by-one check in papr_scm_meta_{get, set}

2019-12-11 Thread Sasha Levin
From: Vaibhav Jain [ Upstream commit 612ee81b9461475b5a5612c2e8d71559dd3c7920 ] A validation check to prevent out of bounds read/write inside functions papr_scm_meta_{get,set}() is off-by-one that prevent reads and writes to the last byte of the label area. This bug manifests as a failure to

[PATCH AUTOSEL 5.4 024/134] powerpc/pseries: Don't fail hash page table insert for bolted mapping

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 75838a3290cd4ebbd1f567f310ba04b6ef017ce4 ] If the hypervisor returned H_PTEG_FULL for H_ENTER hcall, retry a hash page table insert by removing a random entry from the group. After some runtime, it is very well possible to find all the 8 hash page

[PATCH AUTOSEL 5.4 039/134] powerpc/security/book3s64: Report L1TF status in sysfs

2019-12-11 Thread Sasha Levin
From: Anthony Steinhauser [ Upstream commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d ] Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I

[PATCH AUTOSEL 5.4 071/134] powerpc/book3s/mm: Update Oops message to print the correct translation in use

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit d7e02f7b7991dbe14a2acfb0e53d675cd149001c ] Avoids confusion when printing Oops message like below Faulting instruction address: 0xc008bdb4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix MMU=Hash SMP NR_CPUS=2048

[PATCH AUTOSEL 4.19 22/79] powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 16f6b67cf03cb43db7104acb2ca877bdc2606c92 ] With large memory (8TB and more) hotplug, we can get soft lockup warnings as below. These were caused by a long loop without any explicit cond_resched which is a problem for !PREEMPT kernels. Avoid this using

[PATCH AUTOSEL 4.19 74/79] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h

2019-12-11 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit a8de1304b7df30e3a14f2a8b9709bb4ff31a0385 ] The DTC v1.5.1 added references to (U)INT32_MAX. This is no problem for user-space programs since defines (U)INT32_MAX along with (u)int32_t. For the kernel space, libfdt_env.h needs to be adjusted before we

[PATCH AUTOSEL 4.9 12/42] powerpc/security/book3s64: Report L1TF status in sysfs

2019-12-11 Thread Sasha Levin
From: Anthony Steinhauser [ Upstream commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d ] Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I

[PATCH AUTOSEL 4.9 13/42] powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 16f6b67cf03cb43db7104acb2ca877bdc2606c92 ] With large memory (8TB and more) hotplug, we can get soft lockup warnings as below. These were caused by a long loop without any explicit cond_resched which is a problem for !PREEMPT kernels. Avoid this using

[PATCH AUTOSEL 4.9 24/42] powerpc/pseries/cmm: Implement release() function for sysfs device

2019-12-11 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 7d8212747435c534c8d564fbef4541a463c976ff ] When unloading the module, one gets [ cut here ] Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-11 Thread Aurelien Jarno
On 2019-12-11 09:33, Justin Forbes wrote: > On Tue, Dec 10, 2019 at 4:26 PM Thadeu Lima de Souza Cascardo > wrote: > > > > On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: > > > On Mon, Dec 2, 2019 at 3:37 AM Daniel Borkmann > > > wrote: > > > > > > > > On Mon, Dec 02, 2019 at

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-11 Thread Thadeu Lima de Souza Cascardo
On Wed, Dec 11, 2019 at 09:33:53AM -0600, Justin Forbes wrote: > On Tue, Dec 10, 2019 at 4:26 PM Thadeu Lima de Souza Cascardo > wrote: > > > > On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: > > > On Mon, Dec 2, 2019 at 3:37 AM Daniel Borkmann > > > wrote: > > > > > > > > On

[PATCH v6 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-12-11 Thread Sourabh Jain
As the number of FADump sysfs files increases it is hard to manage all of them inside /sys/kernel directory. It's better to have all the FADump related sysfs files in a dedicated directory /sys/kernel/fadump. But in order to maintain backward compatibility a symlink has been added for every sysfs

[PATCH AUTOSEL 4.9 08/42] powerpc/pseries: Mark accumulate_stolen_time() as notrace

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eb8e20f89093b64f48975c74ccb114e6775cee22 ] accumulate_stolen_time() is called prior to interrupt state being reconciled, which can trip the warning in arch_local_irq_restore(): WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258

[PATCH AUTOSEL 4.9 09/42] powerpc/pseries: Don't fail hash page table insert for bolted mapping

2019-12-11 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit 75838a3290cd4ebbd1f567f310ba04b6ef017ce4 ] If the hypervisor returned H_PTEG_FULL for H_ENTER hcall, retry a hash page table insert by removing a random entry from the group. After some runtime, it is very well possible to find all the 8 hash page

[PATCH AUTOSEL 4.4 22/37] powerpc/pseries/cmm: Implement release() function for sysfs device

2019-12-11 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 7d8212747435c534c8d564fbef4541a463c976ff ] When unloading the module, one gets [ cut here ] Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-11 Thread Justin Forbes
On Tue, Dec 10, 2019 at 4:26 PM Thadeu Lima de Souza Cascardo wrote: > > On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: > > On Mon, Dec 2, 2019 at 3:37 AM Daniel Borkmann wrote: > > > > > > On Mon, Dec 02, 2019 at 04:53:26PM +1100, Michael Ellerman wrote: > > > > Aurelien Jarno

[PATCH v6 2/6] sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name

2019-12-11 Thread Sourabh Jain
The __compat_only_sysfs_link_entry_to_kobj function creates a symlink to a kobject but doesn't provide an option to change the symlink file name. This patch adds a wrapper function compat_only_sysfs_link_entry_to_kobj that extends the __compat_only_sysfs_link_entry_to_kobj functionality which

[PATCH v6 4/6] powerpc/powernv: move core and fadump_release_opalcore under new kobject

2019-12-11 Thread Sourabh Jain
The /sys/firmware/opal/core and /sys/kernel/fadump_release_opalcore sysfs files are used to export and release the OPAL memory on PowerNV platform. let's organize them into a new kobject under /sys/firmware/opal/mpipl/ directory. A symlink is added to maintain the backward compatibility for

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2019-12-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 Christophe Leroy (christophe.le...@c-s.fr) changed: What|Removed |Added CC|

[PATCH AUTOSEL 4.9 39/42] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h

2019-12-11 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit a8de1304b7df30e3a14f2a8b9709bb4ff31a0385 ] The DTC v1.5.1 added references to (U)INT32_MAX. This is no problem for user-space programs since defines (U)INT32_MAX along with (u)int32_t. For the kernel space, libfdt_env.h needs to be adjusted before we

[PATCH net v2] net/ibmvnic: Fix typo in retry check

2019-12-11 Thread Thomas Falcon
This conditional is missing a bang, with the intent being to break when the retry count reaches zero. Fixes: 476d96ca9c ("ibmvnic: Bound waits for device queries") Suggested-by: Juliet Kim Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1

[PATCH v6 1/6] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-12-11 Thread Sourabh Jain
Add missing ABI documentation for existing FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8 Documentation/ABI/testing/sysfs-kernel-fadump_release_mem

[PATCH v6 0/6] reorganize and add FADump sysfs files

2019-12-11 Thread Sourabh Jain
Currently, FADump sysfs files are present inside /sys/kernel directory. But as the number of FADump sysfs file increases it is not a good idea to push all of them in /sys/kernel directory. It is better to have separate directory to keep all the FADump sysfs files. Patch series reorganizes the

[PATCH v6 5/6] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-12-11 Thread Sourabh Jain
Add a deprecation note in FADump sysfs ABI documentation files and move them from ABI/testing to ABI/obsolete directory. Signed-off-by: Sourabh Jain --- .../ABI/{testing => obsolete}/sysfs-kernel-fadump_enabled | 2 ++ .../{testing => obsolete}/sysfs-kernel-fadump_registered | 2 ++

Re: [PATCH v5 2/2] powerpc/pseries/iommu: Use dma_iommu_ops for Secure VM.

2019-12-11 Thread Michael Roth
Quoting Alexey Kardashevskiy (2019-12-11 02:36:29) > > > On 11/12/2019 12:43, Michael Roth wrote: > > Quoting Ram Pai (2019-12-06 19:12:39) > >> Commit edea902c1c1e ("powerpc/pseries/iommu: Don't use dma_iommu_ops on > >> secure guests") > >> disabled dma_iommu_ops path, for

[PATCH AUTOSEL 4.9 25/42] powerpc/security: Fix wrong message when RFI Flush is disable

2019-12-11 Thread Sasha Levin
From: "Gustavo L. F. Walbon" [ Upstream commit 4e706af3cd8e1d0503c25332b30cad33c97ed442 ] The issue was showing "Mitigation" message via sysfs whatever the state of "RFI Flush", but it should show "Vulnerable" when it is disabled. If you have "L1D private" feature enabled and not "RFI Flush"

[PATCH AUTOSEL 4.4 08/37] powerpc/pseries: Mark accumulate_stolen_time() as notrace

2019-12-11 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit eb8e20f89093b64f48975c74ccb114e6775cee22 ] accumulate_stolen_time() is called prior to interrupt state being reconciled, which can trip the warning in arch_local_irq_restore(): WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258

[PATCH AUTOSEL 4.4 11/37] powerpc/security/book3s64: Report L1TF status in sysfs

2019-12-11 Thread Sasha Levin
From: Anthony Steinhauser [ Upstream commit 8e6b6da91ac9b9ec5a925b6cb13f287a54bd547d ] Some PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. It is also mitigated by flushing the L1D on privilege transition. Currently the sysfs gives a false negative on L1TF on CPUs that I

[PATCH AUTOSEL 4.4 23/37] powerpc/security: Fix wrong message when RFI Flush is disable

2019-12-11 Thread Sasha Levin
From: "Gustavo L. F. Walbon" [ Upstream commit 4e706af3cd8e1d0503c25332b30cad33c97ed442 ] The issue was showing "Mitigation" message via sysfs whatever the state of "RFI Flush", but it should show "Vulnerable" when it is disabled. If you have "L1D private" feature enabled and not "RFI Flush"

[PATCH v6 6/6] powerpc/fadump: sysfs for fadump memory reservation

2019-12-11 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst | 5

Re: [PATCH v5 2/2] powerpc/pseries/iommu: Use dma_iommu_ops for Secure VM.

2019-12-11 Thread Christoph Hellwig
On Wed, Dec 11, 2019 at 12:07:17PM -0600, Michael Roth wrote: > > io_tlb_start/io_tlb_end are only guaranteed to stay within 4GB and our > > default DMA window is 1GB (KVM) or 2GB (PowerVM), ok, we can define > > ARCH_LOW_ADDRESS_LIMIT as 1GB. > > True, and limiting allocations to under 1GB might

[PATCH AUTOSEL 4.4 34/37] libfdt: define INT32_MAX and UINT32_MAX in libfdt_env.h

2019-12-11 Thread Sasha Levin
From: Masahiro Yamada [ Upstream commit a8de1304b7df30e3a14f2a8b9709bb4ff31a0385 ] The DTC v1.5.1 added references to (U)INT32_MAX. This is no problem for user-space programs since defines (U)INT32_MAX along with (u)int32_t. For the kernel space, libfdt_env.h needs to be adjusted before we

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-11 Thread Justin Forbes
On Wed, Dec 11, 2019 at 10:01 AM Thadeu Lima de Souza Cascardo wrote: > > On Wed, Dec 11, 2019 at 09:33:53AM -0600, Justin Forbes wrote: > > On Tue, Dec 10, 2019 at 4:26 PM Thadeu Lima de Souza Cascardo > > wrote: > > > > > > On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: > > > >

Re: [PATCH v5 1/2] powerpc/pseries/iommu: Share the per-cpu TCE page with the hypervisor.

2019-12-11 Thread Michael Roth
Quoting Alexey Kardashevskiy (2019-12-11 02:15:44) > > > On 11/12/2019 02:35, Ram Pai wrote: > > On Tue, Dec 10, 2019 at 04:32:10PM +1100, Alexey Kardashevskiy wrote: > >> > >> > >> On 10/12/2019 16:12, Ram Pai wrote: > >>> On Tue, Dec 10, 2019 at 02:07:36PM +1100, Alexey Kardashevskiy wrote: >

Re: [PATCH v5 1/2] powerpc/pseries/iommu: Share the per-cpu TCE page with the hypervisor.

2019-12-11 Thread Alexey Kardashevskiy
On 12/12/2019 07:31, Michael Roth wrote: > Quoting Alexey Kardashevskiy (2019-12-11 02:15:44) >> >> >> On 11/12/2019 02:35, Ram Pai wrote: >>> On Tue, Dec 10, 2019 at 04:32:10PM +1100, Alexey Kardashevskiy wrote: On 10/12/2019 16:12, Ram Pai wrote: > On Tue, Dec 10, 2019 at

Re: [PATCH v9 10/25] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-12-11 Thread Jonathan Corbet
On Tue, 10 Dec 2019 18:53:03 -0800 John Hubbard wrote: > Introduce pin_user_pages*() variations of get_user_pages*() calls, > and also pin_longterm_pages*() variations. Just a couple of nits on the documentation patch > +++ b/Documentation/core-api/pin_user_pages.rst > @@ -0,0 +1,232 @@ > +..

Re: [PATCH v9 10/25] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-12-11 Thread John Hubbard
On 12/11/19 12:57 PM, Jonathan Corbet wrote: > On Tue, 10 Dec 2019 18:53:03 -0800 > John Hubbard wrote: > >> Introduce pin_user_pages*() variations of get_user_pages*() calls, >> and also pin_longterm_pages*() variations. > > Just a couple of nits on the documentation patch > >> +++

RE: [PATCH v5 1/2] powerpc/pseries/iommu: Share the per-cpu TCE page with the hypervisor.

2019-12-11 Thread Ram Pai
On Wed, Dec 11, 2019 at 07:15:44PM +1100, Alexey Kardashevskiy wrote: > > > On 11/12/2019 02:35, Ram Pai wrote: > > On Tue, Dec 10, 2019 at 04:32:10PM +1100, Alexey Kardashevskiy wrote: > >> ..snip.. > >> As discussed in slack, by default we do not need to clear the entire TCE > >> table and we

[RFC PATCH] OPAL v4 cpu idle driver skeleton

2019-12-11 Thread Nicholas Piggin
With OPAL using the same endianness, same stack, and with OS callbacks, it looks relatively easy to provide a CPU idle driver. The Linux sreset interrupt won't have to change, if it registers almost like isa300_idle_stop_mayloss as the os_stop function, then skiboot will call that to stop, and it

Re: [PATCH v5 1/2] powerpc/pseries/iommu: Share the per-cpu TCE page with the hypervisor.

2019-12-11 Thread Alexey Kardashevskiy
On 12/12/2019 09:47, Alexey Kardashevskiy wrote: > > > On 12/12/2019 07:31, Michael Roth wrote: >> Quoting Alexey Kardashevskiy (2019-12-11 02:15:44) >>> >>> >>> On 11/12/2019 02:35, Ram Pai wrote: On Tue, Dec 10, 2019 at 04:32:10PM +1100, Alexey Kardashevskiy wrote: > > > On

Re: [PATCH] libbpf: fix readelf output parsing on powerpc with recent binutils

2019-12-11 Thread Michael Ellerman
Thadeu Lima de Souza Cascardo writes: > On Wed, Dec 11, 2019 at 09:33:53AM -0600, Justin Forbes wrote: >> On Tue, Dec 10, 2019 at 4:26 PM Thadeu Lima de Souza Cascardo >> wrote: >> > >> > On Tue, Dec 10, 2019 at 12:58:33PM -0600, Justin Forbes wrote: >> > > On Mon, Dec 2, 2019 at 3:37 AM Daniel

Re: [PATCH V2 00/13] powerpc/vas: Page fault handling for user space NX requests

2019-12-11 Thread Haren Myneni
On Mon, 2019-12-09 at 02:38 -0600, Segher Boessenkool wrote: > Hi! > > On Mon, Dec 09, 2019 at 06:37:09AM +0100, Christophe Leroy wrote: > > What do you mean by NX ? > > It is the Power9 "Nest Accelerator". The patch series should ideally > mention that right at the start, yeah. Thanks, NX

[PATCH V2 00/13] powerpc/vas: Page fault handling for user space NX requests

2019-12-11 Thread Haren Myneni
[PATCH V2 00/13] powerpc/vas: Page fault handling for user space NX requests On power9, Virtual Accelerator Switchboard (VAS) allows user space or kernel to communicate with Nest Accelerator (NX) directly using COPY/PASTE instructions. NX provides verious functionalities such as compression,

READ_ONCE() + STACKPROTECTOR_STRONG == :/ (was Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.5-2 tag (topic/kasan-bitops))

2019-12-11 Thread Michael Ellerman
[ trimmed CC a bit ] Peter Zijlstra writes: > On Fri, Dec 06, 2019 at 11:46:11PM +1100, Michael Ellerman wrote: ... > you write: > > "Currently bitops-instrumented.h assumes that the architecture provides > atomic, non-atomic and locking bitops (e.g. both set_bit and __set_bit). > This is true

Re: [PATCH v9 23/25] mm/gup: track FOLL_PIN pages

2019-12-11 Thread John Hubbard
On 12/11/19 3:28 AM, Jan Kara wrote: ... The patch looks mostly good to me now. Just a few smaller comments below. Suggested-by: Jan Kara Suggested-by: Jérôme Glisse Reviewed-by: Jan Kara Reviewed-by: Jérôme Glisse Reviewed-by: Ira Weiny I think you inherited here the Reviewed-by tags