Re: [PATCH 0/2] RFC: Adjust powerpc ASLR elf randomness

2017-02-01 Thread Balbir Singh
On Thu, Feb 02, 2017 at 11:12:46AM +0530, Bhupesh Sharma wrote: > This RFC patchset tries to make the powerpc ASLR elf randomness > implementation similar to other ARCHs (like x86). > > The 1st patch introduces the support of ARCH_MMAP_RND_BITS in powerpc > mmap implementation to allow a sane bala

[PATCH v2] powerpc: A new cache geometry aux vectors

2017-02-01 Thread Benjamin Herrenschmidt
This adds AUX vectors for the L1I,D, L2 and L3 cache levels providing for each cache level the size of the cache in bytes and the geometry (line size and number of ways). We chose to not use the existing alpha/sh definition which packs all the information in a single entry per cache level as it is

Re: [PATCH v2] cxl: fix build when CONFIG_DEBUG_FS=n

2017-02-01 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH 0/3] powerpc/pseries: Manage single copy of ibm, dynamic-memory

2017-02-01 Thread Michael Ellerman
Nathan Fontenot writes: > The ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory property > of the device-tree can be fairly big on systems with a large amount > of memory. A system with 1 TB of memory (256 MB LMBs) the property > size is 94k, this equates to roughly a 30MB property size for a

Re: Query regarding randomization bits for a ASLR elf on PPC64

2017-02-01 Thread Bhupesh Sharma
Hi Kees, On Thu, Jan 26, 2017 at 7:08 AM, Kees Cook wrote: > On Sun, Jan 22, 2017 at 9:34 PM, Bhupesh Sharma wrote: >> I was recently looking at ways to extend the randomization range for a >> ASLR elf on a PPC64LE system. >> >> I basically have been using 28-bits of randomization on x86_64 for

[PATCH 2/2] powerpc: Redefine ELF_ET_DYN_BASE

2017-02-01 Thread Bhupesh Sharma
Currently the powerpc arch uses a ELF_ET_DYN_BASE value of 0x2000 which ends up pushing an elf to a load address which is 32-bit. On 64-bit platforms, this might be too less especially when one is trying to increase the randomness of the load address of the ASLR elfs on such platforms. This p

[PATCH 1/2] powerpc: mm: support ARCH_MMAP_RND_BITS

2017-02-01 Thread Bhupesh Sharma
powerpc: arch_mmap_rnd() uses hard-coded values, (23-PAGE_SHIFT) for 32-bit and (30-PAGE_SHIFT) for 64-bit, to generate the random offset for the mmap base address. This value represents a compromise between increased ASLR effectiveness and avoiding address-space fragmentation. Replace it with a K

[PATCH 0/2] RFC: Adjust powerpc ASLR elf randomness

2017-02-01 Thread Bhupesh Sharma
This RFC patchset tries to make the powerpc ASLR elf randomness implementation similar to other ARCHs (like x86). The 1st patch introduces the support of ARCH_MMAP_RND_BITS in powerpc mmap implementation to allow a sane balance between increased randomness in the mmap address of ASLR elfs and incr

Re: [PATCH 0/3] Update xmon disassembly

2017-02-01 Thread Balbir Singh
> NOTE: This is an internal posting at the moment for review > and criticism. > Clearly left over bits, please ignore Balbir

[PATCH 3/3] powerpc/xmon: Enable disassembly files (compilation changes)

2017-02-01 Thread Balbir Singh
After updating ppc-dis.c, ppc-opc.c and ppc.h the following changes were made to enable compilation and working of xmon 1. Remove all disasmebler_info 2. Use xmon's printf/print_address to output data and addresses respectively 3. All bfd_* types and casts have been removed 4. Optimizations rel

[PATCH 1/3] powerpc/xmon Update ppc-dis/opc.c and ppc.h

2017-02-01 Thread Balbir Singh
Upgrade ppc-opc.c, ppc-dis.c and ppc.h to the versions belonging to the following commit 65b650b4c7463f4508bed523c24ab0031a5ae5cd * ppc-dis.c (print_insn_powerpc): Don't skip all operands after setting skip_optional. This version will not compile, but make it easier to apply newer reclicensed c

[PATCH 0/3] Update xmon disassembly

2017-02-01 Thread Balbir Singh
This series updates xmon to allow disassembly of upto POWER9 instructions. With a lot of help from Peter Bergner and help from Paul Mckenney I was able to get help in relicensing the new binutils ppc-opc.c/ppc-dis.c and ppc.h to GPLv2. The details of the commits are in patch 2 in the series. The

Re: ibmvtpm byteswapping inconsistency

2017-02-01 Thread Vicky
> On Jan 26, 2017, at 5:58 PM, Ashley Lai wrote: > > Adding Vicky from IBM. > > > On 01/26/2017 04:05 PM, Jason Gunthorpe wrote: >> On Thu, Jan 26, 2017 at 09:22:48PM +0100, Michal Such??nek wrote: >> >>> This is repeated a few times in the driver so I added memset to quiet >>> gcc and make b

Re: ibmvtpm byteswapping inconsistency

2017-02-01 Thread Vicky
On Jan 26, 2017, at 5:58 PM, Ashley Lai wrote:Adding Vicky from IBM.On 01/26/2017 04:05 PM, Jason Gunthorpe wrote:On Thu, Jan 26, 2017 at 09:22:48PM +0100, Michal Such??nek wrote:This is repeated a few times in the driver so I added memset to quietgcc and make behavior deterministic in case the un

Re: [RFC] implement QUEUED spinlocks on powerpc

2017-02-01 Thread Benjamin Herrenschmidt
On Wed, 2017-02-01 at 20:40 -0800, Eric Dumazet wrote: > A typical benchmark would be to use 200 concurrent netperf -t TCP_RR, > through a single qdisc (protected by a spinlock) > > Non ticket/queued spinlocks behave quite bad in this scenario. > > I can try this next week if you want. That woul

Re: [PATCH 2/7] cxl: Remove unused values in bare-metal environment.

2017-02-01 Thread Andrew Donnellan
On 02/02/17 04:30, Christophe Lombard wrote: The two fields pid and tid of the structure cxl_irq_info are only used in the guest environment. To avoid confusion, it's not necessary to fill the fields in the bare-metal environment. The PSL Process and Thread Identification Register is only used wh

Re: [PATCH 1/7] cxl: Read vsec perst load image

2017-02-01 Thread Andrew Donnellan
On 02/02/17 04:30, Christophe Lombard wrote: This bit is used to cause a flash image load for programmable CAIA-compliant implementation. If this bit is set to ‘0’, a power cycle of the adapter is required to load a programmable CAIA-com- pliant implementation from flash. This field will be use

Re: [RFC] implement QUEUED spinlocks on powerpc

2017-02-01 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Wed, 2017-02-01 at 09:05 -0800, Eric Dumazet wrote: >> Hi all >> >> Is anybody working on adding QUEUED spinlocks to powerpc 64bit ? >> >> I've seen past attempts with ticket spinlocks >> ( https://patchwork.ozlabs.org/patch/449381/ and other related links >>

Re: [PATCH v2] EDAC: mpc85xx: Add T2080 l2-cache support

2017-02-01 Thread Chris Packham
On 02/02/17 12:28, Borislav Petkov wrote: > On Thu, Feb 02, 2017 at 12:16:24PM +1300, Chris Packham wrote: >> The l2-cache controller on the T2080 SoC has similar capabilities to the >> others already supported by the mpc85xx_edac driver. Add it to the list >> of compatible devices. >> >> Signed-of

Re: [PATCH v2] EDAC: mpc85xx: Add T2080 l2-cache support

2017-02-01 Thread Borislav Petkov
On Thu, Feb 02, 2017 at 12:16:24PM +1300, Chris Packham wrote: > The l2-cache controller on the T2080 SoC has similar capabilities to the > others already supported by the mpc85xx_edac driver. Add it to the list > of compatible devices. > > Signed-off-by: Chris Packham > Acked-by: Johannes Thumsh

[PATCH v2] EDAC: mpc85xx: Add T2080 l2-cache support

2017-02-01 Thread Chris Packham
The l2-cache controller on the T2080 SoC has similar capabilities to the others already supported by the mpc85xx_edac driver. Add it to the list of compatible devices. Signed-off-by: Chris Packham Acked-by: Johannes Thumshirn --- This is a resend of a patch that got an ack[1] but didn't seem to

[PATCH] powerpc: Fix inconsistent of_node_to_nid EXPORT_SYMBOL handling

2017-02-01 Thread Shailendra Singh
The generic implementation of of_node_to_nid is EXPORT_SYMBOL. The powerpc implementation added by following commit is EXPORT_SYMBOL_GPL. commit 953039c8df7b ("[PATCH] powerpc: Allow devices to register with numa topology") This creates an inconsistency for of_node_to_nid callers across architect

Re: [PATCH v4 00/15] livepatch: hybrid consistency model

2017-02-01 Thread Jiri Kosina
On Wed, 1 Feb 2017, Josh Poimboeuf wrote: > If there are no more comments, it would be great to get these patches in > for the 4.11 merge window. Any objections to that? That'd mean that the exposure in -next would be really short, which I'd like to avoid. I'd love to tentatively target 4.12 t

Re: [PATCH v4 00/15] livepatch: hybrid consistency model

2017-02-01 Thread Miroslav Benes
On Wed, 1 Feb 2017, Josh Poimboeuf wrote: > On Thu, Jan 19, 2017 at 09:46:08AM -0600, Josh Poimboeuf wrote: > > Here's v4, based on linux-next/master. Mostly minor changes this time, > > primarily due to Petr's v3 comments. > > So far, the only review comments have been related to the first patc

Re: [RFC] implement QUEUED spinlocks on powerpc

2017-02-01 Thread Benjamin Herrenschmidt
On Wed, 2017-02-01 at 09:05 -0800, Eric Dumazet wrote: > Hi all > > Is anybody working on adding QUEUED spinlocks to powerpc 64bit ? > > I've seen past attempts with ticket spinlocks > ( https://patchwork.ozlabs.org/patch/449381/ and other related links > ) > > But it looks ticket spinlocks are

Re: [PATCH v4 00/15] livepatch: hybrid consistency model

2017-02-01 Thread Josh Poimboeuf
On Thu, Jan 19, 2017 at 09:46:08AM -0600, Josh Poimboeuf wrote: > Here's v4, based on linux-next/master. Mostly minor changes this time, > primarily due to Petr's v3 comments. So far, the only review comments have been related to the first patch, of which I just posted an updated version. If the

[PATCH v4.1 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-02-01 Thread Josh Poimboeuf
For live patching and possibly other use cases, a stack trace is only useful if it can be assured that it's completely reliable. Add a new save_stack_trace_tsk_reliable() function to achieve that. Note that if the target task isn't the current task, and the target task is allowed to run, then it

Re: [PATCH 2/2] powerpc/pseries: Dynamically increase RMA size

2017-02-01 Thread Sukadev Bhattiprolu
Thiago Jung Bauermann [bauer...@linux.vnet.ibm.com] wrote: > Instead of this method of trying a small RMA size and rebooting to try a > bigger size, could the "min RMA percentage of total RAM" field of the > ibm_architecture_vec be used? We tried that and concluded that even 1% could end up rese

Re: [PATCH 2/2] powerpc/pseries: Dynamically increase RMA size

2017-02-01 Thread Thiago Jung Bauermann
Hello, Am Mittwoch, 1. Februar 2017, 16:37:58 BRST schrieb Michael Ellerman: > Sukadev Bhattiprolu writes: > > Paul Clarke [p...@us.ibm.com] wrote: > > --- > > > > From f9e9e8460206bc3fa7eaa741b9a2bde22870b9e0 Mon Sep 17 00:00:00 2001 > > I know it's been a while but I think it would still be g

[RFC][PATCH] powerpc: add device tree binding for cpufeatures

2017-02-01 Thread Nicholas Piggin
The cpufeatures binding describes architected CPU features along with some compatibility, privilege, and enablement properties that allow flexibility with discovering and enabling capabilities. For example, FSCR or similar simple prescription based enablement can be done by an OS that does not und

[PATCH 7/7] cxl: Add psl9 specific code

2017-02-01 Thread Christophe Lombard
The new Coherent Accelerator Interface Architecture, level 2, for the IBM POWER9 brings new content and features: - POWER9 Service Layer - Registers - Radix mode - Process element entry - Dedicated-Shared Process Programming Model - Translation Fault Handling - CAPP - Memory Context ID If a val

[PATCH 6/7] cxl: Isolate few psl8 specific calls

2017-02-01 Thread Christophe Lombard
Point out the specific Coherent Accelerator Interface Architecture, level 1, registers. Code and functions specific to PSL8 (CAIA1) must be framed. Signed-off-by: Christophe Lombard --- drivers/misc/cxl/context.c | 28 +++- drivers/misc/cxl/cxl.h | 35 +++-

[PATCH 5/7] cxl: Rename some psl8 specific functions

2017-02-01 Thread Christophe Lombard
Rename a few functions, changing the '_psl' suffix to '_psl8', to make clear that the implementation is psl8 specific. Those functions will have an equivalent implementation for the psl9 in a later patch. Signed-off-by: Christophe Lombard --- drivers/misc/cxl/cxl.h | 23 +++--

[PATCH 4/7] cxl: Update implementation service layer

2017-02-01 Thread Christophe Lombard
The service layer API (in cxl.h) lists some low-level functions whose implementation is different on PSL8, PSL9 and XSL. Each environment implements its own functions, and the common code uses them through function pointers, defined in cxl_service_layer_ops. Signed-off-by: Christophe Lombard ---

[PATCH 3/7] cxl: Keep track of mm struct associated with a context

2017-02-01 Thread Christophe Lombard
The mm_struct corresponding to the current task is acquired each time an interrupt is raised. So to simplify the code, we only get the mm_struct when attaching an AFU context to the process. The mm_count reference is increased to ensure that the mm_struct can't be freed. The mm_struct will be relea

[PATCH 2/7] cxl: Remove unused values in bare-metal environment.

2017-02-01 Thread Christophe Lombard
The two fields pid and tid of the structure cxl_irq_info are only used in the guest environment. To avoid confusion, it's not necessary to fill the fields in the bare-metal environment. The PSL Process and Thread Identification Register is only used when attaching a dedicated process for PSL8 only.

[PATCH 1/7] cxl: Read vsec perst load image

2017-02-01 Thread Christophe Lombard
This bit is used to cause a flash image load for programmable CAIA-compliant implementation. If this bit is set to ‘0’, a power cycle of the adapter is required to load a programmable CAIA-com- pliant implementation from flash. This field will be used by the following patches. Signed-off-by: Chris

[PATCH 0/7] cxl: Add support for Coherent Accelerator Interface Architecture 2.0

2017-02-01 Thread Christophe Lombard
This series adds support for a cxl card which supports the Coherent Accelerator Interface Architecture 2.0. It requires IBM Power9 system and the Power Service Layer, version 9. The PSL provides the address translation and system memory cache for CAIA compliant Accelerators. the PSL attaches to th

[RFC] implement QUEUED spinlocks on powerpc

2017-02-01 Thread Eric Dumazet
Hi all Is anybody working on adding QUEUED spinlocks to powerpc 64bit ? I've seen past attempts with ticket spinlocks ( https://patchwork.ozlabs.org/patch/449381/ and other related links ) But it looks ticket spinlocks are a thing of the past. Thanks.

Re: [PATCH kernel] vfio/spapr: Fix missing mutex unlock when creating a window

2017-02-01 Thread Alex Williamson
On Wed, 1 Feb 2017 14:26:16 +1100 Alexey Kardashevskiy wrote: > d9c728949ddc: "vfio/spapr: Postpone default window creation" added > an additional exit to the VFIO_IOMMU_SPAPR_TCE_CREATE case and made it > possible to return from tce_iommu_ioctl() without unlocking > container->lock; this fixes

[PATCH V10 4/8] pseries/hotplug init: Convert new DRC memory property for hotplug runtime

2017-02-01 Thread Michael Bringmann
hotplug_init: Simplify the code needed for runtime memory hotplug and maintenance with a conversion routine that transforms the compressed property "ibm,dynamic-memory-v2" to the form of "ibm,dynamic-memory" within the "ibm,dynamic-reconfiguration-memory" property. Thus only a single set of routin

Re: [PATCH 2/5] powerpc/perf: Add PM_INST_DISP event to Power9 event list

2017-02-01 Thread Madhavan Srinivasan
On Wednesday 01 February 2017 04:30 PM, Anton Blanchard wrote: Hi Maddy, +EVENT(PM_INST_DISP,0x200f0) +EVENT(PM_INST_DISP_ALT,0x300f0) Are you sure these are the right events? 0x200f2, 0x300f2 should be instruction dispatch I think.

Re: [PATCH 2/5] powerpc/perf: Add PM_INST_DISP event to Power9 event list

2017-02-01 Thread Anton Blanchard
Hi Maddy, > +EVENT(PM_INST_DISP, 0x200f0) > +EVENT(PM_INST_DISP_ALT, 0x300f0) Are you sure these are the right events? 0x200f2, 0x300f2 should be instruction dispatch I think. Anton

Re: [PATCH V3 3/4] arch/powerpc: Implement Optprobes

2017-02-01 Thread Michael Ellerman
Anju T Sudhakar writes: > Detour buffer contains instructions to create an in memory pt_regs. > After the execution of the pre-handler, a call is made for instruction > emulation. > The NIP is determined in advanced through dummy instruction emulation and a > branch > instruction is created to

Re: "Unable to handle kernel paging request for instruction fetch" on P4080

2017-02-01 Thread Thomas De Schampheleire
On Wed, Jan 25, 2017 at 10:46 AM, Thomas De Schampheleire wrote: > Hi, > > We are experiencing kernel panics of the type "Unable to handle kernel paging > request for instruction fetch" but are stuck in our analysis. We would > appreciate any help you can give. > > The problem occurs from time to

Re: [PATCH v4 14/15] livepatch: add /proc//patch_state

2017-02-01 Thread Miroslav Benes
On Tue, 31 Jan 2017, Josh Poimboeuf wrote: > On Tue, Jan 31, 2017 at 03:31:39PM +0100, Miroslav Benes wrote: > > On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > > > > > Expose the per-task patch state value so users can determine which tasks > > > are holding up completion of a patching operation. >