Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-18 Thread Jiang Liu
On 10/18/2013 09:44 PM, Jon Medhurst (Tixy) wrote: > On Fri, 2013-10-18 at 09:56 +0100, Will Deacon wrote: >> Hi Tixy, >> >> On Thu, Oct 17, 2013 at 04:24:01PM +0100, Jon Medhurst (Tixy) wrote: >>> On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: On Thu, Oct 17, 2013 at 07:19:35AM +0100,

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-18 Thread Jon Medhurst (Tixy)
On Fri, 2013-10-18 at 09:56 +0100, Will Deacon wrote: > Hi Tixy, > > On Thu, Oct 17, 2013 at 04:24:01PM +0100, Jon Medhurst (Tixy) wrote: > > On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: > > > On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: > > > > + /* > > > > +

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-18 Thread Will Deacon
Hi Tixy, On Thu, Oct 17, 2013 at 04:24:01PM +0100, Jon Medhurst (Tixy) wrote: > On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: > > On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: > > > + /* > > > + * Execute __aarch64_insn_patch_text() on every online CPU, > > > + * which

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-18 Thread Will Deacon
Hi Tixy, On Thu, Oct 17, 2013 at 04:24:01PM +0100, Jon Medhurst (Tixy) wrote: On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: + /* + * Execute __aarch64_insn_patch_text() on every online CPU, + * which ensure

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-18 Thread Jon Medhurst (Tixy)
On Fri, 2013-10-18 at 09:56 +0100, Will Deacon wrote: Hi Tixy, On Thu, Oct 17, 2013 at 04:24:01PM +0100, Jon Medhurst (Tixy) wrote: On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: + /* +* Execute

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-18 Thread Jiang Liu
On 10/18/2013 09:44 PM, Jon Medhurst (Tixy) wrote: On Fri, 2013-10-18 at 09:56 +0100, Will Deacon wrote: Hi Tixy, On Thu, Oct 17, 2013 at 04:24:01PM +0100, Jon Medhurst (Tixy) wrote: On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jiang Liu
On 10/17/2013 11:24 PM, Jon Medhurst (Tixy) wrote: > On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: >> [adding Tixy for stop_machine() question below] >> >> On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: > [...] >>> +int __kprobes aarch64_insn_patch_text_sync(void *addrs[], u32

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jiang Liu
On 10/17/2013 07:38 PM, Will Deacon wrote: > [adding Tixy for stop_machine() question below] > > On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: >> From: Jiang Liu >> >> Introduce three interfaces to patch kernel and module code: >> aarch64_insn_patch_text_nosync(): >> patch code

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jon Medhurst (Tixy)
On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: > [adding Tixy for stop_machine() question below] > > On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: [...] > > +int __kprobes aarch64_insn_patch_text_sync(void *addrs[], u32 insns[], int > > cnt) > > +{ > > + struct

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Will Deacon
[adding Tixy for stop_machine() question below] On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: > From: Jiang Liu > > Introduce three interfaces to patch kernel and module code: > aarch64_insn_patch_text_nosync(): > patch code without synchronization, it's caller's

[PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jiang Liu
From: Jiang Liu Introduce three interfaces to patch kernel and module code: aarch64_insn_patch_text_nosync(): patch code without synchronization, it's caller's responsibility to synchronize all CPUs if needed. aarch64_insn_patch_text_sync(): patch code and always

[PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jiang Liu
From: Jiang Liu jiang@huawei.com Introduce three interfaces to patch kernel and module code: aarch64_insn_patch_text_nosync(): patch code without synchronization, it's caller's responsibility to synchronize all CPUs if needed. aarch64_insn_patch_text_sync(): patch code

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Will Deacon
[adding Tixy for stop_machine() question below] On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: From: Jiang Liu jiang@huawei.com Introduce three interfaces to patch kernel and module code: aarch64_insn_patch_text_nosync(): patch code without synchronization, it's

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jon Medhurst (Tixy)
On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: [adding Tixy for stop_machine() question below] On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: [...] +int __kprobes aarch64_insn_patch_text_sync(void *addrs[], u32 insns[], int cnt) +{ + struct aarch64_insn_patch

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jiang Liu
On 10/17/2013 07:38 PM, Will Deacon wrote: [adding Tixy for stop_machine() question below] On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: From: Jiang Liu jiang@huawei.com Introduce three interfaces to patch kernel and module code: aarch64_insn_patch_text_nosync():

Re: [PATCH v4 2/7] arm64: introduce interfaces to hotpatch kernel and module code

2013-10-17 Thread Jiang Liu
On 10/17/2013 11:24 PM, Jon Medhurst (Tixy) wrote: On Thu, 2013-10-17 at 12:38 +0100, Will Deacon wrote: [adding Tixy for stop_machine() question below] On Thu, Oct 17, 2013 at 07:19:35AM +0100, Jiang Liu wrote: [...] +int __kprobes aarch64_insn_patch_text_sync(void *addrs[], u32 insns[],