Re: [PATCH v5 0/5] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-12-15 Thread Bhupesh Sharma
Hi Boris, On Sat, Dec 14, 2019 at 5:57 PM Borislav Petkov wrote: > > On Fri, Nov 29, 2019 at 01:53:36AM +0530, Bhupesh Sharma wrote: > > Bhupesh Sharma (5): > > crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo > > arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo > > Docume

Re: [PATCH] powerpc: Add barrier_nospec to raw_copy_in_user()

2019-12-15 Thread Michal Suchánek
On Thu, Sep 19, 2019 at 12:04:27AM +1000, Michael Ellerman wrote: > Michal Suchánek writes: > > On Wed, 6 Mar 2019 12:10:38 +1100 > > Suraj Jitindar Singh wrote: > > > >> Commit ddf35cf3764b ("powerpc: Use barrier_nospec in copy_from_user()") > >> Added barrier_nospec before loading from user-co

Re: [PATCH V11] mm/debug: Add tests validating architecture page table helpers

2019-12-15 Thread Anshuman Khandual
On 12/03/2019 02:48 PM, Anshuman Khandual wrote: > This adds tests which will validate architecture page table helpers and > other accessors in their compliance with expected generic MM semantics. > This will help various architectures in validating changes to existing > page table helpers or ad

[PATCH kernel v2 4/4] powerpc/pseries/svm: Allow IOMMU to work in SVM

2019-12-15 Thread Alexey Kardashevskiy
H_PUT_TCE_INDIRECT uses a shared page to send up to 512 TCE to a hypervisor in a single hypercall. This does not work for secure VMs as the page needs to be shared or the VM should use H_PUT_TCE instead. This disables H_PUT_TCE_INDIRECT by clearing the FW_FEATURE_PUT_TCE_IND feature bit so SVMs wi

[PATCH kernel v2 3/4] powerpc/pseries/iommu: Separate FW_FEATURE_MULTITCE to put/stuff features

2019-12-15 Thread Alexey Kardashevskiy
H_PUT_TCE_INDIRECT allows packing up to 512 TCE updates into a single hypercall; H_STUFF_TCE can clear lots in a single hypercall too. However, unlike H_STUFF_TCE (which writes the same TCE to all entries), H_PUT_TCE_INDIRECT uses a 4K page with new TCEs. In a secure VM environment this means shar

[PATCH kernel v2 2/4] powerpc/pseries: Allow not having ibm, hypertas-functions::hcall-multi-tce for DDW

2019-12-15 Thread Alexey Kardashevskiy
By default a pseries guest supports a H_PUT_TCE hypercall which maps a single IOMMU page in a DMA window. Additionally the hypervisor may support H_PUT_TCE_INDIRECT/H_STUFF_TCE which update multiple TCEs at once; this is advertised via the device tree /rtas/ibm,hypertas-functions property which Lin

[PATCH kernel v2 0/4] Enable IOMMU support for pseries Secure VMs

2019-12-15 Thread Alexey Kardashevskiy
This enables IOMMU for SVM. Instead of sharing a H_PUT_TCE_INDIRECT page, this uses H_PUT_TCE for mapping and H_STUFF_TCE for clearing TCEs which should bring acceptable performance at the boot time; otherwise things work with the same speed anyway. Please comment. Thanks. This is based on sha1

[PATCH kernel v2 1/4] Revert "powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests"

2019-12-15 Thread Alexey Kardashevskiy
From: Ram Pai This reverts commit edea902c1c1efb855f77e041f9daf1abe7a9768a. At the time the change allowed direct DMA ops for secure VMs; however since then we switched on using SWIOTLB backed with IOMMU (direct mapping) and to make this work, we need dma_iommu_ops which handles all cases includ

Re: [PATCH V3 2/2] KVM: PPC: Implement H_SVM_INIT_ABORT hcall

2019-12-15 Thread Bharata B Rao
On Sat, Dec 14, 2019 at 06:12:08PM -0800, Sukadev Bhattiprolu wrote: > +unsigned long kvmppc_h_svm_init_abort(struct kvm *kvm) > +{ > + int i; > + > + if (!(kvm->arch.secure_guest & KVMPPC_SECURE_INIT_START)) > + return H_UNSUPPORTED; > + > + for (i = 0; i < KVM_ADDRESS_SPAC

Re: [PATCH v2 25/27] nvdimm/ocxl: Expose SMART data via ndctl

2019-12-15 Thread Alastair D'Silva
On Tue, 2019-12-03 at 14:46 +1100, Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch retrieves proprietary formatted SMART data and makes it > available via ndctl. A later contribution will be made to ndctl to > parse this data. > > Signed-off-by: Alastair D'Silva Dan, I should

Re: [PATCH 10/10] soc: qcom: convert to devm_platform_ioremap_resource

2019-12-15 Thread Marc Zyngier
On Sat, 14 Dec 2019 17:54:47 + Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. > > Signed-off-by: Yangtao Li > --- > drivers/soc/qcom/llcc-qcom.c| 7 +-- > drivers/soc/qcom/qcom-geni-se.c | 4 +--- > drivers/soc/qcom/qcom_aoss.c| 4 +--- > drivers/soc

Re: [PATCH] libbpf: Fix readelf output parsing for Fedora

2019-12-15 Thread Andrii Nakryiko
On Fri, Dec 13, 2019 at 2:11 AM Thadeu Lima de Souza Cascardo wrote: > > Fedora binutils has been patched to show "other info" for a symbol at the > end of the line. This was done in order to support unmaintained scripts > that would break with the extra info. [1] > > [1] > https://src.fedoraproj

Re: [PATCH] libbpf: Fix readelf output parsing for Fedora

2019-12-15 Thread Alexei Starovoitov
On Fri, Dec 13, 2019 at 9:02 AM Andrii Nakryiko wrote: > > On Fri, Dec 13, 2019 at 2:11 AM Thadeu Lima de Souza Cascardo > wrote: > > > > Fedora binutils has been patched to show "other info" for a symbol at the > > end of the line. This was done in order to support unmaintained scripts > > that

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

2019-12-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #8 from Erhard F. (erhar...@mailbox.org) --- Found out this is probably a cause for bug #205283. For doing some btrfs tests with 5.5-rc1 kernel I needed to disable KASAN in lib/raid6/Makefile (KASAN_SANITIZE := n) as btrfs pulls in rai

[Bug 205283] BUG: KASAN: global-out-of-bounds in _copy_to_iter+0x3d4/0x5a8

2019-12-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205283 --- Comment #3 from Erhard F. (erhar...@mailbox.org) --- Steps to reproduce: 1.) Configure G4 kernel with KASAN enabled 2.) Disable KASAN in lib/raid6/Makefile with KASAN_SANITIZE := n (to allow the btrfs module to load) 3.) # modprobe -v btrfs 4

[Bug 205283] BUG: KASAN: global-out-of-bounds in _copy_to_iter+0x3d4/0x5a8

2019-12-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205283 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Kernel Version|5.4-rc4 |5.5-rc1 See

[PATCH 10/10] Documentation/powerpc: VAS API

2019-12-15 Thread Haren Myneni
Power9 introduced Virtual Accelerator Switchboard (VAS) which allows userspace to communicate with Nest Accelerator (NX) directly. But kernel has to establish channel to NX for userspace. This document describes user space API that application can use to establish communication channel. Signed-o

[PATCH 09/10] powerpc/vas: Remove 'pid' in vas_tx_win_attr struct

2019-12-15 Thread Haren Myneni
When window is opened, pid reference is taken for user space windows. Not needed for kernel windows. So remove 'pid' in vas_tx_win_attr struct. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h| 1 - drivers/crypto/nx/nx-commom-powernv.c | 1 - 2 files changed, 2 deletions

[PATCH 08/10] crypto/NX: Add NX GZIP user space API

2019-12-15 Thread Haren Myneni
On power9, userspace can send GZIP compression requests directly to NX once kernel establishes NX channel / window. This patch provides GZIP engine access to user space via /dev/crypto/nx-gzip device node with open, VAS_TX_WIN_OPEN ioctl, mmap and close operations. Each window corresponds to fil

[PATCH 07/10] crypto/nx: Enable and setup GZIP compresstion type

2019-12-15 Thread Haren Myneni
Changes to probe GZIP device-tree nodes, open RX windows and setup GZIP compression type. No plans to provide GZIP usage in kernel right now, but this patch enables GZIP for user space usage. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-commom-powernv.c | 20 +++- 1 fil

[PATCH 06/10] crypto/NX: Make code generic to add new GZIP compression

2019-12-15 Thread Haren Myneni
Make code generic so that extend it to support new GZIP compression type. Changed nx842 reference to nx and moved some code to new functions. The actual functionality is not changed. Signed-off-by: Haren Myneni --- drivers/crypto/nx/nx-commom-powernv.c | 160 +-

[PATCH 05/10] crypto/nx: Organize powernv 842 code to add new GZIP compression type

2019-12-15 Thread Haren Myneni
Move common code for 842 and GZIP such as initializtion, read device tree entries and allocation of receive and send (kernel usage) windows to nx-common-powernv.c and keep 842 specific code in nx-842-powernv.c Signed-off-by: Haren Myneni --- drivers/crypto/nx/Makefile| 2 +- driv

[PATCH 04/10] crypto/nx: Initialize coproc entry with kzalloc

2019-12-15 Thread Haren Myneni
coproc entry is initialized during NX probe on power9, but not on P8. nx842_delete_coprocs() is used for both and frees receive window if it is allocated. Getting crash for rmmod on P8 since coproc->vas.rxwin is not initialized. This patch replaces kmalloc with kzalloc in nx842_powernv_probe()

[PATCH 03/10] powerpc/vas: Define VAS_TX_WIN_OPEN ioctl API

2019-12-15 Thread Haren Myneni
Define the VAS_TX_WIN_OPEN ioctl interface for NX GZIP access from user space. This interface is used to open GZIP send window and mmap region which can be used by userspace to send requests to NX directly with copy/paste instructions. Signed-off-by: Haren Myneni --- Documentation/ioctl/ioctl-

[PATCH 02/10] powerpc/vas: Initialize window attributes for GZIP compression

2019-12-15 Thread Haren Myneni
Initialize send and receive window attributes for GZIP high and normal priority types. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/vas-window.c

[PATCH 01/10] powerpc/vas: Define vas_win_paste_addr()

2019-12-15 Thread Haren Myneni
Define an interface that the NX drivers can use to find the physical paste address of a send window. This interface is expected to be used with the mmap() operation of the NX driver's device. i.e the user space process can use driver's mmap() operation to map the send window's paste address into

[PATCH 00/10] crypto/nx: Enable GZIP engine and provide userpace API

2019-12-15 Thread Haren Myneni
Power9 processor supports Virtual Accelerator Switchboard (VAS) which allows kernel and userspace to send compression requests to Nest Accelerator (NX) directly. The NX unit comprises of 2 842 compression engines and 1 GZIP engine. Linux kernel already has 842 compression support on kernel. This

Re: [PATCH 10/10] soc: qcom: convert to devm_platform_ioremap_resource

2019-12-15 Thread Frank Lee
On Sun, Dec 15, 2019 at 6:48 PM Marc Zyngier wrote: > > On Sat, 14 Dec 2019 17:54:47 + > Yangtao Li wrote: > > > Use devm_platform_ioremap_resource() to simplify code. > > > > Signed-off-by: Yangtao Li > > --- > > drivers/soc/qcom/llcc-qcom.c| 7 +-- > > drivers/soc/qcom/qcom-geni-s

Re: [PATCH 02/10] soc: samsung: convert to devm_platform_ioremap_resource

2019-12-15 Thread Krzysztof Kozlowski
On Sat, Dec 14, 2019 at 05:54:39PM +, Yangtao Li wrote: > Use devm_platform_ioremap_resource() to simplify code. > > Signed-off-by: Yangtao Li > --- > drivers/soc/samsung/exynos-pmu.c | 4 +--- Thanks, applied. Best regards, Krzysztof