RE: [PATCH v5 00/21] kprobes: Unify kretprobe trampoline handlers and make kretprobe lockless

2020-09-08 Thread eddy...@trendmicro.com
> From: pet...@infradead.org > > I'm now trying and failing to reproduce I can't seem to make it use > int3 today. It seems to want to use ftrace or refuses everything. I'm > probably doing it wrong. > You can turn off CONFIG_KPROBES_ON_FTRACE (and also sysctl debug.kprobes-optimization) to

RE: [PATCH v4 19/23] kprobes: Remove kretprobe hash

2020-08-28 Thread eddy...@trendmicro.com
> -Original Message- > From: Masami Hiramatsu > > @@ -1311,24 +1257,23 @@ void kprobe_busy_end(void) > void kprobe_flush_task(struct task_struct *tk) > { > struct kretprobe_instance *ri; > - struct hlist_head *head; > - struct hlist_node *tmp; > - unsigned long

RE: [RFC][PATCH 3/7] kprobes: Remove kretprobe hash

2020-08-28 Thread eddy...@trendmicro.com
> From: Masami Hiramatsu > > OK, schedule function will be the key. I guess the senario is.. > > 1) kretporbe replace the return address with kretprobe_trampoline on task1's > kernel stack > 2) the task1 forks task2 before returning to the kretprobe_trampoline > 3) while copying the process with

RE: [RFC][PATCH 3/7] kprobes: Remove kretprobe hash

2020-08-28 Thread eddy...@trendmicro.com
> -Original Message- > From: Peter Zijlstra > Sent: Friday, August 28, 2020 12:13 AM > To: linux-kernel@vger.kernel.org; mhira...@kernel.org > Cc: Eddy Wu (RD-TW) ; x...@kernel.org; > da...@davemloft.net; rost...@goodmis.org; > naveen.n@linux.ibm.com; anil.s.keshavamur...@intel.com;

RE: x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint)

2020-08-26 Thread eddy...@trendmicro.com
> -Original Message- > From: pet...@infradead.org > Sent: Wednesday, August 26, 2020 6:26 PM > To: Masami Hiramatsu > Cc: Eddy Wu (RD-TW) ; linux-kernel@vger.kernel.org; > x...@kernel.org > Subject: Re: x86/kprobes: kretprobe fails to triggered if kprobe at function > entry is not opt

RE: x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint)

2020-08-26 Thread eddy...@trendmicro.com
> -Original Message- > From: pet...@infradead.org > Sent: Tuesday, August 25, 2020 8:09 PM > To: Masami Hiramatsu > Cc: Eddy Wu (RD-TW) ; linux-kernel@vger.kernel.org; > x...@kernel.org; David S. Miller > > Subject: Re: x86/kprobes: kretprobe fails to triggered if kprobe at function

RE: x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint)

2020-08-25 Thread eddy...@trendmicro.com
was sent from outside of Trend Micro. Please do not click > > > links or open attachments unless you recognise the source of > this > > > email and know the content is safe. > > > > > > > > > On Mon, 24 Aug 2020 12:02:58 + > > > "eddy..

RE: x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint)

2020-08-24 Thread eddy...@trendmicro.com
at function > entry is not optimized (trigger by int3 breakpoint) > > > This message was sent from outside of Trend Micro. Please do not click links > or open attachments unless you recognise the source of this > email and know the content is safe. > > > On Mon, 24 A

RE: x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint)

2020-08-24 Thread eddy...@trendmicro.com
ction > entry is not optimized (trigger by int3 breakpoint) > > On Mon, Aug 24, 2020 at 12:02:58PM +, eddy...@trendmicro.com wrote: > > After bisecting, I found this behavior seems to introduce by this > > commit: (5.8-rc1) 0d00449c7a28a1514595630735df383dec606812 x86: >

x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint)

2020-08-24 Thread eddy...@trendmicro.com
Greetings! Starting from kernel 5.8 (x86_64), kretprobe handler will always missed if corresponding kprobe on function entry is not optimized (using break point instead). Step to reproduce this: 1) Build the kretprobe example module (CONFIG_SAMPLE_KRETPROBES=m) 2) Disable jump optimization (`sys