Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-15 Thread Michael Ellerman
Kamalesh Babulal writes: > On Monday 13 November 2017 02:08 PM, Balbir Singh wrote: >> On Fri, Nov 10, 2017 at 2:28 PM, Josh Poimboeuf wrote: >>> On Fri, Nov 10, 2017 at 01:06:25PM +1100, Balbir Singh wrote: On Fri, Nov 10, 2017 at 2:19 AM,

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-13 Thread Kamalesh Babulal
On Monday 13 November 2017 02:08 PM, Balbir Singh wrote: On Fri, Nov 10, 2017 at 2:28 PM, Josh Poimboeuf wrote: On Fri, Nov 10, 2017 at 01:06:25PM +1100, Balbir Singh wrote: On Fri, Nov 10, 2017 at 2:19 AM, Josh Poimboeuf wrote: FWIW, I think it

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-13 Thread Balbir Singh
On Fri, Nov 10, 2017 at 2:28 PM, Josh Poimboeuf wrote: > On Fri, Nov 10, 2017 at 01:06:25PM +1100, Balbir Singh wrote: >> On Fri, Nov 10, 2017 at 2:19 AM, Josh Poimboeuf wrote: >> > FWIW, I think it won't matter anyway. I'm currently pursuing the option

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-10 Thread Michael Ellerman
Josh Poimboeuf writes: > On Fri, Nov 10, 2017 at 01:06:25PM +1100, Balbir Singh wrote: >> On Fri, Nov 10, 2017 at 2:19 AM, Josh Poimboeuf wrote: >> > FWIW, I think it won't matter anyway. I'm currently pursuing the option >> > of inserting nops after

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-09 Thread Josh Poimboeuf
On Fri, Nov 10, 2017 at 01:06:25PM +1100, Balbir Singh wrote: > On Fri, Nov 10, 2017 at 2:19 AM, Josh Poimboeuf wrote: > > FWIW, I think it won't matter anyway. I'm currently pursuing the option > > of inserting nops after local calls, because it has less runtime > >

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-09 Thread Balbir Singh
On Fri, Nov 10, 2017 at 2:19 AM, Josh Poimboeuf wrote: > On Thu, Nov 09, 2017 at 04:49:05PM +0530, Naveen N. Rao wrote: >> > > > > d) Have kpatch-build do some other kind of transformation? For >> > > > > example, >> > > > >maybe it could generate klp stubs which the

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-09 Thread Josh Poimboeuf
On Thu, Nov 09, 2017 at 04:49:05PM +0530, Naveen N. Rao wrote: > > > > > d) Have kpatch-build do some other kind of transformation? For > > > > > example, > > > > >maybe it could generate klp stubs which the callee calls into. > > > > > Each > > > > >klp stub could then do a proper

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-09 Thread Naveen N. Rao
Josh Poimboeuf wrote: On Tue, Nov 07, 2017 at 12:31:05PM +0100, Torsten Duwe wrote: On Tue, Nov 07, 2017 at 07:34:29PM +1100, Michael Ellerman wrote: > > So, just brainstorming a bit, here are the possible solutions I can > > think of: > > > > a) Create a special klp stub for such calls (as in

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-09 Thread Michael Ellerman
Josh Poimboeuf writes: > On Tue, Nov 07, 2017 at 12:31:05PM +0100, Torsten Duwe wrote: >> On Tue, Nov 07, 2017 at 07:34:29PM +1100, Michael Ellerman wrote: >> > > So, just brainstorming a bit, here are the possible solutions I can >> > > think of: >> > > >> > > a) Create a

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-07 Thread Josh Poimboeuf
On Tue, Nov 07, 2017 at 12:31:05PM +0100, Torsten Duwe wrote: > On Tue, Nov 07, 2017 at 07:34:29PM +1100, Michael Ellerman wrote: > > > So, just brainstorming a bit, here are the possible solutions I can > > > think of: > > > > > > a) Create a special klp stub for such calls (as in Kamalesh's

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-07 Thread Torsten Duwe
On Tue, Nov 07, 2017 at 07:34:29PM +1100, Michael Ellerman wrote: > Josh Poimboeuf writes: > > > On Tue, Oct 31, 2017 at 07:39:59PM +0100, Torsten Duwe wrote: > >> On Tue, Oct 31, 2017 at 09:53:16PM +0530, Naveen N . Rao wrote: > >> > On 2017/10/31 03:30PM, Torsten Duwe

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-07 Thread Michael Ellerman
Josh Poimboeuf writes: > On Tue, Oct 31, 2017 at 07:39:59PM +0100, Torsten Duwe wrote: >> On Tue, Oct 31, 2017 at 09:53:16PM +0530, Naveen N . Rao wrote: >> > On 2017/10/31 03:30PM, Torsten Duwe wrote: >> > > >> > > Maybe I failed to express my views properly; I find the

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-06 Thread Josh Poimboeuf
On Tue, Oct 31, 2017 at 07:39:59PM +0100, Torsten Duwe wrote: > On Tue, Oct 31, 2017 at 09:53:16PM +0530, Naveen N . Rao wrote: > > On 2017/10/31 03:30PM, Torsten Duwe wrote: > > > > > > Maybe I failed to express my views properly; I find the whole approach > [...] > > > NAK'd-by: Torsten Duwe

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-11-01 Thread Kamalesh Babulal
On Tuesday 31 October 2017 07:49 PM, Naveen N . Rao wrote: Hi Kamalesh, Sorry for the late review. Overall, the patch looks good to me. So: Acked-by: Naveen N. Rao However, I have a few minor comments which can be addressed in a subsequent patch. Thanks for

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-31 Thread Balbir Singh
On Wed, Nov 1, 2017 at 5:39 AM, Torsten Duwe wrote: > On Tue, Oct 31, 2017 at 09:53:16PM +0530, Naveen N . Rao wrote: >> On 2017/10/31 03:30PM, Torsten Duwe wrote: >> > >> > Maybe I failed to express my views properly; I find the whole approach > [...] >> > NAK'd-by: Torsten Duwe

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-31 Thread Torsten Duwe
On Tue, Oct 31, 2017 at 09:53:16PM +0530, Naveen N . Rao wrote: > On 2017/10/31 03:30PM, Torsten Duwe wrote: > > > > Maybe I failed to express my views properly; I find the whole approach [...] > > NAK'd-by: Torsten Duwe > > Hmm... that wasn't evident at all given Balbir's reponse

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-31 Thread Naveen N . Rao
On 2017/10/31 03:30PM, Torsten Duwe wrote: > On Tue, Oct 31, 2017 at 07:49:59PM +0530, Naveen N . Rao wrote: > > Hi Kamalesh, > > Sorry for the late review. Overall, the patch looks good to me. > > If you're good with a hammer... > > Maybe I failed to express my views properly; I find the whole

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-31 Thread Torsten Duwe
On Tue, Oct 31, 2017 at 07:49:59PM +0530, Naveen N . Rao wrote: > Hi Kamalesh, > Sorry for the late review. Overall, the patch looks good to me. If you're good with a hammer... Maybe I failed to express my views properly; I find the whole approach mislead in the first place. I had asked

Re: [PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-31 Thread Naveen N . Rao
Hi Kamalesh, Sorry for the late review. Overall, the patch looks good to me. So: Acked-by: Naveen N. Rao However, I have a few minor comments which can be addressed in a subsequent patch. On 2017/10/17 05:18AM, Kamalesh Babulal wrote: > Livepatch re-uses module

[PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-16 Thread Kamalesh Babulal
Livepatch re-uses module loader function apply_relocate_add() to write relocations, instead of managing them by arch-dependent klp_write_module_reloc() function. apply_relocate_add() doesn't understand livepatch symbols (marked with SHN_LIVEPATCH symbol section index) and assumes them to be local