Re: [PATCH v2 1/2] kasan: support instrumented bitops combined with generic bitops

2019-08-29 Thread Daniel Axtens
Daniel Axtens writes: > 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 on x86 and s390, but is not always true: there is a > generic bitops/non-atomic.h header that provides generic

Re: [PATCH v7 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-29 Thread Bharata B Rao
On Thu, Aug 29, 2019 at 10:38:10AM +0200, Christoph Hellwig wrote: > On Thu, Aug 22, 2019 at 03:56:14PM +0530, Bharata B Rao wrote: > > +/* > > + * Bits 60:56 in the rmap entry will be used to identify the > > + * different uses/functions of rmap. > > + */ > > +#define KVMPPC_RMAP_DEVM_PFN

[PATCH v6 2/2] powerpc/xmon: Restrict when kernel is locked down

2019-08-29 Thread Christopher M. Riedl
Xmon should be either fully or partially disabled depending on the kernel lockdown state. Put xmon into read-only mode for lockdown=integrity and prevent user entry into xmon when lockdown=confidentiality. Xmon checks the lockdown state on every attempted entry: (1) during early xmon'ing (2)

[PATCH v6 0/2] Restrict xmon when kernel is locked down

2019-08-29 Thread Christopher M. Riedl
Xmon should be either fully or partially disabled depending on the kernel lockdown state. Put xmon into read-only mode for lockdown=integrity and completely disable xmon when lockdown=confidentiality. Since this can occur dynamically, there may be pre-existing, active breakpoints in xmon when

[PATCH v6 1/2] powerpc/xmon: Allow listing and clearing breakpoints in read-only mode

2019-08-29 Thread Christopher M. Riedl
Read-only mode should not prevent listing and clearing any active breakpoints. Tested-by: Daniel Axtens Reviewed-by: Daniel Axtens Signed-off-by: Christopher M. Riedl --- arch/powerpc/xmon/xmon.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] powerpc: Replace GPL boilerplate with SPDX identifiers

2019-08-29 Thread Russell Currey
On Wed, 2019-08-28 at 08:07 +0200, Thomas Huth wrote: > The FSF does not reside in "675 Mass Ave, Cambridge" anymore... > let's simply use proper SPDX identifiers instead. > > Signed-off-by: Thomas Huth Acked-by: Russell Currey

Re: [PATCH v2] powerpc/mm: Implement STRICT_MODULE_RWX

2019-08-29 Thread Russell Currey
On Wed, 2019-08-28 at 15:54 +0200, Christophe Leroy wrote: > Any plan to getting this applied soon ? Hey Christophe, I'm still working on it. Had to rework it for a few reasons, and it exposed a bug somewhere else. Hope to have another version out soon. - Russell > > Christophe

Singaporean Mr. Teo En Ming's Refugee Seeking Attempts

2019-08-29 Thread Turritopsis Dohrnii Teo En Ming
Subject: Singaporean Mr. Teo En Ming's Refugee Seeking Attempts In reverse chronological order: [1] Petition to the Government of Taiwan for Refugee Status, 5th August 2019 Monday Photo #1: At the building of the National Immigration Agency, Ministry of the Interior, Taipei, Taiwan, 5th

[PATCH] powerpc/64s/exceptions: Use keyword params to shorten arg lists

2019-08-29 Thread Michael Ellerman
The argument lists for the INT_HANDLER macro are getting a bit unwieldy. Use keyword parameters with default values to shorten them. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/exceptions-64s.S | 120 +-- 1 file changed, 60 insertions(+), 60 deletions(-)

[PATCH v5 5/5] kasan debug: track pages allocated for vmalloc shadow

2019-08-29 Thread Daniel Axtens
Provide the current number of vmalloc shadow pages in /sys/kernel/debug/kasan_vmalloc/shadow_pages. Signed-off-by: Daniel Axtens --- Merging this is probably overkill, but I leave it to the discretion of the broader community. On v4 (no dynamic freeing), I saw the following approximate

[PATCH v5 4/5] x86/kasan: support KASAN_VMALLOC

2019-08-29 Thread Daniel Axtens
In the case where KASAN directly allocates memory to back vmalloc space, don't map the early shadow page over it. We prepopulate pgds/p4ds for the range that would otherwise be empty. This is required to get it synced to hardware on boot, allowing the lower levels of the page tables to be filled

[PATCH v5 3/5] fork: support VMAP_STACK with KASAN_VMALLOC

2019-08-29 Thread Daniel Axtens
Supporting VMAP_STACK with KASAN_VMALLOC is straightforward: - clear the shadow region of vmapped stacks when swapping them in - tweak Kconfig to allow VMAP_STACK to be turned on with KASAN Reviewed-by: Dmitry Vyukov Signed-off-by: Daniel Axtens --- arch/Kconfig | 9 +

[PATCH v5 2/5] kasan: add test for vmalloc

2019-08-29 Thread Daniel Axtens
Test kasan vmalloc support by adding a new test to the module. Signed-off-by: Daniel Axtens -- v5: split out per Christophe Leroy --- lib/test_kasan.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index

[PATCH v5 1/5] kasan: support backing vmalloc space with real shadow memory

2019-08-29 Thread Daniel Axtens
Hook into vmalloc and vmap, and dynamically allocate real shadow memory to back the mappings. Most mappings in vmalloc space are small, requiring less than a full page of shadow space. Allocating a full shadow page per mapping would therefore be wasteful. Furthermore, to ensure that different

[PATCH v5 0/5] kasan: support backing vmalloc space with real shadow memory

2019-08-29 Thread Daniel Axtens
Currently, vmalloc space is backed by the early shadow page. This means that kasan is incompatible with VMAP_STACK. This series provides a mechanism to back vmalloc space with real, dynamically allocated memory. I have only wired up x86, because that's the only currently supported arch I can work

[PATCH] net/ibmvnic: free reset work of removed device from queue

2019-08-29 Thread Juliet Kim
Commit 36f1031c51a2 ("ibmvnic: Do not process reset during or after device removal") made the change to exit reset if the driver has been removed, but does not free reset work items of the adapter from queue. Ensure all reset work items are freed when breaking out of the loop early. Fixes:

Re: [PATCH v2 0/4] powerpc/64: syscalls in C

2019-08-29 Thread Nicholas Piggin
Nicholas Piggin's on August 30, 2019 1:49 am: >> This doesn't do what you think, or what you want, or what you think you >> want ;-) > > After reading gcc docs from gcc 4 to 9, I think it does. > > We want this to apply to all functions in the compilaition unit. It's > fine to use the regs

[PATCH v5 5/5] powerpc/perf: split callchain.c by bitness

2019-08-29 Thread Michal Suchanek
Building callchain.c with !COMPAT proved quite ugly with all the defines. Splitting out the 32bit and 64bit parts looks better. Also rewrite current_is_64bit as common function. No other code change intended. Signed-off-by: Michal Suchanek --- arch/powerpc/perf/Makefile | 4 +

[PATCH v5 4/5] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-08-29 Thread Michal Suchanek
On bigendian ppc64 it is common to have 32bit legacy binaries but much less so on littleendian. Signed-off-by: Michal Suchanek --- v3: make configurable --- arch/powerpc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig

[PATCH v5 3/5] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Michal Suchanek
There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek --- v2: - fix 32bit ifdef condition in signal.c - simplify the compat ifdef condition in vdso.c - 64bit is redundant - simplify the compat ifdef condition in callchain.c -

[PATCH v5 2/5] powerpc: move common register copy functions from signal_32.c to signal.c

2019-08-29 Thread Michal Suchanek
These functions are required for 64bit as well. Signed-off-by: Michal Suchanek --- arch/powerpc/kernel/signal.c| 141 arch/powerpc/kernel/signal_32.c | 140 --- 2 files changed, 141 insertions(+), 140 deletions(-) diff --git

[PATCH v5 1/5] powerpc: make llseek 32bit-only.

2019-08-29 Thread Michal Suchanek
The llseek syscall is not built in fs/read_write.c when !64bit && !COMPAT With the syscall marked as common in syscall.tbl build fails in this case. The llseek inteface does not make sense on 64bit and it is explicitly described as 32bit interface. Use on 64bit is not well-defined so just drop it

[PATCH v5 0/5] Disable compat cruft on ppc64le v5

2019-08-29 Thread Michal Suchanek
Less code means less bugs so add a knob to skip the compat stuff. This is tested on ppc64le top of https://patchwork.ozlabs.org/cover/1153556/ Changes in v2: saner CONFIG_COMPAT ifdefs Changes in v3: - change llseek to 32bit instead of builing it unconditionally in fs - clanup the makefile

Re: [PATCH 1/3] scsi: cxlflash: Fix fallthrough warnings.

2019-08-29 Thread Michal Suchánek
On Thu, 29 Aug 2019 15:34:08 -0500 Uma Krishnan wrote: > Below commit queued up for 5.4 includes these changes. > > commit 657bd277c162580674ddb86a90c4aeb62639bff5 > Author: Gustavo A. R. Silva > Date:   Sun Jul 28 19:21:19 2019 -0500 > > Thanks, > Uma Krishnan Works for me as well. Thanks

Re: [PATCH 1/3] scsi: cxlflash: Fix fallthrough warnings.

2019-08-29 Thread Uma Krishnan
Below commit queued up for 5.4 includes these changes. commit 657bd277c162580674ddb86a90c4aeb62639bff5 Author: Gustavo A. R. Silva Date: Sun Jul 28 19:21:19 2019 -0500 Thanks, Uma Krishnan > On Aug 29, 2019, at 7:32 AM, Michal Suchanek wrote: > > Add fallthrough comments where missing. >

Re: [PATCH 1/3] scsi: cxlflash: Fix fallthrough warnings.

2019-08-29 Thread Uma Krishnan
Below commit queued up for 5.4 includes these changes.commit 657bd277c162580674ddb86a90c4aeb62639bff5Author: Gustavo A. R. Silva Date:   Sun Jul 28 19:21:19 2019 -0500Thanks,Uma KrishnanOn Aug 29, 2019, at 7:32 AM, Michal Suchanek wrote:Add fallthrough comments where missing.Signed-off-by: Michal

[tip: perf/core] perf arch powerpc: Sync powerpc syscall.tbl

2019-08-29 Thread tip-bot2 for Naveen N. Rao
The following commit has been merged into the perf/core branch of tip: Commit-ID: 0a56e0603fa13af08816d673f6f71b68cda2fb2e Gitweb: https://git.kernel.org/tip/0a56e0603fa13af08816d673f6f71b68cda2fb2e Author:Naveen N. Rao AuthorDate:Tue, 27 Aug 2019 12:44:58 +05:30

Re: [PATCH v1 2/2] PCI/AER: Update parameter descriptions to satisfy kernel-doc validator

2019-08-29 Thread Kuppuswamy Sathyanarayanan
On 8/27/19 8:18 AM, Andy Shevchenko wrote: Kernel-doc validator complains: aer.c:207: warning: Function parameter or member 'str' not described in 'pcie_ecrc_get_policy' aer.c:1209: warning: Function parameter or member 'irq' not described in 'aer_isr' aer.c:1209: warning: Function

Re: [PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-08-29 Thread Kuppuswamy Sathyanarayanan
On 8/27/19 8:18 AM, Andy Shevchenko wrote: This simplifies and standardizes slot manipulation code by using for_each_set_bit() library function. Signed-off-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/pcie/aer.c | 19 --- 1 file changed, 8

Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Michal Suchánek
On Thu, 29 Aug 2019 16:32:50 +0200 Arnd Bergmann wrote: > On Thu, Aug 29, 2019 at 4:19 PM Michal Suchánek wrote: > > On Thu, 29 Aug 2019 14:57:39 +0200 Arnd Bergmann wrote: > > > On Thu, Aug 29, 2019 at 2:37 PM Michal Suchánek > > > wrote: > > > > On Thu, 29 Aug 2019 14:19:46 +0200 Arnd

Re: [PATCH v7 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-29 Thread Sukadev Bhattiprolu
Bharata B Rao [bhar...@linux.ibm.com] wrote: > On Wed, Aug 28, 2019 at 08:02:19PM -0700, Sukadev Bhattiprolu wrote: > > Some minor comments/questions below. Overall, the patches look > > fine to me. > > > > > +#include > > > +#include > > > +#include > > > +#include > > > + > > > +static

Re: [PATCH v4 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Michal Suchánek
On Thu, 29 Aug 2019 19:40:55 +0200 Christophe Leroy wrote: > Le 29/08/2019 à 12:23, Michal Suchanek a écrit : > > There are numerous references to 32bit functions in generic and 64bit > > code so ifdef them out. > > > > Signed-off-by: Michal Suchanek > > --- > > v2: > > - fix 32bit ifdef

[PATCH AUTOSEL 4.4 04/15] ibmveth: Convert multicast list size for little-endian system

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ] The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet

[PATCH AUTOSEL 4.9 04/16] ibmveth: Convert multicast list size for little-endian system

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ] The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet

[PATCH AUTOSEL 4.14 06/27] ibmveth: Convert multicast list size for little-endian system

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ] The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet

[PATCH AUTOSEL 4.19 25/45] ibmvnic: Unmap DMA address of TX descriptor buffers after use

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 80f0fe0934cd3daa13a5e4d48a103f469115b160 ] There's no need to wait until a completion is received to unmap TX descriptor buffers that have been passed to the hypervisor. Instead unmap it when the hypervisor call has completed. This patch avoids the

[PATCH AUTOSEL 4.19 09/45] ibmveth: Convert multicast list size for little-endian system

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ] The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet

[PATCH AUTOSEL 5.2 43/76] ibmvnic: Unmap DMA address of TX descriptor buffers after use

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 80f0fe0934cd3daa13a5e4d48a103f469115b160 ] There's no need to wait until a completion is received to unmap TX descriptor buffers that have been passed to the hypervisor. Instead unmap it when the hypervisor call has completed. This patch avoids the

[PATCH AUTOSEL 5.2 22/76] ibmveth: Convert multicast list size for little-endian system

2019-08-29 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ] The ibm,mac-address-filters property defines the maximum number of addresses the hypervisor's multicast filter list can support. It is encoded as a big-endian integer in the OF device tree, but the virtual ethernet

Re: [PATCH v4 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Christophe Leroy
Le 29/08/2019 à 12:23, Michal Suchanek a écrit : There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek --- v2: - fix 32bit ifdef condition in signal.c - simplify the compat ifdef condition in vdso.c - 64bit is redundant

Re: [PATCH] sefltest/ima: support appended signatures (modsig)

2019-08-29 Thread Jordan Hand
On 8/28/19 5:39 AM, Mimi Zohar wrote: > Detect and allow appended signatures. Ran the tests successfully on x86_64 QEMU Reviewed-by: Jordan Hand Tested-by: Jordan Hand

[PATCH v2 1/2] powerpc: Add PowerPC Capabilities ELF note

2019-08-29 Thread Maxiwell S. Garcia
From: Claudio Carvalho Add the PowerPC name and the PPC_ELFNOTE_CAPABILITIES type in the kernel binary ELF note. This type is a bitmap that can be used to advertise kernel capabilities to userland. This patch also defines PPCCAP_ULTRAVISOR_BIT as being the bit zero. Suggested-by: Paul

[PATCH v2 2/2] docs: powerpc: Add ELF note documentation

2019-08-29 Thread Maxiwell S. Garcia
The ELF note documentation describes the types and descriptors to be used with the PowerPC namespace. Signed-off-by: Maxiwell S. Garcia Signed-off-by: Claudio Carvalho --- Documentation/powerpc/elfnote.rst | 42 +++ 1 file changed, 42 insertions(+) create mode

[PATCH v2 0/2] powerpc: Add PowerPC Capabilities ELF note

2019-08-29 Thread Maxiwell S. Garcia
The first patch adds the PowerPC name and the PPC_ELFNOTE_CAPABILITIES type in the kernel binary ELF note. This type is a bitmap that can be used to advertise kernel capabilities to userland. The second patch adds a new documentation file to detail the ELF Note PowerPC namespace and the

Re: [PATCH v2 0/4] powerpc/64: syscalls in C

2019-08-29 Thread Nicholas Piggin
Segher Boessenkool's on August 29, 2019 9:51 pm: > On Thu, Aug 29, 2019 at 07:38:01PM +1000, Nicholas Piggin wrote: >> So... this actually seems to work. Haven't booted it, but the compiler >> seems to do what we want. > > From the GCC manual: > >After defining a global register variable,

Re: remove default fallbacks in dma_map_ops v3

2019-08-29 Thread Christoph Hellwig
I've applied this to the dma-mapping for-next tree now. If there are any issues with the parisc patch I'll happily take incremental patches.

Re: cleanup the dma_pgprot handling v2

2019-08-29 Thread Christoph Hellwig
I've pulled this into the dma-mapping for-next tree now.

[PATCH 01/37] perf arch powerpc: Sync powerpc syscall.tbl

2019-08-29 Thread Arnaldo Carvalho de Melo
From: "Naveen N. Rao" Copy over powerpc syscall.tbl to grab changes from the below commits: commit cee3536d24a1 ("powerpc: Wire up clone3 syscall") commit 1a271a68e030 ("arch: mark syscall number 435 reserved for clone3") commit 7615d9e1780e ("arch: wire-up pidfd_open()") commit

Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Arnd Bergmann
On Thu, Aug 29, 2019 at 4:19 PM Michal Suchánek wrote: > On Thu, 29 Aug 2019 14:57:39 +0200 Arnd Bergmann wrote: > > On Thu, Aug 29, 2019 at 2:37 PM Michal Suchánek wrote: > > > On Thu, 29 Aug 2019 14:19:46 +0200 Arnd Bergmann wrote: > > > > On Thu, Aug 29, 2019 at 12:23 PM Michal Suchanek >

Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Michal Suchánek
On Thu, 29 Aug 2019 14:57:39 +0200 Arnd Bergmann wrote: > On Thu, Aug 29, 2019 at 2:37 PM Michal Suchánek wrote: > > On Thu, 29 Aug 2019 14:19:46 +0200 Arnd Bergmann wrote: > > > On Thu, Aug 29, 2019 at 12:23 PM Michal Suchanek > > > wrote: > > > In particular, I don't see why you single

RE: [PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-08-29 Thread David Laight
From: Nathan Chancellor > Sent: 28 August 2019 19:45 ... > However, I think that -fno-builtin-* would be appropriate here because > we are providing our own setjmp implementation, meaning clang should not > be trying to do anything with the builtin implementation like building a > declaration for

Re: [PATCH RESEND v11 7/8] open: openat2(2) syscall

2019-08-29 Thread Aleksa Sarai
On 2019-08-29, Rasmus Villemoes wrote: > On 29/08/2019 14.15, Aleksa Sarai wrote: > > On 2019-08-24, Daniel Colascione wrote: > > >> Why pad the structure when new functionality (perhaps accommodated via > >> a larger structure) could be signaled by passing a new flag? Adding > >> reserved

Re: [PATCH RESEND v11 7/8] open: openat2(2) syscall

2019-08-29 Thread Rasmus Villemoes
On 29/08/2019 14.15, Aleksa Sarai wrote: > On 2019-08-24, Daniel Colascione wrote: >> Why pad the structure when new functionality (perhaps accommodated via >> a larger structure) could be signaled by passing a new flag? Adding >> reserved fields to a structure with a size embedded in the ABI

Re: [PATCH] powerpc/mm: tell if a bad page fault on data is read or write.

2019-08-29 Thread Christophe Leroy
Le 29/08/2019 à 14:14, Michael Ellerman a écrit : Christophe Leroy writes: DSISR has a bit to tell if the fault is due to a read or a write. Except some CPUs don't have a DSISR? Which is why we have page_fault_is_write() that's used in __do_page_fault(). Or is that old cruft? I see eg.

Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Arnd Bergmann
On Thu, Aug 29, 2019 at 2:37 PM Michal Suchánek wrote: > On Thu, 29 Aug 2019 14:19:46 +0200 Arnd Bergmann wrote: > > On Thu, Aug 29, 2019 at 12:23 PM Michal Suchanek wrote: > > In particular, I don't see why you single out llseek here, but leave other > > syscalls that are not needed on 64-bit

Re: [PATCH v5 1/2] powerpc/xmon: Allow listing and clearing breakpoints in read-only mode

2019-08-29 Thread Christopher M Riedl
> On August 29, 2019 at 1:40 AM Daniel Axtens wrote: > > > Hi Chris, > > > Read-only mode should not prevent listing and clearing any active > > breakpoints. > > I tested this and it works for me: > > Tested-by: Daniel Axtens > > > + if (xmon_is_ro || !scanhex()) { > > It took

Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Michal Suchánek
On Thu, 29 Aug 2019 14:19:46 +0200 Arnd Bergmann wrote: > On Thu, Aug 29, 2019 at 12:23 PM Michal Suchanek wrote: > > > > Fixes: aff850393200 ("powerpc: add system call table generation support") > > This patch needs a proper explanation. The Fixes tag doesn't seem right > here, since ppc64

Re: [PATCH v5 2/2] powerpc/xmon: Restrict when kernel is locked down

2019-08-29 Thread Christopher M Riedl
> On August 29, 2019 at 2:43 AM Daniel Axtens wrote: > > > Hi, > > > Xmon should be either fully or partially disabled depending on the > > kernel lockdown state. > > I've been kicking the tyres of this, and it seems to work well: > > Tested-by: Daniel Axtens > Thank you for taking the

[PATCH 1/3] scsi: cxlflash: Fix fallthrough warnings.

2019-08-29 Thread Michal Suchanek
Add fallthrough comments where missing. Signed-off-by: Michal Suchanek --- drivers/scsi/cxlflash/main.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index b1f4724efde2..f402fa9a7bec 100644 ---

[PATCH 2/3] scsi: ibmvfc: Fix fallthrough warnings.

2019-08-29 Thread Michal Suchanek
Add fallthrough comments where they are missing. Signed-off-by: Michal Suchanek --- drivers/scsi/ibmvscsi/ibmvfc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 8cdbac076a1b..2a06a5b4d3a5 100644 ---

[PATCH 3/3] scsi: ibmvscsi: tgt: Fix fallthrough warnings.

2019-08-29 Thread Michal Suchanek
Add fallthrough comments where they are missing. Signed-off-by: Michal Suchanek --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index

[PATCH 0/3] Fix fallthrough warnings.

2019-08-29 Thread Michal Suchanek
Build with recent compiler results in numerous fallthrough warnings. The code looks correct to me so just adding the comments to quiet gcc. Please review if the fallthrough was really intentional. Thanks Michal Michal Suchanek (3): scsi: cxlflash: Fix fallthrough warnings. scsi: ibmvfc:

Re: [PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Arnd Bergmann
On Thu, Aug 29, 2019 at 12:23 PM Michal Suchanek wrote: > > Fixes: aff850393200 ("powerpc: add system call table generation support") This patch needs a proper explanation. The Fixes tag doesn't seem right here, since ppc64 has had llseek since the start in 2002 commit 3939e37587e7 ("Add ppc64

Re: [PATCH RESEND v11 7/8] open: openat2(2) syscall

2019-08-29 Thread Aleksa Sarai
On 2019-08-24, Daniel Colascione wrote: > On Mon, Aug 19, 2019 at 8:37 PM Aleksa Sarai wrote: > > > > The most obvious syscall to add support for the new LOOKUP_* scoping > > flags would be openat(2). However, there are a few reasons why this is > > not the best course of action: > > > > * The

Re: [PATCH] powerpc/mm: tell if a bad page fault on data is read or write.

2019-08-29 Thread Michael Ellerman
Christophe Leroy writes: > DSISR has a bit to tell if the fault is due to a read or a write. Except some CPUs don't have a DSISR? Which is why we have page_fault_is_write() that's used in __do_page_fault(). Or is that old cruft? I see eg. in head_40x.S we pass r5=0 for error code, and we

Re: [PATCH v2 0/4] powerpc/64: syscalls in C

2019-08-29 Thread Segher Boessenkool
On Thu, Aug 29, 2019 at 07:38:01PM +1000, Nicholas Piggin wrote: > So... this actually seems to work. Haven't booted it, but the compiler > seems to do what we want. >From the GCC manual: After defining a global register variable, for the current compilation unit: * If the register is

RE: [PATCH] powerpc/kmcent2: update the ethernet devices' phy properties

2019-08-29 Thread Madalin-cristian Bucur
> -Original Message- > From: Scott Wood > Sent: Wednesday, August 28, 2019 7:19 AM > To: Valentin Longchamp ; Madalin-cristian Bucur > > Cc: linuxppc-dev@lists.ozlabs.org; ga...@kernel.crashing.org; > net...@vger.kernel.org > Subject: Re: [PATCH] powerpc/kmcent2: update the ethernet

[PATCH AUTOSEL 4.14 06/14] powerpc/64: mark start_here_multiplatform as __ref

2019-08-29 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 9c4e4c90ec24652921e31e9551fcaedc26eec86d ] Otherwise, the following warning is encountered: WARNING: vmlinux.o(.text+0x3dc6): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:.early_setup() The

[PATCH AUTOSEL 4.19 12/29] powerpc/64: mark start_here_multiplatform as __ref

2019-08-29 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 9c4e4c90ec24652921e31e9551fcaedc26eec86d ] Otherwise, the following warning is encountered: WARNING: vmlinux.o(.text+0x3dc6): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:.early_setup() The

Re: [PATCH v2 0/4] powerpc/64: syscalls in C

2019-08-29 Thread Nicholas Piggin
Nicholas Piggin's on August 29, 2019 7:38 pm: > Christophe Leroy's on August 28, 2019 7:55 pm: >> >> >> Le 28/08/2019 à 11:49, Nicholas Piggin a écrit : >>> Christophe Leroy's on August 28, 2019 7:06 pm: Le 27/08/2019 à 15:55, Nicholas Piggin a écrit : > Accounted for some

Re: [PATCH v4 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Michal Suchánek
On Thu, 29 Aug 2019 12:23:42 +0200 Michal Suchanek wrote: > There are numerous references to 32bit functions in generic and 64bit > code so ifdef them out. > > Signed-off-by: Michal Suchanek > --- > v2: > - fix 32bit ifdef condition in signal.c > - simplify the compat ifdef condition in vdso.c

[PATCH v4 4/4] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-08-29 Thread Michal Suchanek
On bigendian ppc64 it is common to have 32bit legacy binaries but much less so on littleendian. Signed-off-by: Michal Suchanek --- v3: make configurable --- arch/powerpc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig

[PATCH v4 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Michal Suchanek
There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek --- v2: - fix 32bit ifdef condition in signal.c - simplify the compat ifdef condition in vdso.c - 64bit is redundant - simplify the compat ifdef condition in callchain.c -

[PATCH v4 2/4] powerpc: move common register copy functions from signal_32.c to signal.c

2019-08-29 Thread Michal Suchanek
These functions are required for 64bit as well. Signed-off-by: Michal Suchanek --- arch/powerpc/kernel/signal.c| 141 arch/powerpc/kernel/signal_32.c | 140 --- 2 files changed, 141 insertions(+), 140 deletions(-) diff --git

[PATCH v4 1/4] powerpc: make llseek 32bit-only.

2019-08-29 Thread Michal Suchanek
Fixes: aff850393200 ("powerpc: add system call table generation support") Signed-off-by: Michal Suchanek --- arch/powerpc/kernel/syscalls/syscall.tbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl

[PATCH v4 0/4] Disable compat cruft on ppc64le v4

2019-08-29 Thread Michal Suchanek
Less code means less bugs so add a knob to skip the compat stuff. This is tested on ppc64le top of https://patchwork.ozlabs.org/cover/1153556/ Changes in v2: saner CONFIG_COMPAT ifdefs Changes in v3: - change llseek to 32bit instead of builing it unconditionally in fs - clanup the makefile

Re: [PATCH 1/4] fs: always build llseek.

2019-08-29 Thread Michal Suchánek
On Wed, 28 Aug 2019 23:22:00 -0700 Christoph Hellwig wrote: > On Wed, Aug 28, 2019 at 06:15:40PM +0200, Michal Suchánek wrote: > > On Wed, 28 Aug 2019 08:15:52 -0700 > > Christoph Hellwig wrote: > > > > > On Tue, Aug 27, 2019 at 10:21:06PM +0200, Michal Suchanek wrote: > > > > 64bit

Re: [PATCH v3 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Michal Suchánek
On Wed, 28 Aug 2019 23:46:24 -0700 Christoph Hellwig wrote: > On Wed, Aug 28, 2019 at 06:43:50PM +0200, Michal Suchanek wrote: > > +ifdef CONFIG_COMPAT > > +obj-y += sys_ppc32.o ptrace32.o signal_32.o > > +endif > > This should be: > > obj-$(CONFIG_COMPAT)

Re: [PATCH] powerpc: use the generic dma coherent remap allocator

2019-08-29 Thread Michael Ellerman
Christoph Hellwig writes: > On Wed, Aug 28, 2019 at 11:34:09PM +1000, Michael Ellerman wrote: >> Christoph Hellwig writes: >> > Michael, >> > >> > do oyu plan to pick this up? Otherwise I'd love to pick it up through >> > the dma-mapping tree as that would avoid one trivial conflict with >> >

Re: [PATCH v2 0/4] powerpc/64: syscalls in C

2019-08-29 Thread Nicholas Piggin
Christophe Leroy's on August 28, 2019 7:55 pm: > > > Le 28/08/2019 à 11:49, Nicholas Piggin a écrit : >> Christophe Leroy's on August 28, 2019 7:06 pm: >>> >>> >>> Le 27/08/2019 à 15:55, Nicholas Piggin a écrit : Accounted for some feedback. Nicholas Piggin (4): powerpc:

RE: [PATCH v2 04/10] dt-bindings: pci: layerscape-pci: add compatible strings for ls1088a and ls2088a

2019-08-29 Thread Xiaowei Bao
> -Original Message- > From: Rob Herring > Sent: 2019年8月28日 6:26 > To: Xiaowei Bao > Cc: bhelg...@google.com; mark.rutl...@arm.com; shawn...@kernel.org; > Leo Li ; kis...@ti.com; lorenzo.pieral...@arm.co; > a...@arndb.de; gre...@linuxfoundation.org; M.h. Lian > ; Mingkai Hu ; Roy Zang

Re: [PATCH 2/2] powerpc/nvdimm: use H_SCM_QUERY hcall on H_OVERLAP error

2019-08-29 Thread Oliver O'Halloran
On Thu, Aug 29, 2019 at 6:21 PM Aneesh Kumar K.V wrote: > > On 8/29/19 1:29 PM, Oliver O'Halloran wrote: > > On Thu, Aug 29, 2019 at 4:34 PM Aneesh Kumar K.V > > wrote: > >> > >> Right now we force an unbind of SCM memory at drcindex on H_OVERLAP error. > >> This really slows down operations

[PATCH kernel v3 1/5] powerpc/powernv/ioda: Split out TCE invalidation from TCE updates

2019-08-29 Thread Alexey Kardashevskiy
At the moment updates in a TCE table are made by iommu_table_ops::exchange which update one TCE and invalidates an entry in the PHB/NPU TCE cache via set of registers called "TCE Kill" (hence the naming). Writing a TCE is a simple xchg() but invalidating the TCE cache is a relatively expensive

[PATCH kernel v3 5/5] powerpc/powernv/ioda: Remove obsolete iommu_table_ops::exchange callbacks

2019-08-29 Thread Alexey Kardashevskiy
As now we have xchg_no_kill/tce_kill, these are not used anymore so remove them. Signed-off-by: Alexey Kardashevskiy --- arch/powerpc/include/asm/iommu.h | 10 - arch/powerpc/kernel/iommu.c | 26 +--- arch/powerpc/platforms/powernv/pci-ioda.c | 50

[PATCH kernel v3 4/5] powerpc/pseries/iommu: Switch to xchg_no_kill

2019-08-29 Thread Alexey Kardashevskiy
This is the last implementation of iommu_table_ops::exchange() which we are about to remove. This implements xchg_no_kill() for pseries. Since it is paravirtual platform, the hypervisor does TCE invalidations and we do not have to deal with it here, hence no tce_kill() hook. Signed-off-by:

[PATCH kernel v3 3/5] vfio/spapr_tce: Invalidate multiple TCEs at once

2019-08-29 Thread Alexey Kardashevskiy
Invalidating a TCE cache entry for each updated TCE is quite expensive. This makes use of the new iommu_table_ops::xchg_no_kill()/tce_kill() callbacks to bring down the time spent in mapping a huge guest DMA window. Signed-off-by: Alexey Kardashevskiy --- drivers/vfio/vfio_iommu_spapr_tce.c |

[PATCH kernel v3 2/5] KVM: PPC: Book3S: Invalidate multiple TCEs at once

2019-08-29 Thread Alexey Kardashevskiy
Invalidating a TCE cache entry for each updated TCE is quite expensive. This makes use of the new iommu_table_ops::xchg_no_kill()/tce_kill() callbacks to bring down the time spent in mapping a huge guest DMA window; roughly 20s to 10s for each guest's 100GB of DMA space. Signed-off-by: Alexey

[PATCH kernel v3 0/5] powerpc/powernv/kvm: Invalidate multiple TCEs at once

2019-08-29 Thread Alexey Kardashevskiy
So far TCE cache updates (IOMMU translation cache on POWER8/9 PHB/NPU units) were barely noticeable; however with 100+GB guests we now see RCU stall warnings in guests because we spend too much time in the host system firmware which does actual TCE cache updates, hence this patchset. This is a

Re: [PATCH v3 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Arnd Bergmann
On Thu, Aug 29, 2019 at 10:38 AM Christophe Leroy wrote: > Le 29/08/2019 à 10:01, Arnd Bergmann a écrit : > > On Thu, Aug 29, 2019 at 8:46 AM Christoph Hellwig > > wrote: > > > >>> @@ -277,7 +277,7 @@ static void do_signal(struct task_struct *tsk) > >>> > >>>rseq_signal_deliver(,

[PATCH v3 1/2] powerpc: permanently include 8xx registers in reg.h

2019-08-29 Thread Christophe Leroy
Most 8xx registers have specific names, so just include reg_8xx.h all the time in reg.h in order to have them defined even when CONFIG_PPC_8xx is not selected. This will avoid the need for #ifdefs in C code. Guard SPRN_ICTRL in an #ifdef CONFIG_PPC_8xx as this register has same name but different

[PATCH v3 2/2] powerpc: cleanup hw_irq.h

2019-08-29 Thread Christophe Leroy
SET_MSR_EE() is just use in this file and doesn't provide any added value compared to mtmsr(). Drop it. Add a wrtee() inline function to use wrtee/wrteei insn. Replace #ifdefs by IS_ENABLED() Signed-off-by: Christophe Leroy --- v2: Changed wrtee()/wrteei() to a single wrtee() inline which

[PATCH kernel v2] powerpc/of/pci: Rewrite pci_parse_of_flags

2019-08-29 Thread Alexey Kardashevskiy
The existing code uses bunch of hardcoded values from the PCI Bus Binding to IEEE Std 1275 spec; and it does so in quite non-obvious way. This defines fields from the cell#0 of the "reg" property of a PCI device and uses them for parsing. This should cause no behavioral change. Signed-off-by:

Re: [PATCH v7 4/7] kvmppc: Handle memory plug/unplug to secure VM

2019-08-29 Thread Christoph Hellwig
On Thu, Aug 22, 2019 at 03:56:17PM +0530, Bharata B Rao wrote: > + /* > + * TODO: Handle KVM_MR_MOVE > + */ > + if (change == KVM_MR_CREATE) { > + uv_register_mem_slot(kvm->arch.lpid, > + new->base_gfn << PAGE_SHIFT, > +

Re: [PATCH v3 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Christophe Leroy
Le 29/08/2019 à 10:01, Arnd Bergmann a écrit : On Thu, Aug 29, 2019 at 8:46 AM Christoph Hellwig wrote: @@ -277,7 +277,7 @@ static void do_signal(struct task_struct *tsk) rseq_signal_deliver(, tsk->thread.regs); - if (is32) { + if ((IS_ENABLED(CONFIG_PPC32) ||

Re: [PATCH v7 1/7] kvmppc: Driver to manage pages of secure guest

2019-08-29 Thread Christoph Hellwig
On Thu, Aug 22, 2019 at 03:56:14PM +0530, Bharata B Rao wrote: > +/* > + * Bits 60:56 in the rmap entry will be used to identify the > + * different uses/functions of rmap. > + */ > +#define KVMPPC_RMAP_DEVM_PFN (0x2ULL << 56) How did you come up with this specific value? > + > +static inline

Re: [PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-08-29 Thread Segher Boessenkool
On Wed, Aug 28, 2019 at 03:16:19PM -0700, Nick Desaulniers wrote: > That's a good reason IMO. IIRC, the -fno-builtin-* flags don't warn > if * is some unrecognized value, so -fno-builtin-setjmp may not > actually do anything, and you may need to scan the source (of clang or > llvm).

Re: [PATCH 2/2] powerpc/nvdimm: use H_SCM_QUERY hcall on H_OVERLAP error

2019-08-29 Thread Aneesh Kumar K.V
On 8/29/19 1:29 PM, Oliver O'Halloran wrote: On Thu, Aug 29, 2019 at 4:34 PM Aneesh Kumar K.V wrote: Right now we force an unbind of SCM memory at drcindex on H_OVERLAP error. This really slows down operations like kexec where we get the H_OVERLAP error because we don't go through a full

Re: [PATCH v3 3/4] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-29 Thread Arnd Bergmann
On Thu, Aug 29, 2019 at 8:46 AM Christoph Hellwig wrote: > > @@ -277,7 +277,7 @@ static void do_signal(struct task_struct *tsk) > > > > rseq_signal_deliver(, tsk->thread.regs); > > > > - if (is32) { > > + if ((IS_ENABLED(CONFIG_PPC32) || IS_ENABLED(CONFIG_COMPAT)) && is32) { > > I

Re: [PATCH 2/2] powerpc/nvdimm: use H_SCM_QUERY hcall on H_OVERLAP error

2019-08-29 Thread Oliver O'Halloran
On Thu, Aug 29, 2019 at 4:34 PM Aneesh Kumar K.V wrote: > > Right now we force an unbind of SCM memory at drcindex on H_OVERLAP error. > This really slows down operations like kexec where we get the H_OVERLAP > error because we don't go through a full hypervisor re init. Maybe we should be

Re: [PATCH v7 5/7] kvmppc: Radix changes for secure guest

2019-08-29 Thread Bharata B Rao
On Wed, Aug 28, 2019 at 08:05:52PM -0700, Sukadev Bhattiprolu wrote: > > - After the guest becomes secure, when we handle a page fault of a page > > belonging to SVM in HV, send that page to UV via UV_PAGE_IN. > > - Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL. > > -

  1   2   >