Re: [PATCH v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-20 Thread Aneesh Kumar K.V
Michael Ellerman writes: > Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two > sysctls that allow a user to configure the number of bits of randomness used > for > ASLR. > > Because of the way the Kconfig for ARCH_MMAP_RND_BITS is defined, we

[PATCH 07/13] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
For device resource PREF bit setting under bridge 64-bit pref resource, we need to make sure only set PREF for 64bit resource. This patch set IORESOUCE_MEM_64 for 64bit resource during OF device resource flags parsing. Link: https://bugzilla.kernel.org/show_bug.cgi?id=96261 Link:

[PATCH 06/13] powerpc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
Same as sparc version. Make resource with consistent sequence like other arch or directly from pci_read_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu

[GIT PULL] Please pull powerpc/linux.git powerpc-4.11-8 tag

2017-04-20 Thread Michael Ellerman
Hi Linus, Please pull two final powerpc fixes for 4.11: The following changes since commit 4749228f022893faf54a3dbc70796f78b7d4f342: powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable() (2017-04-07 21:12:58 +1000) are available in the git repository at:

[PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors

2017-04-20 Thread Shilpasri G Bhat
Add support for adding min/max values for the inband sensors copied by OCC to main memory. And also add current(mA) sensors to the list. Signed-off-by: Shilpasri G Bhat --- drivers/hwmon/ibmpowernv.c | 55 -- 1 file

Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-20 Thread Paul E. McKenney
On Fri, Apr 21, 2017 at 11:42:01AM +1000, Michael Ellerman wrote: > "Paul E. McKenney" writes: > > On Thu, Apr 20, 2017 at 05:28:32PM +0200, Paolo Bonzini wrote: > >> On 20/04/2017 05:40, Michael Ellerman wrote: > >> > "Paul E. McKenney"

Re: powerpc/xive: Fix missing check of rc != OPAL_BUSY

2017-04-20 Thread Michael Ellerman
On Thu, 2017-04-20 at 05:55:55 UTC, Michael Ellerman wrote: > Dan Carpenter noticed that the code in __xive_native_disable_queue() has a for > loop with an unconditional break in the middle, which doesn't make a lot of > sense. > > What the code's supposed to do is loop as long as OPAL says it's

Re: powerpc/64s: Use relon prolog for EXC_VIRT_OOL_MASKABLE_HV handlers

2017-04-20 Thread Michael Ellerman
On Thu, 2017-04-13 at 09:45:48 UTC, Nicholas Piggin wrote: > Hypervisor Virtualization and Directed Hypervisor Doorbell interrupt > handlers use the macro EXC_VIRT_OOL_MASKABLE_HV for their relocation-on > handlers, which calls MASKABLE_RELON_EXCEPTION_HV_OOL, which uses the > real mode interrupt

Re: [PATCH v2] powerpc/book3s: mce: Move add_taint() later in virtual mode.

2017-04-20 Thread Michael Ellerman
Daniel Axtens writes: >> diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c >> index a1475e6..b23b323 100644 >> --- a/arch/powerpc/kernel/mce.c >> +++ b/arch/powerpc/kernel/mce.c >> @@ -221,6 +221,8 @@ static void machine_check_process_queued_event(struct >>

Re: [PATCH] powerpc/powernv/pci: Reduce spam when dumping PEST

2017-04-20 Thread Gavin Shan
On Mon, Apr 10, 2017 at 03:53:28PM +1000, Russell Currey wrote: >Dumping the PE State Tables (PEST) can be highly verbose if a number of PEs >are affected, especially in the case where the whole PHB is frozen and 255 >lines get printed. Check for duplicates when dumping the PEST to reduce

Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-20 Thread Michael Ellerman
Paolo Bonzini writes: > Michael, if you want to move the two srcu structs at the end of struct > kvm, that would be fine by me. Please send a patch yourself so you can > test it on PPC. Thanks, Paul beat me to it :) I've confirmed it fixes the build break and the

Re: [PATCH v5 1/4] printk/nmi: generic solution for safe printk in NMI

2017-04-20 Thread Sergey Senozhatsky
Hello, On (04/20/17 15:11), Petr Mladek wrote: [..] > Good analyze. I would summarize it that we need to be careful of: > > + logbug_lock > + PRINTK_SAFE_CONTEXT > + locks used by console drivers > > The first two things are easy to check. Except that a check for logbuf_lock > might

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-20 Thread Michael Ellerman
Frank Rowand writes: > On 04/20/17 09:51, Tyrel Datwyler wrote: >> On 04/19/2017 09:43 PM, Frank Rowand wrote: ... >>> Which ends up being this code: >>> >>>of_platform_default_populate_init() >>> of_platform_default_populate() >>>

Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-20 Thread Michael Ellerman
"Paul E. McKenney" writes: > On Thu, Apr 20, 2017 at 05:28:32PM +0200, Paolo Bonzini wrote: >> On 20/04/2017 05:40, Michael Ellerman wrote: >> > "Paul E. McKenney" writes: >> > >> > This change seems to have had the non-obvious effect of

Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-20 Thread Paul E. McKenney
On Thu, Apr 20, 2017 at 05:28:32PM +0200, Paolo Bonzini wrote: > > > On 20/04/2017 05:40, Michael Ellerman wrote: > > "Paul E. McKenney" writes: > > > >> diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h > >> index f2b3bd6c6bc2..0400e211aa44 100644 >

Re: [PATCH v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-20 Thread Kees Cook
On Thu, Apr 20, 2017 at 7:36 AM, Michael Ellerman wrote: > Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two > sysctls that allow a user to configure the number of bits of randomness used > for > ASLR. > > Because of the way the Kconfig for

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-20 Thread Frank Rowand
On 04/20/17 09:51, Tyrel Datwyler wrote: > On 04/19/2017 09:43 PM, Frank Rowand wrote: > < snip > >> The call stack could easily be post-processed, for example using addr2line. >> Here is the call stack for when the refcount incremented to 23 from 22 (or >> more accurately, to 22 from 21): >>

Re: [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel

2017-04-20 Thread Hari Bathini
On Wednesday 19 April 2017 07:38 PM, Michal Suchánek wrote: On Wed, 19 Apr 2017 14:19:47 +1000 Michael Ellerman wrote: Michal Suchánek writes: On Mon, 17 Apr 2017 20:43:02 +0530 Hari Bathini wrote: On Friday 14 April

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-20 Thread Tyrel Datwyler
On 04/19/2017 09:43 PM, Frank Rowand wrote: >> Something else to keep in mind is that while pr_debugs could be used to >> provide feedback on the reference counts and of_reconfig events they >> don't in anyway tell us where they are happening in the kernel. The > > Yes, that is critical

[PATCH] powerpc/32: Avoid risk of unrecoverable TLBmiss inside entry_32.S

2017-04-20 Thread Christophe Leroy
By default, the 8xx pins an ITLB on the first 8M of memory in order to avoid any ITLB miss on kernel code. However, with some debug functions like DEBUG_PAGEALLOC and DEBUG_RODATA, pinning TLBs is contradictory. In order to avoid any ITLB miss in a critical section without pinning TLBs, we have

Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-20 Thread Paolo Bonzini
On 20/04/2017 05:40, Michael Ellerman wrote: > "Paul E. McKenney" writes: > >> diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h >> index f2b3bd6c6bc2..0400e211aa44 100644 >> --- a/include/linux/srcutree.h >> +++ b/include/linux/srcutree.h >> @@

[PATCH v2] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-20 Thread Michael Ellerman
Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two sysctls that allow a user to configure the number of bits of randomness used for ASLR. Because of the way the Kconfig for ARCH_MMAP_RND_BITS is defined, we have to construct at least the MIN value in Kconfig, vs in a

Re: linux-next: build failure after merge of the rcu tree

2017-04-20 Thread Paul E. McKenney
On Thu, Apr 20, 2017 at 03:36:47PM +1000, Stephen Rothwell wrote: > Hi Paul, > > [Also reported by Michael elsewhere] > > After merging the rcu tree, today's linux-next build (powerpc > pseries_le_defconfig) failed like this: > > arch/powerpc/kvm/book3s_hv_rmhandlers.S: Assembler messages: >

Re: powerpc KVM build break in linux-next (was Re: [PATCH tip/core/rcu 40/40] srcu: Parallelize callback handling)

2017-04-20 Thread Paul E. McKenney
On Thu, Apr 20, 2017 at 01:40:13PM +1000, Michael Ellerman wrote: > "Paul E. McKenney" writes: > > > diff --git a/include/linux/srcutree.h b/include/linux/srcutree.h > > index f2b3bd6c6bc2..0400e211aa44 100644 > > --- a/include/linux/srcutree.h > > +++

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-20 Thread Steven Rostedt
On Wed, 19 Apr 2017 22:24:58 -0700 Tyrel Datwyler wrote: > On 04/19/2017 07:33 PM, Steven Rostedt wrote: > > On Wed, 19 Apr 2017 16:27:10 -0700 > > Tyrel Datwyler wrote: > > > >> # echo stacktrace >

Re: [PATCH v5 1/4] printk/nmi: generic solution for safe printk in NMI

2017-04-20 Thread Petr Mladek
On Thu 2017-04-20 12:31:12, Sergey Senozhatsky wrote: > Hello Steven, > > On (04/19/17 13:13), Steven Rostedt wrote: > > > printk() takes some locks and could not be used a safe way in NMI context. > > > > I just found a problem with this solution. It kills ftrace dumps from > > NMI context :-(

Re: [PATCH 1/2] powerpc: kprobes: blacklist exception handlers

2017-04-20 Thread Michael Ellerman
"Naveen N. Rao" writes: > Excerpts from Michael Ellerman's message of April 20, 2017 12:03: >> "Naveen N. Rao" writes: >> >>> diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c >>> index

Re: [PATCH] powerpc/32: Move entry_32 functions just after HEAD functions.

2017-04-20 Thread Christophe LEROY
Le 20/04/2017 à 13:25, Michael Ellerman a écrit : David Laight writes: From: Christophe Leroy By default, PPC8xx PINs an ITLB on the first 8M of memory in order to avoid any ITLB miss on kernel code. However, with some debug functions like DEBUG_PAGEALLOC and (soon

RE: [PATCH] powerpc/32: Move entry_32 functions just after HEAD functions.

2017-04-20 Thread Michael Ellerman
David Laight writes: > From: Christophe Leroy >> By default, PPC8xx PINs an ITLB on the first 8M of memory in order >> to avoid any ITLB miss on kernel code. >> However, with some debug functions like DEBUG_PAGEALLOC and >> (soon to come) DEBUG_RODATA, the PINned TLB is

Re: [kernel-hardening] Re: [PATCH] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-20 Thread Michael Ellerman
Kees Cook writes: > On Wed, Apr 19, 2017 at 7:29 AM, Michael Ellerman wrote: >> Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two >> sysctls that allow a user to configure the number of bits of randomness used >> for >>

Re: [PATCH v2] powerpc/book3s: mce: Move add_taint() later in virtual mode.

2017-04-20 Thread Daniel Axtens
Hi Mahesh, > diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c > index a1475e6..b23b323 100644 > --- a/arch/powerpc/kernel/mce.c > +++ b/arch/powerpc/kernel/mce.c > @@ -221,6 +221,8 @@ static void machine_check_process_queued_event(struct > irq_work *work) > { > int

Re: [kernel-hardening] Re: [PATCH] powerpc/mm: Add support for runtime configuration of ASLR limits

2017-04-20 Thread Michael Ellerman
Hi Bhupesh, Bhupesh Sharma writes: > On Wed, Apr 19, 2017 at 7:59 PM, Michael Ellerman wrote: >> Add powerpc support for mmap_rnd_bits and mmap_rnd_compat_bits, which are two >> sysctls that allow a user to configure the number of bits of randomness

Re: [PATCH] of: introduce event tracepoints for dynamic device_node lifecyle

2017-04-20 Thread Frank Rowand
On 04/19/17 19:37, Frank Rowand wrote: > On 04/19/17 11:45, Tyrel Datwyler wrote: >> On 04/18/2017 07:49 PM, Steven Rostedt wrote: >>> On Tue, 18 Apr 2017 18:42:32 -0700 >>> Frank Rowand wrote: >>> And of course the other issue with using tracepoints is the extra

Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-20 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote: > v6: >Update according to the review comments from >Jiri Olsa . Major modifications are: > >1. Move that multiline conditional code inside {} brackets. > >2. Move branch_type_stat_display() from

Re: [RFC PATCH] powerpc/mm/radix: Optimize tlbiel flush

2017-04-20 Thread Anton Blanchard
Hi Aneesh, > For a page walk cache flush, we don't need to loop with set number. > The set number is ignored with RIC=1 (pwc flush). > > For RIC=2 (flush all), inorder to flush implementation dependent > caches, we can ignore the set number. Hence we do a RIC=2 flush with > set no: 0, so we do

[RFC PATCH] powerpc/mm/radix: Optimize tlbiel flush

2017-04-20 Thread Aneesh Kumar K.V
For a page walk cache flush, we don't need to loop with set number. The set number is ignored with RIC=1 (pwc flush). For RIC=2 (flush all), inorder to flush implementation dependent caches, we can ignore the set number. Hence we do a RIC=2 flush with set no: 0, so we do both the tlb flush for

Re: [PATCH v3 3/7] kprobes: validate the symbol name length

2017-04-20 Thread Naveen N. Rao
Excerpts from Michael Ellerman's message of April 20, 2017 11:38: "Naveen N. Rao" writes: diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 6a128f3a7ed1..bb86681c8a10 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1382,6 +1382,28 @@ bool

Re: [PATCH 1/2] powerpc: kprobes: blacklist exception handlers

2017-04-20 Thread Naveen N. Rao
Excerpts from Michael Ellerman's message of April 20, 2017 12:03: "Naveen N. Rao" writes: diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 71286dfd76a0..59159337a097 100644 --- a/arch/powerpc/kernel/kprobes.c +++

Re: [PATCH 1/2] powerpc: kprobes: blacklist exception handlers

2017-04-20 Thread Michael Ellerman
"Naveen N. Rao" writes: > diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c > index 71286dfd76a0..59159337a097 100644 > --- a/arch/powerpc/kernel/kprobes.c > +++ b/arch/powerpc/kernel/kprobes.c > @@ -112,6 +113,14 @@ kprobe_opcode_t

Re: [PATCH v3 6/7] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-04-20 Thread Michael Ellerman
"Naveen N. Rao" writes: > Excerpts from Masami Hiramatsu's message of April 19, 2017 20:13: >> >> BTW, as I pointed, 5/7 and 6/7 should be merged since this actually >> makes meaningful change. > > Yes, sorry if I wasn't clear in my previous reply in the (!)

Re: [PATCH v3 3/7] kprobes: validate the symbol name length

2017-04-20 Thread Michael Ellerman
"Naveen N. Rao" writes: > diff --git a/kernel/kprobes.c b/kernel/kprobes.c > index 6a128f3a7ed1..bb86681c8a10 100644 > --- a/kernel/kprobes.c > +++ b/kernel/kprobes.c > @@ -1382,6 +1382,28 @@ bool within_kprobe_blacklist(unsigned long addr) > return false;

Re: [PATCH 3/3] powerpc/mm: Implement CONFIG_DEBUG_RODATA on PPC32

2017-04-20 Thread Michael Ellerman
christophe leroy writes: > Le 19/04/2017 à 16:22, Christophe LEROY a écrit : >> >> >> Le 19/04/2017 à 16:01, Michael Ellerman a écrit : >>> Christophe Leroy writes: >>> diff --git a/arch/powerpc/kernel/ftrace.c