Re: [PATCH 07/10] powerpc: add NMI IPI infrastructure

2017-02-03 Thread Nicholas Piggin
On Fri, 3 Feb 2017 21:45:24 +1000 Nicholas Piggin wrote: > On Tue, 20 Dec 2016 04:30:08 +1000 > Nicholas Piggin wrote: > > > +static void do_smp_send_nmi_ipi(int cpu) > > +{ > > + if (cpu >= 0) { > > + do_message_pass(cpu, PPC_MSG_NMI_IPI); > > + } else { > > + unsigned

Re: [PATCH v2 1/1] powerpc: mm: support ARCH_MMAP_RND_BITS

2017-02-03 Thread Kees Cook
On Thu, Feb 2, 2017 at 9:11 PM, Bhupesh Sharma wrote: > 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 effective

Re: [PATCH 1 0/4] PCI: Use of_device_get_match_data() to simplify probe

2017-02-03 Thread Bjorn Helgaas
On Tue, Jan 31, 2017 at 02:19:51PM -0600, Bjorn Helgaas wrote: > This turned into much ado about nothing, but Shailendra's hisi patch > prompted similar cleanups in other drivers. It's a minor simplification, > but I think worth doing consistently across drivers. > > Basically this is Geert's obs

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Josh Poimboeuf
On Thu, Feb 02, 2017 at 12:51:16PM +0100, Petr Mladek wrote: > !!! This is the right version. I am sorry again for the confusion. !!! > > > Change livepatch to use a basic per-task consistency model. This is the > > foundation which will eventually enable us to patch those ~10% of > > security pa

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

2017-02-03 Thread Naveen N. Rao
Hi Michael, Thanks for the review! I'll defer to Anju on most of the aspects, but... On 2017/02/01 09:53PM, Michael Ellerman wrote: > Anju T Sudhakar writes: > > > +static void optimized_callback(struct optimized_kprobe *op, > > + struct pt_regs *regs) > > +{ > > + str

Re: [PATCH v4 15/15] livepatch: allow removal of a disabled patch

2017-02-03 Thread Miroslav Benes
On Thu, 19 Jan 2017, Josh Poimboeuf wrote: > From: Miroslav Benes > > Currently we do not allow patch module to unload since there is no > method to determine if a task is still running in the patched code. > > The consistency model gives us the way because when the unpatching > finishes we kno

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Miroslav Benes
Petr has already mentioned majority of things I too found out, so only couple of nits... > diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch > b/Documentation/ABI/testing/sysfs-kernel-livepatch > index da87f43..24b6570 100644 > --- a/Documentation/ABI/testing/sysfs-kernel-livepatch

Re: [PATCH v5 0/3] modversions: redefine kcrctab entries as 32-bit values

2017-02-03 Thread Linus Torvalds
On Fri, Feb 3, 2017 at 1:54 AM, Ard Biesheuvel wrote: > This v4 is a followup to [0] 'modversions: redefine kcrctab entries as > relative CRC pointers' [...] ok, I have this in a local branch now, assuming it passes my (admittedly fairly superficial) testing I'll merge it so that we can put this

Re: [PATCH v4 13/15] livepatch: change to a per-task consistency model

2017-02-03 Thread Miroslav Benes
On Thu, 2 Feb 2017, Petr Mladek wrote: > > diff --git a/Documentation/livepatch/livepatch.txt > > b/Documentation/livepatch/livepatch.txt > > index 7f04e13..fb00d66 100644 > > --- a/Documentation/livepatch/livepatch.txt > > +++ b/Documentation/livepatch/livepatch.txt > > > + In that case, arche

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Paul E. McKenney
On Fri, Feb 03, 2017 at 07:44:57AM -0800, Paul E. McKenney wrote: > On Fri, Feb 03, 2017 at 02:37:48PM +0100, Peter Zijlstra wrote: > > On Fri, Feb 03, 2017 at 01:59:34PM +0100, Mike Galbraith wrote: > > > On Fri, 2017-02-03 at 09:53 +0100, Peter Zijlstra wrote: > > > > On Fri, Feb 03, 2017 at 10:0

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Paul E. McKenney
On Fri, Feb 03, 2017 at 02:37:48PM +0100, Peter Zijlstra wrote: > On Fri, Feb 03, 2017 at 01:59:34PM +0100, Mike Galbraith wrote: > > On Fri, 2017-02-03 at 09:53 +0100, Peter Zijlstra wrote: > > > On Fri, Feb 03, 2017 at 10:03:14AM +0530, Sachin Sant wrote: > > > > > > I ran few cycles of cpu hot(

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Sachin Sant
[  173.493453] INFO: rcu_sched detected stalls on CPUs/tasks:[  173.493473] 8-...: (2 GPs behind) idle=006/140/0 softirq=0/0 fqs=2996 [  173.493476] (detected by 0, t=6002 jiffies, g=885, c=884, q=6350)Right, I actually saw that too, but I don't think that would be relatedto my patch.

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Mike Galbraith
On Fri, 2017-02-03 at 14:37 +0100, Peter Zijlstra wrote: > On Fri, Feb 03, 2017 at 01:59:34PM +0100, Mike Galbraith wrote: > > FWIW, I'm not seeing stalls/hangs while beating hotplug up in tip. (so > > next grew a wart?) > > I've seen it on tip. It looks like hot unplug goes really slow when > th

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Peter Zijlstra
On Fri, Feb 03, 2017 at 01:59:34PM +0100, Mike Galbraith wrote: > On Fri, 2017-02-03 at 09:53 +0100, Peter Zijlstra wrote: > > On Fri, Feb 03, 2017 at 10:03:14AM +0530, Sachin Sant wrote: > > > > I ran few cycles of cpu hot(un)plug tests. In most cases it works except > > > one > > > where I ran

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Borislav Petkov
On Thu, Feb 02, 2017 at 04:55:06PM +0100, Peter Zijlstra wrote: > On Tue, Jan 31, 2017 at 10:22:47AM -0700, Ross Zwisler wrote: > > On Tue, Jan 31, 2017 at 4:48 AM, Mike Galbraith wrote: > > > On Tue, 2017-01-31 at 16:30 +0530, Sachin Sant wrote: > > > Could some of you test this? It seems to cu

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Mike Galbraith
On Fri, 2017-02-03 at 09:53 +0100, Peter Zijlstra wrote: > On Fri, Feb 03, 2017 at 10:03:14AM +0530, Sachin Sant wrote: > > I ran few cycles of cpu hot(un)plug tests. In most cases it works except one > > where I ran into rcu stall: > > > > [ 173.493453] INFO: rcu_sched detected stalls on CPUs/t

Timekeeping oddities on MacMini G4s

2017-02-03 Thread Jochen Rollwagen
Hello There, here's the output on a mac mini g4 1,5GhZ running OS X 10.4 which hadn't booted that OS in ages :-) jochen-rollwagens-mac-mini:~ jochenrollwagen$ ntpq -c "rv 0 frequency" localhost status=c011 sync_alarm, sync_unspec, 1 event, event_restart, frequency=0.000 If there's anything

Re: [PATCH 07/10] powerpc: add NMI IPI infrastructure

2017-02-03 Thread Nicholas Piggin
On Tue, 20 Dec 2016 04:30:08 +1000 Nicholas Piggin wrote: > +static void do_smp_send_nmi_ipi(int cpu) > +{ > + if (cpu >= 0) { > + do_message_pass(cpu, PPC_MSG_NMI_IPI); > + } else { > + unsigned int c; > + > + for_each_online_cpu(c) { > +

[GIT PULL] Please pull powerpc/linux.git powerpc-4.10-3 tag

2017-02-03 Thread Michael Ellerman
Hi Linus, Please pull some more powerpc fixes for 4.10: The following changes since commit 178f358208ceb8b38e5cff3f815e0db4a6a70a07: powerpc: Ignore reserved field in DCSR and PVR reads and writes (2017-01-20 15:21:35 +1100) are available in the git repository at: git://git.kernel.org/pub

[PATCH v3 9/9] powerpc: Add new cache geometry aux vectors

2017-02-03 Thread Michael Ellerman
From: 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

[PATCH v3 8/9] powerpc/64: Hard code cache geometry on POWER8

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt All shipping firmware versions have it wrong in the device-tree Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/setup_64.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) v3: Rather than de

[PATCH v3 7/9] powerpc/64: Add L2 and L3 cache shape info

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt Retrieved from device-tree when available Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/cache.h | 2 ++ arch/powerpc/kernel/setup_64.c | 26 +- 2 files changed, 23 insertions(+), 5 del

[PATCH v3 6/9] powerpc/64: Clean up ppc64_caches using a struct per cache

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt We have two set of identical struct members for the I and D sides and mostly identical bunches of code to parse the device-tree to populate them. Instead make a ppc_cache_info structure with one copy for I and one for D Signed-off-by: Benjamin Herrenschmidt Signed-o

[PATCH v3 5/9] powerpc/64: Retrieve number of L1 cache sets from device-tree

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt It will be used to calculate the associativity Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/cache.h | 2 ++ arch/powerpc/kernel/setup_64.c | 28 ++-- 2 files changed, 28 insertions(+)

[PATCH v3 4/9] powerpc/64: Fix naming of cache block vs. cache line

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt In a number of places we called "cache line size" what is actually the cache block size, which in the powerpc architecture, means the effective size to use with cache management instructions (it can be different from the actual cache line size). We fix the naming acr

[PATCH v3 3/9] powerpc: Remove obsolete comment about patching instructions

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt We don't patch instructions based on the cache lines or block sizes these days. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/setup_64.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/kernel/setup

[PATCH v3 2/9] powerpc: Move {d, i, u}cache_bsize definitions to a common place

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt The variables are defined twice in setup_32.c and setup_64.c, do it once in setup-common.c instead Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/setup-common.c | 9 + arch/powerpc/kernel/setup_32.c | 8 --

[PATCH v3 1/9] powerpc: Move ARCH_DLINFO out of uapi

2017-02-03 Thread Michael Ellerman
From: Benjamin Herrenschmidt It's an kernel private macro, it doesn't belong there Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/elf.h | 22 ++ arch/powerpc/include/uapi/asm/elf.h | 23 --- 2 fil

Re: [PATCH] powerpc/mm: Fix spurrious segfaults on radix with Autonuma

2017-02-03 Thread Balbir Singh
On Fri, Feb 03, 2017 at 05:10:28PM +1100, Benjamin Herrenschmidt wrote: > When autonuma marks a PTE inaccessible it clears all the protection > bits but leave the PTE valid. > > With the Radix MMU, an attempt at executing from such a PTE will > take a fault with bit 35 of SRR1 set "SRR1_ISI_N_OR_G

Re: xmon memory dump does not handle LE

2017-02-03 Thread Michael Ellerman
Douglas Miller writes: > I'm referring to the three commands listed in the help: > > d dump bytes > > dfdump float values > > dddump double values > > As it turns out, all three of these commands do exactly the same thing, > and it's certainly not what I'd expect based on experience

[PATCH v5 3/3] module: unify absolute krctab definitions for 32-bit and 64-bit

2017-02-03 Thread Ard Biesheuvel
The previous patch introduced a separate inline asm version of the krcrctab declaration template for use with 64-bit architectures, which cannot refer to ELF symbols using 32-bit quantities. This declaration should be equivalent to the C one for 32-bit architectures, but this needs to be checked fi

[PATCH v5 2/3] modversions: treat symbol CRCs as 32 bit quantities

2017-02-03 Thread Ard Biesheuvel
The modversion symbol CRCs are emitted as ELF symbols, which allows us to easily populate the kcrctab sections by relying on the linker to associate each kcrctab slot with the correct value. This has a couple of downsides: - Given that the CRCs are treated as memory addresses, we waste 4 bytes f

[PATCH v5 1/3] kbuild: modversions: add infrastructure for emitting relative CRCs

2017-02-03 Thread Ard Biesheuvel
This add the kbuild infrastructure that will allow architectures to emit vmlinux symbol CRCs as 32-bit offsets to another location in the kernel where the actual value is stored. This works around problems with CRCs being mistaken for relocatable symbols on kernels that self relocate at runtime (i.

[PATCH v5 0/3] modversions: redefine kcrctab entries as 32-bit values

2017-02-03 Thread Ard Biesheuvel
This v4 is a followup to [0] 'modversions: redefine kcrctab entries as relative CRC pointers', but since relative CRC pointers do not work in modules, and are actually only needed by powerpc with CONFIG_RELOCATABLE=y, I have made it a Kconfig selectable feature instead. Patch #1 introduces the MOD

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

2017-02-03 Thread Borislav Petkov
On Fri, Feb 03, 2017 at 10:55:33AM +1100, Michael Ellerman wrote: > > So I'd like to have an ACK from a PPC maintainer here first before I > > apply this. > > It's fine with me: > > Acked-by: Michael Ellerman Applied, thanks guys. -- Regards/Gruss, Boris. Good mailing practices for 400:

Re: [tip:sched/core] sched/core: Add debugging code to catch missing update_rq_clock() calls

2017-02-03 Thread Peter Zijlstra
On Fri, Feb 03, 2017 at 10:03:14AM +0530, Sachin Sant wrote: > > > On 02-Feb-2017, at 9:25 PM, Peter Zijlstra wrote: > > > > On Tue, Jan 31, 2017 at 10:22:47AM -0700, Ross Zwisler wrote: > >> On Tue, Jan 31, 2017 at 4:48 AM, Mike Galbraith wrote: > >>> On Tue, 2017-01-31 at 16:30 +0530, Sachin

Re: modversions: redefine kcrctab entries as 32-bit values

2017-02-03 Thread Ard Biesheuvel
On 3 February 2017 at 05:09, Jessica Yu wrote: > +++ Jessica Yu [02/02/17 22:54 -0500]: >> >> +++ Ard Biesheuvel [24/01/17 16:16 +]: >>> >>> This v4 is a followup to [0] 'modversions: redefine kcrctab entries as >>> relative CRC pointers', but since relative CRC pointers do not work in >>> mod