[PATCH -tip v6 24/27] bpf: error-inject: kprobes: Clear current_kprobe and enable preempt in kprobe

2018-06-19 Thread Masami Hiramatsu
Clear current_kprobe and enable preemption in kprobe even if pre_handler returns !0. This simplifies function override using kprobes. Jprobe used to require to keep the preemption disabled and keep current_kprobe until it returned to original function entry. For this reason kprobe_int3_handler()

[PATCH -tip v6 15/27] ARC: kprobes: Don't call the ->break_handler() in ARC kprobes code

2018-06-19 Thread Masami Hiramatsu
Don't call the ->break_handler() from the ARC kprobes code, because it was only used by jprobes which got removed. Signed-off-by: Masami Hiramatsu Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org --- arch/arc/kernel/kprobes.c |7 --- 1 file changed, 7 deletions(-) diff --git

[PATCH v2] ARC: Improve cmpxchg syscall implementation

2018-06-19 Thread Alexey Brodkin
From: Peter Zijlstra arc_usr_cmpxchg syscall is supposed to be used on platforms that lack support of Load-Locked/Store-Conditional instructions in hardware. And in that case we mimic missing hardware features with help of kernel's sycall that "atomically" checks current value in memory and then

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-06-19 Thread Peter Zijlstra
On Mon, Mar 19, 2018 at 02:00:02PM +0300, Alexey Brodkin wrote: > diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c > index 5ac3b547453f..d7d3e16133d6 100644 > --- a/arch/arc/kernel/process.c > +++ b/arch/arc/kernel/process.c > @@ -47,7 +47,9 @@ SYSCALL_DEFINE0(arc_gettls) >

Re: [PATCH] ARC: Improve cmpxchng syscall implementation

2018-06-19 Thread Alexey Brodkin
Hi Vineet, On Wed, 2018-04-18 at 11:16 -0700, Vineet Gupta wrote: > On 03/21/2018 04:54 AM, Alexey Brodkin wrote: > > /* > > > > * This is only for old cores lacking LLOCK/SCOND, which by > > > > defintion > > > > @@ -60,23 +62,48 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int,

Re: [PATCH] ARC: dts: Remove leading 0x from node unit addresses

2018-06-19 Thread Krzysztof Kozlowski
On 18 June 2018 at 22:07, Joe Perches wrote: > On Mon, 2018-06-18 at 21:16 +0200, Krzysztof Kozlowski wrote: >> Remove leading 0x from all node unit addresses with a sed command: >> >> sed -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" >> arch/arc/boot/dts/*.dts* >> >> This fixes DTC