Re: RFC on writel and writel_relaxed

2018-03-23 Thread Benjamin Herrenschmidt
On Fri, 2018-03-23 at 10:35 -0600, Jason Gunthorpe wrote: > On Fri, Mar 23, 2018 at 12:52:02AM +1100, Benjamin Herrenschmidt wrote: > > > > > - Make writel_relaxed() be a simple store without barriers, and > > > > readl_relaxed() be "eieio, read, eieio", thus allowing write combining > > > > to h

Re: RFC on writel and writel_relaxed

2018-03-23 Thread Benjamin Herrenschmidt
On Fri, 2018-03-23 at 09:42 -0400, Sinan Kaya wrote: > On 3/22/2018 8:16 PM, Benjamin Herrenschmidt wrote: > > On Thu, 2018-03-22 at 12:51 -0500, Sinan Kaya wrote: > > > On 3/22/2018 8:52 AM, Benjamin Herrenschmidt wrote: > > > > > > No, it's not sufficient. > > > > > > > > Just to clarify ... bar

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-23 Thread Ram Pai
On Fri, Mar 23, 2018 at 05:27:06PM +0800, Li Wang wrote: >On Thu, Mar 22, 2018 at 3:09 PM, Ram Pai <[1]linux...@us.ibm.com> wrote: > > On Wed, Mar 21, 2018 at 02:53:00PM +0800, Li Wang wrote: > >    On Wed, Mar 21, 2018 at 5:58 AM, Ram Pai > <[1][2]linux...@us.ibm.com> wrote: >

[PATCH 1/4] ethernet: Use octal not symbolic permissions

2018-03-23 Thread Joe Perches
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches --- drivers/net/ethernet/8390/apne.c | 2 +- drivers/net/e

[PATCH 0/4] net: drivers/net: Use octal permissions

2018-03-23 Thread Joe Perches
Using octal and not symbolic permissions is preferred by many as more readable. https://lkml.org/lkml/2016/8/2/1945 Rather than getting these piecemeal, just do them all. Done with checkpatch and some typing. Joe Perches (4): ethernet: Use octal not symbolic permissions wireless: Use octal n

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Rich Felker
On Fri, Mar 23, 2018 at 12:06:18PM -0700, Matthew Wilcox wrote: > On Fri, Mar 23, 2018 at 02:00:24PM -0400, Rich Felker wrote: > > On Fri, Mar 23, 2018 at 05:48:06AM -0700, Matthew Wilcox wrote: > > > On Thu, Mar 22, 2018 at 07:36:36PM +0300, Ilya Smith wrote: > > > > Current implementation doesn't

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Matthew Wilcox
On Fri, Mar 23, 2018 at 03:16:21PM -0400, Rich Felker wrote: > > Huh, I thought libc was aware of this. Also, I'd expect a libc-based > > implementation to restrict itself to, eg, only loading libraries in > > the bottom 1GB to avoid applications who want to map huge things from > > running out of

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Rich Felker
On Fri, Mar 23, 2018 at 12:29:52PM -0700, Matthew Wilcox wrote: > On Fri, Mar 23, 2018 at 03:16:21PM -0400, Rich Felker wrote: > > > Huh, I thought libc was aware of this. Also, I'd expect a libc-based > > > implementation to restrict itself to, eg, only loading libraries in > > > the bottom 1GB t

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Matthew Wilcox
On Fri, Mar 23, 2018 at 02:00:24PM -0400, Rich Felker wrote: > On Fri, Mar 23, 2018 at 05:48:06AM -0700, Matthew Wilcox wrote: > > On Thu, Mar 22, 2018 at 07:36:36PM +0300, Ilya Smith wrote: > > > Current implementation doesn't randomize address returned by mmap. > > > All the entropy ends with cho

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Rich Felker
On Fri, Mar 23, 2018 at 05:48:06AM -0700, Matthew Wilcox wrote: > On Thu, Mar 22, 2018 at 07:36:36PM +0300, Ilya Smith wrote: > > Current implementation doesn't randomize address returned by mmap. > > All the entropy ends with choosing mmap_base_addr at the process > > creation. After that mmap bui

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Ilya Smith
> On 23 Mar 2018, at 15:48, Matthew Wilcox wrote: > > On Thu, Mar 22, 2018 at 07:36:36PM +0300, Ilya Smith wrote: >> Current implementation doesn't randomize address returned by mmap. >> All the entropy ends with choosing mmap_base_addr at the process >> creation. After that mmap build very pred

Re: [PATCH] powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features

2018-03-23 Thread Gustavo Romero
Hi Yi, On 03/14/2018 05:34 AM, Li Yi (Adam) wrote: So set it in the DT CPU features code also. This results in eg: $ LD_SHOW_AUXV=1 /bin/true | grep "AT_.*PLATFORM" AT_PLATFORM: power9 AT_BASE_PLATFORM:power9 Is this issue related with DD2.2 CPU? I tested on a Boston system with

Re: [RFC PATCH v2 2/2] Architecture defined limit on memory region random shift.

2018-03-23 Thread Ilya Smith
> On 22 Mar 2018, at 23:54, Andrew Morton wrote: > > > Please add changelogs. An explanation of what a "limit on memory > region random shift" is would be nice ;) Why does it exist, why are we > doing this, etc. Surely there's something to be said - at present this > is just a lump of random

Re: [RFC PATCH v2 2/2] Architecture defined limit on memory region random shift.

2018-03-23 Thread Ilya Smith
> On 22 Mar 2018, at 23:54, Andrew Morton wrote: > > > Please add changelogs. An explanation of what a "limit on memory > region random shift" is would be nice ;) Why does it exist, why are we > doing this, etc. Surely there's something to be said - at present this > is just a lump of random

Re: [RFC PATCH v2 1/2] Randomization of address chosen by mmap.

2018-03-23 Thread Ilya Smith
> On 22 Mar 2018, at 23:53, Andrew Morton wrote: > > On Thu, 22 Mar 2018 19:36:37 +0300 Ilya Smith wrote: > >> include/linux/mm.h | 16 -- >> mm/mmap.c | 164 >> + > > You'll be wanting to update the documentation. > Documentat

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Ilya Smith
Hello, Andrew Thanks for reading this patch. > On 22 Mar 2018, at 23:57, Andrew Morton wrote: > > On Thu, 22 Mar 2018 19:36:36 +0300 Ilya Smith wrote: > >> Current implementation doesn't randomize address returned by mmap. >> All the entropy ends with choosing mmap_base_addr at the process >>

Re: [PATCH v2 13/38] cxlflash: Support adapter file descriptors for OCXL

2018-03-23 Thread Uma Krishnan
> On Mar 22, 2018, at 12:12 PM, Frederic Barrat > wrote: > > > > Le 26/02/2018 à 23:21, Uma Krishnan a écrit : >> Allocate a file descriptor for an adapter context when requested. In order >> to allocate inodes for the file descriptors, a pseudo filesystem is created >> and used. >> Signed-o

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-23 Thread Matthew Wilcox
On Thu, Mar 22, 2018 at 07:36:36PM +0300, Ilya Smith wrote: > Current implementation doesn't randomize address returned by mmap. > All the entropy ends with choosing mmap_base_addr at the process > creation. After that mmap build very predictable layout of address > space. It allows to bypass ASLR

Re: DMA Mapping Error in ppc64

2018-03-23 Thread Jared Bents
Thank you for the advice. Looks like I get to try to rewrite the ath9k and ath10k drivers to use dma_alloc_coherent() instead of kmemdup() and dev_alloc_skb() On Thu, Mar 22, 2018 at 8:19 PM, Oliver wrote: > On Fri, Mar 23, 2018 at 1:37 AM, Jared Bents > wrote: > > Thank you for the response b

Re: [PATCH 4/6] libnvdimm/of: Symlink platform and region devices

2018-03-23 Thread Dan Williams
On Fri, Mar 23, 2018 at 1:12 AM, Oliver O'Halloran wrote: > Add a way direct link between the region and the platform device that > creates the region. > This linking would not be needed if of_nd_regions each lived on their own bus.

Re: [PATCH 3/6] libnvdimm: Add device-tree based driver

2018-03-23 Thread Dan Williams
On Fri, Mar 23, 2018 at 1:12 AM, Oliver O'Halloran wrote: > This patch adds peliminary device-tree bindings for the NVDIMM driver. *preliminary > Currently this only supports one bus (created at probe time) which all > regions are added to with individual regions being created by a platform > de

Re: [PATCH 2/6] libnvdimm: Add nd_region_destroy()

2018-03-23 Thread Dan Williams
On Fri, Mar 23, 2018 at 1:12 AM, Oliver O'Halloran wrote: > Currently there's no way to remove a region from and nvdimm_bus without > tearing down the whole bus. This patch adds an API for removing a single > region from the bus so that we can implement a sensible unbind operation > for the of_nd_

Re: RFC on writel and writel_relaxed

2018-03-23 Thread Jason Gunthorpe
On Fri, Mar 23, 2018 at 12:52:02AM +1100, Benjamin Herrenschmidt wrote: > > > - Make writel_relaxed() be a simple store without barriers, and > > > readl_relaxed() be "eieio, read, eieio", thus allowing write combining > > > to happen between successive writel_relaxed on WC space (no change on >

Re: [PATCH] cxl: disable the lazy approach for irqs in POWERVM environment.

2018-03-23 Thread christophe lombard
Le 23/03/2018 à 03:14, Benjamin Herrenschmidt a écrit : On Thu, 2018-03-22 at 17:37 +0100, Christophe Lombard wrote: The cxl driver cannot disable the interrupt at the device level and has to use disable_irq[_nosync] instead. To avoid the implementation of the lazy optimisation (the interrupt is

Re: [PATCH RFC rebase 9/9] powerpc/64: barrier_nospec: Add commandline trigger

2018-03-23 Thread Diana Madalina Craciun
On 3/15/2018 9:34 PM, Michal Suchanek wrote: > Add commandline options spectre_v2 and nospectre_v2 > > These are named same as similar x86 options regardless of actual effect > to not require platform-specific configuration. > > Supported options: > nospectre_v2 or spectre_v2=off - speculation barr

Re: [PATCH net-next] ibmvnic: Potential NULL dereference in clean_one_tx_pool()

2018-03-23 Thread Thomas Falcon
On 03/23/2018 06:36 AM, Dan Carpenter wrote: > There is an && vs || typo here, which potentially leads to a NULL > dereference. Thanks for catching that! > > Fixes: e9e1e97884b7 ("ibmvnic: Update TX pool cleaning routine") > Signed-off-by: Dan Carpenter > > diff --git a/drivers/net/ethernet/ibm/

Re: RFC on writel and writel_relaxed

2018-03-23 Thread Sinan Kaya
On 3/22/2018 8:16 PM, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-22 at 12:51 -0500, Sinan Kaya wrote: >> On 3/22/2018 8:52 AM, Benjamin Herrenschmidt wrote: > No, it's not sufficient. >>> >>> Just to clarify ... barrier() is just a compiler barrier, it means the >>> compiler will generate

Re: [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec

2018-03-23 Thread Mathieu Malaterre
On Fri, Mar 23, 2018 at 1:19 PM, christophe leroy wrote: > > > Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : >> >> Some functions prototypes were missing for the non-altivec code. Add the >> missing prototypes directly in xor_vmx, fix warnings treated as errors >> with >> W=1: >> >>arch/p

Re: [PATCH 19/19] powerpc/tau: Synchronize function prototypes and body

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : Some function prototypes and body for Thermal Assist Units were not in sync. Update the function definition to match the existing function declaration found in `setup-common.c`, changing an `int` return type to a `u32` return type. Move the pro

Re: [PATCH 15/19] powerpc: Add missing prototype

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : Add one missing prototype for function rh_dump_blk. Fix warning treated as error in W=1: arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for ‘rh_dump_blk’ [-Werror=missing-prototypes] Signed-off-by: Mathieu Malaterre --- a

Re: [PATCH 14/19] powerpc/altivec: Add missing prototypes for altivec

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : Some functions prototypes were missing for the non-altivec code. Add the missing prototypes directly in xor_vmx, fix warnings treated as errors with W=1: arch/powerpc/lib/xor_vmx_glue.c:18:6: error: no previous prototype for ‘xor_altivec_2

Re: [PATCH 13/19] powerpc/52xx: Add missing functions prototypes

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : The function prototypes were declared within a `#ifdef CONFIG_PPC_LITE5200` block which would prevent them from being visible when compiling `mpc52xx_pm.c`. Move the prototypes outside of the `#ifdef` block to fix the following warnings treated

Re: [PATCH 12/19] powerpc/powermac: Add missing prototype for note_bootable_part()

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : Add a missing prototype for function `note_bootable_part` to silence a warning treated as error with W=1: arch/powerpc/platforms/powermac/setup.c:361:12: error: no previous prototype for ‘note_bootable_part’ [-Werror=missing-prototypes] S

Re: [PATCH 11/19] powerpc/powermac: Move pmac_pfunc_base_install prototype to header file

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : The pmac_pfunc_base_install prototype was declared in powermac/smp.c since function was used there, move it to pmac_pfunc.h header to be visible in pfunc_base.c. Fix a warning treated as error with W=1: arch/powerpc/platforms/powermac/pfunc

[PATCH net-next] ibmvnic: Potential NULL dereference in clean_one_tx_pool()

2018-03-23 Thread Dan Carpenter
There is an && vs || typo here, which potentially leads to a NULL dereference. Fixes: e9e1e97884b7 ("ibmvnic: Update TX pool cleaning routine") Signed-off-by: Dan Carpenter diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 5632c030811b..0389a7a52152 1006

Re: [1/3] powerpc/mm/radix: Remove unused code

2018-03-23 Thread Michael Ellerman
On Fri, 2018-03-23 at 04:56:25 UTC, "Aneesh Kumar K.V" wrote: > These function are not used in the code. Remove them. > > Signed-off-by: Aneesh Kumar K.V Series applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/99491e2d0e50c53a0620dfec340b24 cheers

Re: [1/2] powerpc/mm: Add tracking of the number of coprocessors using a context

2018-03-23 Thread Michael Ellerman
On Thu, 2018-03-22 at 22:29:05 UTC, Balbir Singh wrote: > From: Benjamin Herrenschmidt > > Currently, when using coprocessors (which use the Nest MMU), we > simply increment the active_cpu count to force all TLB invalidations > to be come broadcast. > > Unfortunately, due to an errata in POWER9,

Re: powerpc/64s: Fix lost pending interrupt due to race causing lost update to irq_happened

2018-03-23 Thread Michael Ellerman
On Wed, 2018-03-21 at 02:22:28 UTC, Nicholas Piggin wrote: > force_external_irq_replay() can be called in the do_IRQ path with > interrupts hard enabled and soft disabled if may_hard_irq_enable() set > MSR[EE]=1. It updates local_paca->irq_happened with a load, modify, > store sequence. If a maskab

Re: [PATCH 07/19] powerpc/powermac: Make some functions static

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/powermac/pci.c:1022:6: error: no previous prototype for ‘pmac_pci_fixup_ohci’ [-Werror=missing-prototypes] arch/powerpc/platf

Re: [PATCH 05/19] powerpc/chrp/setup: Add attribute unused and make some functions static

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : Add gcc attribute unused to silence a warning. These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/chrp/setup.c:97:6: error: no previous prototype for ‘chrp_show_cpuinfo’ [-Werror

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-23 Thread Li Wang
On Thu, Mar 22, 2018 at 3:09 PM, Ram Pai wrote: > On Wed, Mar 21, 2018 at 02:53:00PM +0800, Li Wang wrote: > >On Wed, Mar 21, 2018 at 5:58 AM, Ram Pai <[1]linux...@us.ibm.com> > wrote: > > > > On Fri, Mar 09, 2018 at 11:43:00AM +0800, Li Wang wrote: > > >On Fri, Mar 9, 2018 at 1

Re: [PATCH 04/19] powerpc/kvm: Mark variable tmp unused

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : Add gcc attribute unused to variable tmp. Fix warning treated as error with W=1: arch/powerpc/kernel/kvm.c:675:6: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Mathieu Malaterre --- arch/powerp

Re: [PATCH 03/19] powerpc: Mark variables as unused

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : Add gcc attribute unused for two variables. Fix warnings treated as errors with W=1: arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Mathieu Malaterre ---

Re: [PATCH 02/19] powerpc/powermac: Mark variable x as unused

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : Since the value of x is never intended to be read, declare it with gcc attribute as unused. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/udbg_scc.c:76:9: error: variable ‘x’ set but not used [-Werror=unused-but-se

Re: [PATCH 01/19] powerpc/powermac: Mark variable x as unused

2018-03-23 Thread christophe leroy
Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : Since the value of x is never intended to be read, declare it with gcc attribute as unused. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: variable ‘x’ set but not used [-Werror=unused-bu

Re: [PATCH v2] crypto: talitos - fix IPsec cipher in length

2018-03-23 Thread Horia Geantă
On 3/22/2018 11:57 AM, Christophe Leroy wrote: > For SEC 2.x+, cipher in length must contain only the ciphertext length. turns out this should be 3.x+ > In case of using hardware ICV checking, the ICV length is provided via > the "extent" field of the descriptor pointer. > > Cc: #

[PATCH 6/6] doc/devicetree: NVDIMM region documentation

2018-03-23 Thread Oliver O'Halloran
Add device-tree binding documentation for the nvdimm region driver. Cc: devicet...@vger.kernel.org Signed-off-by: Oliver O'Halloran --- .../devicetree/bindings/nvdimm/nvdimm-region.txt | 45 ++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bi

[PATCH 5/6] powerpc/powernv: Create platform devs for nvdimm buses

2018-03-23 Thread Oliver O'Halloran
Scan the devicetree for an nvdimm-bus compatible and create a platform device for them. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/opal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c

[PATCH 4/6] libnvdimm/of: Symlink platform and region devices

2018-03-23 Thread Oliver O'Halloran
Add a way direct link between the region and the platform device that creates the region. Signed-off-by: Oliver O'Halloran --- drivers/nvdimm/of_nvdimm.c | 11 +++ drivers/nvdimm/region_devs.c | 13 + include/linux/libnvdimm.h| 1 + 3 files changed, 25 insertions(+) d

[PATCH 3/6] libnvdimm: Add device-tree based driver

2018-03-23 Thread Oliver O'Halloran
This patch adds peliminary device-tree bindings for the NVDIMM driver. Currently this only supports one bus (created at probe time) which all regions are added to with individual regions being created by a platform device driver. Signed-off-by: Oliver O'Halloran --- I suspect the platform driver

[PATCH 2/6] libnvdimm: Add nd_region_destroy()

2018-03-23 Thread Oliver O'Halloran
Currently there's no way to remove a region from and nvdimm_bus without tearing down the whole bus. This patch adds an API for removing a single region from the bus so that we can implement a sensible unbind operation for the of_nd_region platform driver. Signed-off-by: Oliver O'Halloran --- dri

[PATCH 1/6] libnvdimm: Add of_node to region and bus descriptors

2018-03-23 Thread Oliver O'Halloran
We want to be able to cross reference the region and bus devices with the device tree node that they were spawned from. libNVDIMM handles creating the actual devices for these internally, so we need to pass in a pointer to the relevant node in the descriptor. Signed-off-by: Oliver O'Halloran Acke

Re: [PATCH 1/3] powerpc/mm/radix: Remove unused code

2018-03-23 Thread Nicholas Piggin
On Fri, 23 Mar 2018 10:26:25 +0530 "Aneesh Kumar K.V" wrote: > These function are not used in the code. Remove them. > > Signed-off-by: Aneesh Kumar K.V You already acked this one :) https://patchwork.ozlabs.org/patch/868852/