Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset

2017-03-08 Thread Michael Ellerman
"Naveen N. Rao" writes: > On 2017/03/08 11:29AM, Arnaldo Carvalho de Melo wrote: >> > I wasn't sure if you were planning on picking up KPROBES_ON_FTRACE for >> > v4.11. If so, it would be good to take this patch through the powerpc >> > tree. Otherwise, this can go via Ingo's tree. >> >> If you

Re: [FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-08 Thread Sachin Sant
> Fix this by ensuring that of_node_put() is called only from the > error path in dlpar_cpu_remove_by_index(). In the normal path, > of_node_put() happens as part of dlpar_detach_node(). > > Signed-off-by: Bharata B Rao > Cc: Nathan Fontenot > --- > Changes in v1: > - Fixed the refcount problem

Re: [PATCH] net: toshiba: ps3_genic_net: use new api ethtool_{get|set}_link_ksettings

2017-03-08 Thread David Miller
From: Philippe Reynes Date: Sun, 5 Mar 2017 23:21:06 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

[PATCH] powerpc: asm: convert directive .llong to .8byte

2017-03-08 Thread Tobin C. Harding
.llong is an undocumented PPC specific directive. The generic equivalent is .quad, but even better (because it's self describing) is .8byte. Convert directives .llong -> .8byte Signed-off-by: Tobin C. Harding --- Fixes: issue #33 (github) Patch is not tested. Has been built on Power8 scripts/

Re: [PATCH 3/3] powerpc/64s: POWER9 machine check handler

2017-03-08 Thread Nicholas Piggin
On Tue, 28 Feb 2017 12:37:23 +0530 Mahesh Jagannath Salgaonkar wrote: > On 02/28/2017 07:30 AM, Nicholas Piggin wrote: > > +long __machine_check_early_realmode_p9(struct pt_regs *regs) > > +{ > > + uint64_t nip, addr; > > + long handled; > > + struct mce_error_info mce_error_info = { 0 };

Re: [PATCH 1/3] futex: remove duplicated code

2017-03-08 Thread H. Peter Anvin
,Thomas Gleixner ,Ingo Molnar ,Chris Zankel ,Max Filippov ,Arnd Bergmann ,x...@kernel.org,linux-al...@vger.kernel.org,linux-snps-...@lists.infradead.org,linux-arm-ker...@lists.infradead.org,linux-hexa...@vger.kernel.org,linux-i...@vger.kernel.org,linux-m...@linux-mips.org,openr...@lists.librecor

[FIX PATCH v1] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-08 Thread Bharata B Rao
The following warning is seen when a CPU is hot unplugged on a PowerKVM guest: refcount_t: underflow; use-after-free. [ cut here ] WARNING: CPU: 0 PID: 53 at lib/refcount.c:128 refcount_sub_and_test+0xd8/0xf0 Modules linked in: CPU: 0 PID: 53 Comm: kworker/u510:1 Not tainte

Re: [PATCH kernel v7 09/10] KVM: PPC: iommu: Unify TCE checking

2017-03-08 Thread Alexey Kardashevskiy
On 08/03/17 14:00, Alexey Kardashevskiy wrote: > This reworks helpers for checking TCE update parameters in way they > can be used in KVM. > > This should cause no behavioral change. > > Signed-off-by: Alexey Kardashevskiy (for patchwork) Forgot this from v6: Reviewed-by: David Gibson > --

Re: [PATCH 1/3] futex: remove duplicated code

2017-03-08 Thread Rob Landley
On 03/04/2017 07:05 AM, Russell King - ARM Linux wrote: > On Fri, Mar 03, 2017 at 01:27:10PM +0100, Jiri Slaby wrote: >> diff --git a/kernel/futex.c b/kernel/futex.c >> index b687cb22301c..c5ff9850952f 100644 >> --- a/kernel/futex.c >> +++ b/kernel/futex.c >> @@ -1457,6 +1457,42 @@ futex_wake(u32 _

[PATCH v2] selftests/powerpc: Replace stxvx and lxvx with their equivalent instruction

2017-03-08 Thread Cyril Bur
On POWER8 (ISA 2.07) lxvx and stxvx are defined to be extended mnemonics of lxvd2x and stxvd2x. For POWER9 (ISA 3.0) the HW architects in their infinite wisdom made lxvx and stxvx instructions in their own right. POWER9 aware GCC will use the POWER9 instruction for lxvx and stxvx causing these sel

kernel versions

2017-03-08 Thread Tobin C. Harding
Recently the kernel version on the github repository did not match up with the master branch of https://kernel.googlesource.com/pub/scm/linux/kernel/git/powerpc/linux Specifically, github was hosting v4.10-rc5 while master had v4.10-rc8. All the while Linus' mainline was at v4.11-rc1. Was this a

Re: [PATCH] axonram: Fix gendisk handling

2017-03-08 Thread Jens Axboe
On 03/08/2017 06:56 AM, Jan Kara wrote: > It is invalid to call del_gendisk() when disk->queue is NULL. Fix error > handling in axon_ram_probe() to avoid doing that. > > Also del_gendisk() does not drop a reference to gendisk allocated by > alloc_disk(). That has to be done by put_disk(). Add that

Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset

2017-03-08 Thread Naveen N. Rao
On 2017/03/08 11:29AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 08, 2017 at 07:54:12PM +0530, Naveen N. Rao escreveu: > > Hi Michael, > > > > On 2017/03/08 09:43PM, Michael Ellerman wrote: > > > "Naveen N. Rao" writes: > > > > > > > With ABIv2, we offset 8 bytes into a function to get at th

Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset

2017-03-08 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 08, 2017 at 07:54:12PM +0530, Naveen N. Rao escreveu: > Hi Michael, > > On 2017/03/08 09:43PM, Michael Ellerman wrote: > > "Naveen N. Rao" writes: > > > > > With ABIv2, we offset 8 bytes into a function to get at the local entry > > > point. > > > > > > Acked-by: Ananth N Mavinakayan

Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset

2017-03-08 Thread Naveen N. Rao
Hi Michael, On 2017/03/08 09:43PM, Michael Ellerman wrote: > "Naveen N. Rao" writes: > > > With ABIv2, we offset 8 bytes into a function to get at the local entry > > point. > > > > Acked-by: Ananth N Mavinakayanahalli > > Acked-by: Michael Ellerman > > Signed-off-by: Naveen N. Rao > > --- >

[PATCH] axonram: Fix gendisk handling

2017-03-08 Thread Jan Kara
It is invalid to call del_gendisk() when disk->queue is NULL. Fix error handling in axon_ram_probe() to avoid doing that. Also del_gendisk() does not drop a reference to gendisk allocated by alloc_disk(). That has to be done by put_disk(). Add that call where needed. Reported-by: Dan Carpenter S

Re: 4.11.0-rc1 boot resulted in WARNING: CPU: 14 PID: 1722 at fs/sysfs/dir.c:31 .sysfs_warn_dup+0x78/0xb0

2017-03-08 Thread Brian Foster
On Tue, Mar 07, 2017 at 10:01:04PM +0530, Abdul Haleem wrote: > > Hi, > > Today's mainline (4.11.0-rc1) booted with warnings on Power7 LPAR. > > Issue is not reproducible all the time. > > traces: > > Found device VDASD 5. > Mounting /home... > Reached target Swap. > Found device VDASD

Applied "ASoC: fsl: Remove unneeded init of static variable" to the asoc tree

2017-03-08 Thread Mark Brown
The patch ASoC: fsl: Remove unneeded init of static variable has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent

Re: [PATCH 5/5] powerpc/64s: fix POWER9 machine check handler from stop state

2017-03-08 Thread Nicholas Piggin
Hi Gautham, I'm just getting back to this. Sorry for the late reply, and thanks for the reviews. On Tue, 28 Feb 2017 22:45:46 +0530 Gautham R Shenoy wrote: > Hi Nick, > > On Fri, Feb 17, 2017 at 12:09 AM, Nicholas Piggin wrote: > > The ISA specifies power save wakeup can cause a machine check

[FIX PATCH] powerpc/pseries: Fix reference count leak during CPU unplug

2017-03-08 Thread Bharata B Rao
The following warning is seen when a CPU is hot unplugged on a PowerKVM guest: refcount_t: underflow; use-after-free. [ cut here ] WARNING: CPU: 0 PID: 53 at lib/refcount.c:128 refcount_sub_and_test+0xd8/0xf0 Modules linked in: CPU: 0 PID: 53 Comm: kworker/u510:1 Not tainte

Re: [PATCH v5 5/5] perf: powerpc: choose local entry point with kretprobes

2017-03-08 Thread Naveen N. Rao
On 2017/03/08 11:31AM, Masami Hiramatsu wrote: > On Wed, 8 Mar 2017 13:56:10 +0530 > "Naveen N. Rao" wrote: > > > perf now uses an offset from _text/_stext for kretprobes if the kernel > > supports it, rather than the actual function name. As such, let's choose > > the LEP for powerpc ABIv2 so a

Re: [PATCH] powerpc/ftrace: add ftrace.h, fix sparse warning

2017-03-08 Thread Michael Ellerman
"Tobin C. Harding" writes: > Sparse emits warning: symbol 'prepare_ftrace_return' was not > declared. Should it be static? prepare_ftrace_return() is called > from assembler and should not be static. Adding a header file > declaring the function will fix the sparse warning while adding > document

Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset

2017-03-08 Thread Michael Ellerman
"Naveen N. Rao" writes: > With ABIv2, we offset 8 bytes into a function to get at the local entry > point. > > Acked-by: Ananth N Mavinakayanahalli > Acked-by: Michael Ellerman > Signed-off-by: Naveen N. Rao > --- > arch/powerpc/kernel/kprobes.c | 9 + > 1 file changed, 9 insertions(+

Re: [PATCH v5 5/5] perf: powerpc: choose local entry point with kretprobes

2017-03-08 Thread Masami Hiramatsu
On Wed, 8 Mar 2017 13:56:10 +0530 "Naveen N. Rao" wrote: > perf now uses an offset from _text/_stext for kretprobes if the kernel > supports it, rather than the actual function name. As such, let's choose > the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Do it only > if the kernel

Re: [PATCH] powerpc: kprobes: convert __kprobes to NOKPROBE_SYMBOL()

2017-03-08 Thread Naveen N. Rao
On 2017/03/08 09:42AM, Masami Hiramatsu wrote: > On Wed, 8 Mar 2017 02:09:29 +0530 > "Naveen N. Rao" wrote: > > > Along similar lines as commit 9326638cbee2 ("kprobes, x86: Use > > NOKPROBE_SYMBOL() instead of __kprobes annotation"), convert __kprobes > > annotation to either NOKPROBE_SYMBOL() o

Re: [PATCH v5 01/15] stacktrace/x86: add function for detecting reliable stack traces

2017-03-08 Thread Balbir Singh
On Tue, 2017-03-07 at 10:12 -0600, Josh Poimboeuf wrote: > On Tue, Mar 07, 2017 at 05:50:55PM +1100, Balbir Singh wrote: > > On Mon, 2017-02-13 at 19:42 -0600, Josh Poimboeuf wrote: > > > For live patching and possibly other use cases, a stack trace is only > > > useful if it can be assured that it

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

2017-03-08 Thread Jiri Kosina
On Mon, 13 Feb 2017, Josh Poimboeuf wrote: > Here's v5 of the consistency model I have ammended the patches with all the received ACKs and applied to 'for-4.12/klp-hybrid-consistency-model' branch of livepatching.git. Thanks, -- Jiri Kosina SUSE Labs

Re: [PATCH] crypto: powerpc - Fix initialisation of crc32c context

2017-03-08 Thread Herbert Xu
Daniel Axtens wrote: > Turning on crypto self-tests on a POWER8 shows: > >alg: hash: Test 1 failed for crc32c-vpmsum >: ff ff ff ff > > Comparing the code with the Intel CRC32c implementation on which > ours is based shows that we are doing an init with 0, not ~0 > as CRC32c requ

Re: [PATCH] powerpc: kprobes: convert __kprobes to NOKPROBE_SYMBOL()

2017-03-08 Thread Masami Hiramatsu
On Wed, 8 Mar 2017 02:09:29 +0530 "Naveen N. Rao" wrote: > Along similar lines as commit 9326638cbee2 ("kprobes, x86: Use > NOKPROBE_SYMBOL() instead of __kprobes annotation"), convert __kprobes > annotation to either NOKPROBE_SYMBOL() or nokprobe_inline. The latter > forces inlining, in which c

[PATCH v5 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-08 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. As an example, without this perf patch, but with the ftrace changes: naveen@ubuntu:~/linux/tools/perf$ sudo cat /

[PATCH v5 5/5] perf: powerpc: choose local entry point with kretprobes

2017-03-08 Thread Naveen N. Rao
perf now uses an offset from _text/_stext for kretprobes if the kernel supports it, rather than the actual function name. As such, let's choose the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Do it only if the kernel supports specifying offsets with kretprobes. Signed-off-by: Naveen

[PATCH v5 3/5] perf: probe: factor out the ftrace README scanning

2017-03-08 Thread Naveen N. Rao
Simplify and separate out the ftrace README scanning logic into a separate helper. This is used subsequently to scan for all patterns of interest and to cache the result. Since we are only interested in availability of probe argument type x, we will only scan for that. Acked-by: Masami Hiramatsu

[PATCH v5 2/5] powerpc: kretprobes: override default function entry offset

2017-03-08 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Acked-by: Ananth N Mavinakayanahalli Acked-by: Michael Ellerman Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes

[PATCH v5 1/5] trace/kprobes: fix check for kretprobe offset within function entry

2017-03-08 Thread Naveen N. Rao
perf specifies an offset from _text and since this offset is fed directly into the arch-specific helper, kprobes tracer rejects installation of kretprobes through perf. Fix this by looking up the actual offset from a function for the specified sym+offset. Refactor and reuse existing routines to li

[PATCH v5 0/5] kretprobe fixes

2017-03-08 Thread Naveen N. Rao
Now that I've been carried back in (ugh!), please find the remaining patches from the earlier series (*) here. Patches 1-4 are the same as in v4. Patch 5 in the previous series was dropped and the previous patch 6 has been updated accordingly. - Naveen (*) https://www.mail-archive.com/linux-kerne

Re: [RESEND PATCH 1/6] trace/kprobes: fix check for kretprobe offset within function entry

2017-03-08 Thread Naveen N. Rao
On 2017/03/07 03:47PM, Steven Rostedt wrote: > > Please start a new thread. When sending patches as replies to other > patch threads, especially this deep into the thread, they will most > likely get ignored. Sorry, got carried off. I will re-post in a new series. - Naveen