Re: [PATCH 7/7] powerpc/kprobes: Allow probing on any ftrace address

2019-06-21 Thread Joe Perches
On Fri, 2019-06-21 at 23:50 +0900, Masami Hiramatsu wrote: > On Tue, 18 Jun 2019 20:17:06 +0530 > "Naveen N. Rao" wrote: trivia: > > diff --git a/arch/powerpc/kernel/kprobes-ftrace.c > > b/arch/powerpc/kernel/kprobes-ftrace.c [] > > @@ -57,6 +82,11 @@ NOKPROBE_SYMBOL(kprobe_ftrace_handler); >

Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

2019-06-21 Thread Nicholas Piggin
Christoph Hellwig's on June 21, 2019 6:15 pm: > On Thu, Jun 20, 2019 at 10:21:46AM -0700, Linus Torvalds wrote: >> Hmm. Honestly, I've never seen anything like that in any kernel profiles. >> >> Compared to the problems I _do_ see (which is usually the obvious >> cache misses, and locking), it

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread Andrew Morton
On Fri, 21 Jun 2019 20:24:59 +0200 David Hildenbrand wrote: > @Qian Cai, unfortunately I can't reproduce. > > If you get the chance, it would be great if you could retry with > > diff --git a/drivers/base/memory.c b/drivers/base/memory.c > index 972c5336bebf..742f99ddd148 100644 > ---

Re: [PATCH 11/13] powerpc/64s: Save r13 in machine_check_common_early

2019-06-21 Thread Nicholas Piggin
Mahesh J Salgaonkar's on June 21, 2019 9:47 pm: > On 2019-06-21 06:27:15 Fri, Santosh Sivaraj wrote: >> From: Reza Arbab >> >> Testing my memcpy_mcsafe() work in progress with an injected UE, I get >> an error like this immediately after the function returns: >> >> BUG: Unable to handle kernel

[PATCH] powerpc/64s/exception: Fix machine check early corrupting AMR

2019-06-21 Thread Nicholas Piggin
The early machine check runs in real mode, so locking is unnecessary. Worse, the windup does not restore AMR, so this can result in a false KUAP fault after a recoverable machine check hits inside a user copy operation. Fix this similarly to HMI by just avoiding the kuap lock in the early machine

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread Qian Cai
_memory_block_hinted()" > > 5cfcd52288b6 Revert "drivers-base-memoryc-get-rid-of- > > find_memory_block_hinted- > > v3" > > > > [4.582081][T1] ACPI FADT declares the system doesn't support PCIe > > ASPM, > > so disable it > &g

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread David Hildenbrand
ry_hotplug: move and simplify >>>> walk_memory_blocks()" >>>> 59a9f3eec5d1 Revert "drivers/base/memory.c: Get rid of >>>> find_memory_block_hinted()" >>>> 5cfcd52288b6 Revert "drivers-base-memoryc-get-rid-of- >>>> find_memory_blo

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread Qian Cai
ot;drivers/base/memory.c: Get rid of > > > find_memory_block_hinted()" > > > 5cfcd52288b6 Revert "drivers-base-memoryc-get-rid-of- > > > find_memory_block_hinted- > > > v3" > > > > > > [4.582081][T1] ACPI FADT declares

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread David Hildenbrand
_block_hinted- >> v3" >> >> [4.582081][T1] ACPI FADT declares the system doesn't support PCIe >> ASPM, >> so disable it >> [4.590405][T1] ACPI: bus type PCI registered >> [4.592908][T1] PCI: MMCONFIG for domain [bus 00-ff]

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread David Hildenbrand
memoryc-get-rid-of-find_memory_block_hinted- > v3" > > [4.582081][T1] ACPI FADT declares the system doesn't support PCIe > ASPM, > so disable it > [4.590405][T1] ACPI: bus type PCI registered > [4.592908][T1] PCI: MMCONFIG for domain [bus 00-ff] at

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Jason Gunthorpe
On Fri, Jun 21, 2019 at 09:35:11AM -0600, Khalid Aziz wrote: > On 6/21/19 7:39 AM, Jason Gunthorpe wrote: > > On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote: > >> This will allow sparc64 to override its ADI tags for > >> get_user_pages and get_user_pages_fast. > >> > >>

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Khalid Aziz
On 6/21/19 7:39 AM, Jason Gunthorpe wrote: > On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote: >> This will allow sparc64 to override its ADI tags for >> get_user_pages and get_user_pages_fast. >> >> Signed-off-by: Christoph Hellwig >> mm/gup.c | 4 ++-- >> 1 file changed, 2

Re: [PATCH v3 5/6] mm/memory_hotplug: Move and simplify walk_memory_blocks()

2019-06-21 Thread David Hildenbrand
On 20.06.19 20:31, David Hildenbrand wrote: > Let's move walk_memory_blocks() to the place where memory block logic > resides and simplify it. While at it, add a type for the callback function. > > Cc: Greg Kroah-Hartman > Cc: "Rafael J. Wysocki" > Cc: David Hildenbrand > Cc: Andrew Morton >

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread David Hildenbrand
memoryc-get-rid-of-find_memory_block_hinted- > v3" > > [4.582081][T1] ACPI FADT declares the system doesn't support PCIe > ASPM, > so disable it > [4.590405][T1] ACPI: bus type PCI registered > [4.592908][T1] PCI: MMCONFIG for domain [bus 00-ff] at

Re: [PATCH v3 0/6] mm: Further memory block device cleanups

2019-06-21 Thread Qian Cai
ff] at [mem 0x8000-0x8fff] (base 0x8000) [4.601860][T1] PCI: MMCONFIG at [mem 0x8000-0x8fff] reserved in E820 [4.601860][T1] PCI: Using configuration type 1 for base access [   28.661336][   C16] watchdog: BUG: soft lockup - CPU#16 stuck for 22s! [swapper/0:1] [   28.67135

Re: [PATCH 7/7] powerpc/kprobes: Allow probing on any ftrace address

2019-06-21 Thread Masami Hiramatsu
On Tue, 18 Jun 2019 20:17:06 +0530 "Naveen N. Rao" wrote: > With KPROBES_ON_FTRACE, kprobe is allowed to be inserted on instructions > that branch to _mcount (referred to as ftrace location). With > -mprofile-kernel, we now include the preceding 'mflr r0' as being part > of the ftrace location.

Re: switch the remaining architectures to use generic GUP v3

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:46PM +0200, Christoph Hellwig wrote: > Hi Linus and maintainers, > > below is a series to switch mips, sh and sparc64 to use the generic > GUP code so that we only have one codebase to touch for further > improvements to this code. I don't have hardware for any of

Re: [PATCH 6/7] kprobes/ftrace: Use ftrace_location() when [dis]arming probes

2019-06-21 Thread Masami Hiramatsu
On Tue, 18 Jun 2019 20:17:05 +0530 "Naveen N. Rao" wrote: > Ftrace location could include more than a single instruction in case of > some architectures (powerpc64, for now). In this case, kprobe is > permitted on any of those instructions, and uses ftrace infrastructure > for functioning. > >

Re: [PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:57PM +0200, Christoph Hellwig wrote: > @@ -2168,7 +2221,7 @@ static void gup_pgd_range(unsigned long addr, unsigned > long end, > */ > static bool gup_fast_permitted(unsigned long start, unsigned long end) > { > - return true; > + return

Re: [PATCH 10/16] mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:56PM +0200, Christoph Hellwig wrote: > We only support the generic GUP now, so rename the config option to > be more clear, and always use the mm/Kconfig definition of the > symbol and select it from the arch Kconfigs. Looks OK to me Reviewed-by: Jason Gunthorpe

Re: [PATCH 04/16] MIPS: use the generic get_user_pages_fast code

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:50PM +0200, Christoph Hellwig wrote: > diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h > index 4ccb465ef3f2..7d27194e3b45 100644 > +++ b/arch/mips/include/asm/pgtable.h > @@ -20,6 +20,7 @@ > #include > #include > #include >

Re: [PATCH 03/16] mm: lift the x86_32 PAE version of gup_get_pte to common code

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:49PM +0200, Christoph Hellwig wrote: > The split low/high access is the only non-READ_ONCE version of > gup_get_pte that did show up in the various arch implemenations. > Lift it to common code and drop the ifdef based arch override. > > Signed-off-by: Christoph

Re: [PATCH 02/16] mm: simplify gup_fast_permitted

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:48PM +0200, Christoph Hellwig wrote: > Pass in the already calculated end value instead of recomputing it, and > leave the end > start check in the callers instead of duplicating them > in the arch code. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote: > This will allow sparc64 to override its ADI tags for > get_user_pages and get_user_pages_fast. > > Signed-off-by: Christoph Hellwig > mm/gup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH 01/16] mm: use untagged_addr() for get_user_pages_fast addresses

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:47PM +0200, Christoph Hellwig wrote: > This will allow sparc64 to override its ADI tags for > get_user_pages and get_user_pages_fast. > > Signed-off-by: Christoph Hellwig > --- > mm/gup.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by:

Re: [PATCH 11/13] powerpc/64s: Save r13 in machine_check_common_early

2019-06-21 Thread Mahesh J Salgaonkar
On 2019-06-21 06:27:15 Fri, Santosh Sivaraj wrote: > From: Reza Arbab > > Testing my memcpy_mcsafe() work in progress with an injected UE, I get > an error like this immediately after the function returns: > > BUG: Unable to handle kernel data access at 0x7fff84dec8f8 > Faulting instruction

Re: [PATCH 2/4] powerpc/powernv: remove the unused tunneling exports

2019-06-21 Thread Christoph Hellwig
On Fri, Jun 21, 2019 at 11:21:38AM +0200, Frederic Barrat wrote: > The as-notify can be used in both CAPI mode and PCI mode. In capi mode, > it's integrated in the capi protocol, so the cxl driver doesn't need to do > extra setup, compared to what's already done to activate capi. > As mentioned

Re: [PATCH 2/4] powerpc/powernv: remove the unused tunneling exports

2019-06-21 Thread Frederic Barrat
Le 21/06/2019 à 03:47, Oliver O'Halloran a écrit : On Thu, May 23, 2019 at 5:51 PM Christoph Hellwig wrote: These have been unused ever since they've been added to the kernel. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/pnv-pci.h| 4 --

[PATCH] powerpc/lib/xor_vmx: Relax frame size for clang

2019-06-21 Thread Mathieu Malaterre
When building with clang-8 the frame size limit is hit: ../arch/powerpc/lib/xor_vmx.c:119:6: error: stack frame size of 1200 bytes in function '__xor_altivec_5' [-Werror,-Wframe-larger-than=] Follow the same approach as commit 9c87156cce5a ("powerpc/xmon: Relax frame size for clang") until a

Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

2019-06-21 Thread Nicholas Piggin
Linus Torvalds's on June 21, 2019 3:21 am: > On Thu, Jun 20, 2019 at 5:19 AM Nicholas Piggin wrote: >> >> The processor aliasing problem happens because the struct will >> be initialised with stores using one base register (e.g., stack >> register), and then same memory is loaded using a

Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

2019-06-21 Thread Christoph Hellwig
On Thu, Jun 20, 2019 at 10:21:46AM -0700, Linus Torvalds wrote: > Hmm. Honestly, I've never seen anything like that in any kernel profiles. > > Compared to the problems I _do_ see (which is usually the obvious > cache misses, and locking), it must either be in the noise or it's > some problem

Re: [PATCH 05/13] powerpc/mce: Allow notifier callback to handle MCE

2019-06-21 Thread Mahesh Jagannath Salgaonkar
On 6/21/19 6:27 AM, Santosh Sivaraj wrote: > From: Reza Arbab > > If a notifier returns NOTIFY_STOP, consider the MCE handled, just as we > do when machine_check_early() returns 1. > > Signed-off-by: Reza Arbab > --- > arch/powerpc/include/asm/asm-prototypes.h | 2 +- >

[PATCH] powerpc/rtas: retry when cpu offline races with suspend/migration

2019-06-21 Thread Nathan Lynch
The protocol for suspending or migrating an LPAR requires all present processor threads to enter H_JOIN. So if we have threads offline, we have to temporarily bring them up. This can race with administrator actions such as SMT state changes. As of dfd718a2ed1f ("powerpc/rtas: Fix a potential race