Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-16 Thread Jarkko Sakkinen
On Fri, Apr 16, 2021 at 03:06:16PM +0800, Jisheng Zhang wrote: > On Wed, 14 Apr 2021 16:12:23 +0300 Jarkko Sakkinen wrote: > > > > > So kprobes ss ins slot page "must be in the range of relative branching > > > only > > > for x86 and arm" > > > > > > And Jarkko's "arch/x86: kprobes: Remove

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-16 Thread Jisheng Zhang
On Wed, 14 Apr 2021 16:12:23 +0300 Jarkko Sakkinen wrote: > > So kprobes ss ins slot page "must be in the range of relative branching only > > for x86 and arm" > > > > And Jarkko's "arch/x86: kprobes: Remove MODULES dependency" series look > > much better. The last version is v5, I'm not sure

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Jarkko Sakkinen
On Wed, Apr 14, 2021 at 05:22:58PM +0900, Masami Hiramatsu wrote: > Hi Jisheng, > > On Wed, 14 Apr 2021 15:27:28 +0800 > Jisheng Zhang wrote: > > \ > > > > > > On Tue, 13 Apr 2021 18:03:24 +0800 > > > Jisheng Zhang wrote: > > > > > > > Use the __vmalloc_node_range() to simplify x86's

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Jarkko Sakkinen
On Wed, Apr 14, 2021 at 03:27:28PM +0800, Jisheng Zhang wrote: > Jisheng Zhang wrote: > > > > > > > Hi, > > Hi > > > > > On Tue, 13 Apr 2021 18:03:24 +0800 > > Jisheng Zhang wrote: > > > > > Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() > > > implementation. > >

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Masami Hiramatsu
Hi Jisheng, On Wed, 14 Apr 2021 15:27:28 +0800 Jisheng Zhang wrote: \ > > > > On Tue, 13 Apr 2021 18:03:24 +0800 > > Jisheng Zhang wrote: > > > > > Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() > > > implementation. > > > > Have you checked this is equivarent to

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Jisheng Zhang
Jisheng Zhang wrote: > > > Hi, Hi > > On Tue, 13 Apr 2021 18:03:24 +0800 > Jisheng Zhang wrote: > > > Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() > > implementation. > > Have you checked this is equivarent to the original code on all > architecture? IIRC,

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-14 Thread Jisheng Zhang
On Tue, 13 Apr 2021 22:00:30 +0900 Masami Hiramatsu wrote: > > > Hi, Hi > > On Tue, 13 Apr 2021 18:03:24 +0800 > Jisheng Zhang wrote: > > > Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() > > implementation. > > Have you checked this is equivarent to the original

Re: [PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-13 Thread Masami Hiramatsu
Hi, On Tue, 13 Apr 2021 18:03:24 +0800 Jisheng Zhang wrote: > Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() > implementation. Have you checked this is equivarent to the original code on all architecture? IIRC, some arch has a special module_alloc(), thus I NACKed similar

[PATCH] x86/kprobes: Simplify alloc_insn_page() with __vmalloc_node_range

2021-04-13 Thread Jisheng Zhang
Use the __vmalloc_node_range() to simplify x86's alloc_insn_page() implementation. Signed-off-by: Jisheng Zhang --- arch/x86/kernel/kprobes/core.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/arch/x86/kernel/kprobes/core.c