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

2020-01-21 Thread Haren Myneni
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, encryption and etc. But only compression (842 and GZIP formats) is supported in

Re: [PATCH v2 net-next] net: convert suitable drivers to use phy_do_ioctl_running

2020-01-21 Thread Heiner Kallweit
On 22.01.2020 05:04, Florian Fainelli wrote: > > > On 1/21/2020 1:09 PM, Heiner Kallweit wrote: >> Convert suitable drivers to use new helper phy_do_ioctl_running. >> >> Signed-off-by: Heiner Kallweit > The vast majority of drivers that you are converting use the following > convention: > > -

Re: GCC bug ? Re: [PATCH v2 10/10] powerpc/32s: Implement Kernel Userspace Access Protection

2020-01-21 Thread Christophe Leroy
Le 21/01/2020 à 20:55, Segher Boessenkool a écrit : On Tue, Jan 21, 2020 at 05:22:32PM +, Christophe Leroy wrote: g1() should return 3, not 5. What makes you say that? "A return of 0 does not indicate that the value is _not_ a constant, but merely that GCC cannot prove it is a

Re: [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path

2020-01-21 Thread Kamalesh Babulal
On 1/22/20 10:25 AM, Bharata B Rao wrote: > When migrate_vma_setup() fails in kvmppc_svm_page_out(), > release kvm->arch.uvmem_lock before returning. > > Fixes: ca9f4942670 ("KVM: PPC: Book3S HV: Support for running secure guests") > Signed-off-by: Bharata B Rao Reviewed-by: Kamalesh Babulal

Re: GCC bug ? Re: [PATCH v2 10/10] powerpc/32s: Implement Kernel Userspace Access Protection

2020-01-21 Thread Christophe Leroy
Le 21/01/2020 à 20:55, Segher Boessenkool a écrit : On Tue, Jan 21, 2020 at 05:22:32PM +, Christophe Leroy wrote: g1() should return 3, not 5. What makes you say that? What makes me say that is that NULL is obviously a constant pointer and I think we are all expecting gcc to see it

[PATCH v4 1/2] powerpc/pseries/svm: Use FW_FEATURE to detect SVM

2020-01-21 Thread Sukadev Bhattiprolu
Use FW_FEATURE_SVM to detect a secure guest (SVM). This would be more efficient than calling mfmsr() frequently. Suggested-by: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/include/asm/firmware.h | 3 ++- arch/powerpc/include/asm/svm.h| 6 +-

[PATCH v4 2/2] powerpc/pseries/svm: Disable BHRB/EBB/PMU access

2020-01-21 Thread Sukadev Bhattiprolu
Ultravisor disables some CPU features like BHRB, EBB and PMU in secure virtual machines (SVMs) for now. Skip accessing those registers in SVMs to avoid getting a Program Interrupt. Basic performance monitoring in SVMs is likely to be enabled in the future after adding the necessary security

[PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path

2020-01-21 Thread Bharata B Rao
When migrate_vma_setup() fails in kvmppc_svm_page_out(), release kvm->arch.uvmem_lock before returning. Fixes: ca9f4942670 ("KVM: PPC: Book3S HV: Support for running secure guests") Signed-off-by: Bharata B Rao --- Applies on paulus/kvm-ppc-next branch arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +-

Re: [PATCH v5 0/4] KASAN for powerpc64 radix

2020-01-21 Thread Daniel Axtens
Christophe Leroy writes: > Le 09/01/2020 à 08:08, Daniel Axtens a écrit : >> Building on the work of Christophe, Aneesh and Balbir, I've ported >> KASAN to 64-bit Book3S kernels running on the Radix MMU. >> >> This provides full inline instrumentation on radix, but does require >> that you be

Re: [PATCH v2 net-next] net: convert suitable drivers to use phy_do_ioctl_running

2020-01-21 Thread Florian Fainelli
On 1/21/2020 1:09 PM, Heiner Kallweit wrote: > Convert suitable drivers to use new helper phy_do_ioctl_running. > > Signed-off-by: Heiner Kallweit The vast majority of drivers that you are converting use the following convention: - !netif_running -> return -EINVAL - !dev->phydev -> return

[PATCH] selftests/eeh: Bump EEH wait time to 60s

2020-01-21 Thread Oliver O'Halloran
Some newer cards supported by aacraid can take up to 40s to recover after an EEH event. This causes spurious failures in the basic EEH self-test since the current maximim timeout is only 30s. Fix the immediate issue by bumping the timeout to a default of 60s, and allow the wait time to be

Re: [PATCH v2 net-next] net: convert suitable drivers to use phy_do_ioctl_running

2020-01-21 Thread Timur Tabi
On 1/21/20 3:09 PM, Heiner Kallweit wrote: drivers/net/ethernet/qualcomm/emac/emac.c | 14 +- Acked-by: Timur Tabi

[PATCH v2 net-next] net: convert suitable drivers to use phy_do_ioctl_running

2020-01-21 Thread Heiner Kallweit
Convert suitable drivers to use new helper phy_do_ioctl_running. Signed-off-by: Heiner Kallweit --- v2: I forgot the netdev mailing list --- drivers/net/ethernet/allwinner/sun4i-emac.c| 15 +-- drivers/net/ethernet/amd/au1000_eth.c | 13 +

[PATCH net-next] net: convert suitable drivers to use phy_do_ioctl_running

2020-01-21 Thread Heiner Kallweit
Convert suitable drivers to use new helper phy_do_ioctl_running. Signed-off-by: Heiner Kallweit --- drivers/net/ethernet/allwinner/sun4i-emac.c| 15 +-- drivers/net/ethernet/amd/au1000_eth.c | 13 + drivers/net/ethernet/arc/emac_main.c | 14

Re: GCC bug ? Re: [PATCH v2 10/10] powerpc/32s: Implement Kernel Userspace Access Protection

2020-01-21 Thread Segher Boessenkool
On Tue, Jan 21, 2020 at 05:22:32PM +, Christophe Leroy wrote: > g1() should return 3, not 5. What makes you say that? "A return of 0 does not indicate that the value is _not_ a constant, but merely that GCC cannot prove it is a constant with the specified value of the '-O' option." (And

Re: [RFC 5/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-01-21 Thread Andi Kleen
> Here, '?' will be replaced with a runtime value and metric expression will > be replicated. Okay seems reasonable to me. Thanks, -Andi

Re: [PATCH v5 01/10] capabilities: introduce CAP_PERFMON to kernel and user space

2020-01-21 Thread Alexey Budankov
On 21.01.2020 20:55, Alexei Starovoitov wrote: > On Tue, Jan 21, 2020 at 9:31 AM Alexey Budankov > wrote: >> >> >> On 21.01.2020 17:43, Stephen Smalley wrote: >>> On 1/20/20 6:23 AM, Alexey Budankov wrote: Introduce CAP_PERFMON capability designed to secure system performance

Re: [PATCH v5 01/10] capabilities: introduce CAP_PERFMON to kernel and user space

2020-01-21 Thread Alexei Starovoitov
On Tue, Jan 21, 2020 at 9:31 AM Alexey Budankov wrote: > > > On 21.01.2020 17:43, Stephen Smalley wrote: > > On 1/20/20 6:23 AM, Alexey Budankov wrote: > >> > >> Introduce CAP_PERFMON capability designed to secure system performance > >> monitoring and observability operations so that CAP_PERFMON

Re: [PATCH v5 01/10] capabilities: introduce CAP_PERFMON to kernel and user space

2020-01-21 Thread Alexey Budankov
On 21.01.2020 17:43, Stephen Smalley wrote: > On 1/20/20 6:23 AM, Alexey Budankov wrote: >> >> Introduce CAP_PERFMON capability designed to secure system performance >> monitoring and observability operations so that CAP_PERFMON would assist >> CAP_SYS_ADMIN capability in its governing role for

GCC bug ? Re: [PATCH v2 10/10] powerpc/32s: Implement Kernel Userspace Access Protection

2020-01-21 Thread Christophe Leroy
On 04/18/2019 06:55 AM, Michael Ellerman wrote: Christophe Leroy writes: diff --git a/arch/powerpc/include/asm/book3s/32/kup.h b/arch/powerpc/include/asm/book3s/32/kup.h index 5f97c742ca71..b3560b2de435 100644 --- a/arch/powerpc/include/asm/book3s/32/kup.h +++

Re: [PATCH v5 01/10] capabilities: introduce CAP_PERFMON to kernel and user space

2020-01-21 Thread Stephen Smalley
On 1/20/20 6:23 AM, Alexey Budankov wrote: Introduce CAP_PERFMON capability designed to secure system performance monitoring and observability operations so that CAP_PERFMON would assist CAP_SYS_ADMIN capability in its governing role for perf_events, i915_perf and other performance monitoring

Re: [PATCH 1/3] powerpc/tm: Clear the current thread's MSR[TS] after treclaim

2020-01-21 Thread kbuild test robot
/linux/kernel/git/powerpc/linux.git next config: powerpc-randconfig-a001-20200121 (attached as .config) compiler: powerpc64le-linux-gcc (GCC) 7.5.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross

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

2020-01-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #24 from Erhard F. (erhar...@mailbox.org) --- Created attachment 286931 --> https://bugzilla.kernel.org/attachment.cgi?id=286931=edit screenshot (5.5-rc6+, KASAN_VMALLOC + VMAP_STACK + INLINE KASAN, PowerMac G4 DP) -- You are

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

2020-01-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #23 from Erhard F. (erhar...@mailbox.org) --- Created attachment 286929 --> https://bugzilla.kernel.org/attachment.cgi?id=286929=edit dmesg (kernel 5.5-rc6+, KASAN_VMALLOC + CONFIG_THREAD_SHIFT=14 + OUTLINE KASAN, PowerMac G4 DP)

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

2020-01-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #22 from Erhard F. (erhar...@mailbox.org) --- (In reply to Christophe Leroy from comment #19) > Can you tell exactly where it stops during the boot ? Or take a photo of the > screen ? I'll attach a photo shortly. > In parallele,

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

2020-01-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #21 from Erhard F. (erhar...@mailbox.org) --- Created attachment 286927 --> https://bugzilla.kernel.org/attachment.cgi?id=286927=edit dmesg (kernel 5.5-rc6+, KASAN_VMALLOC + CONFIG_THREAD_SHIFT=14 + INLINE KASAN, PowerMac G4 DP) --

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

2020-01-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #286871|0 |1 is obsolete|

Re: [PATCH RFC v1] mm: is_mem_section_removable() overhaul

2020-01-21 Thread Michal Hocko
On Mon 20-01-20 10:14:44, David Hildenbrand wrote: > On 20.01.20 08:48, Michal Hocko wrote: > > On Fri 17-01-20 08:57:51, Dan Williams wrote: > > [...] > >> Unless the user is willing to hold the device_hotplug_lock over the > >> evaluation then the result is unreliable. > > > > Do we want to

Re: [PATCH -next] powerpc/maple: fix comparing pointer to 0

2020-01-21 Thread Joe Perches
On Tue, 2020-01-21 at 01:47 -0600, Segher Boessenkool wrote: > On Mon, Jan 20, 2020 at 05:52:15PM -0800, Joe Perches wrote: > > On Tue, 2020-01-21 at 09:31 +0800, Chen Zhou wrote: > > > Fixes coccicheck warning: > > > ./arch/powerpc/platforms/maple/setup.c:232:15-16: > > > WARNING comparing

Re: [PATCH] powerpc/mm/hash: Fix the min context value used by userspace.

2020-01-21 Thread Nicholas Piggin
Aneesh Kumar K.V's on January 8, 2020 3:44 pm: > Without this kernel can endup with SLB entries as below > > 04 c00c0800 00066bde000a7510 256M ESID=c00c0 VSID= 66bde000a7 > LLP:110 > 12 0800 00066bde000a7d90 256M ESID=0 VSID= 66bde000a7 > LLP:110 > > Such

[PATCH v2 3/5] powerpc/perf: Add an interface sub-folder to imc pmu

2020-01-21 Thread Anju T Sudhakar
From: Madhavan Srinivasan Patch adds an interface attribute folder to imc pmu. This is intended to include pmu intreface capabilities which will be useful to userspace likes selftest testcases. Patch adds a "glob_lck" file to notify to userspace of global lock mechanism added to imc devices like

Re: [RFC 5/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-01-21 Thread kajoljain
On 1/17/20 9:58 PM, Andi Kleen wrote: On Fri, Jan 17, 2020 at 06:16:19PM +0530, Kajol Jain wrote: Patch enhances current metric infrastructure to handle "?" in the metric expression. The "?" can be use for parameters whose value not known while creating metric events and which can be replace

[PATCH v2 2/5] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-01-21 Thread Anju T Sudhakar
IMC(In-memory Collection Counters) does performance monitoring in two different modes, i.e accumulation mode(core-imc and thread-imc events), and trace mode(trace-imc events). A cpu thread can either be in accumulation-mode or trace-mode at a time and this is done via the LDBAR register in POWER

[PATCH v2 5/5] selftest/powerpc/pmu: Testcase for imc global lock mechanism

2020-01-21 Thread Anju T Sudhakar
From: Madhavan Srinivasan Signed-off-by: Madhavan Srinivasan --- .../pmu/mem_counters/imc_global_lock_test.c | 49 ++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/pmu/mem_counters/imc_global_lock_test.c

[PATCH v2 4/5] selftest/powerpc/pmc: Support to include interface test for Memory Counter PMUs

2020-01-21 Thread Anju T Sudhakar
From: Madhavan Srinivasan Patch to add support to include interface tests for memory counter PMUs as part of selftest. These PMUs are primarily used to understand socket/chip/core resourage usage. In PowerNV envirnoment, the perf interface registered to access these counters are called "In

[PATCH v2 1/5] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-01-21 Thread Anju T Sudhakar
commit <249fad734a25> ""powerpc/perf: Disable trace_imc pmu" disables IMC(In-Memory Collection) trace-mode in kernel, since frequent mode switching between accumulation mode and trace mode via the spr LDBAR in the hardware can trigger a checkstop(system crash). Patch to re-enable imc-trace mode

[PATCH v2 0/5] Re-enable IMC trace-mode

2020-01-21 Thread Anju T Sudhakar
commit <249fad734a25> ""powerpc/perf: Disable trace_imc pmu" disables IMC(In-Memory Collection) trace-mode in kernel, since frequent mode switching between accumulation mode and trace mode via the spr LDBAR in the hardware can trigger a checkstop(system crash). This patch

Re: [PATCH] powerpc/sysdev: fix compile errors

2020-01-21 Thread Christophe Leroy
Le 21/01/2020 à 07:59, 王文虎 a écrit : 发件人:Andrew Donnellan 发送日期:2020-01-21 14:13:07 收件人:wangwenhu ,Benjamin Herrenschmidt ,Paul Mackerras ,Michael Ellerman ,Kate Stewart ,Greg Kroah-Hartman ,Richard Fontana ,Thomas Gleixner ,linuxppc-dev@lists.ozlabs.org,linux-ker...@vger.kernel.org

Re: [PATCH v2 05/27] powerpc: Map & release OpenCAPI LPC memory

2020-01-21 Thread Greg Kurz
On Tue, 21 Jan 2020 17:46:12 +1100 Andrew Donnellan wrote: > On 3/12/19 2:46 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > This patch adds platform support to map & release LPC memory. > > Might want to explain what LPC is. > > Otherwise: > > Reviewed-by: Andrew Donnellan

Re: [PATCH] powerpc/sysdev: fix compile errors

2020-01-21 Thread Christophe Leroy
Le 21/01/2020 à 07:59, 王文虎 a écrit : 发件人:Andrew Donnellan 发送日期:2020-01-21 14:13:07 收件人:wangwenhu ,Benjamin Herrenschmidt ,Paul Mackerras ,Michael Ellerman ,Kate Stewart ,Greg Kroah-Hartman ,Richard Fontana ,Thomas Gleixner ,linuxppc-dev@lists.ozlabs.org,linux-ker...@vger.kernel.org