Re: [PATCH v3] livepatch: introduce shadow variable API

2017-08-14 Thread Joe Lawrence
On 08/11/2017 12:35 PM, Josh Poimboeuf wrote: > On Fri, Jul 28, 2017 at 01:25:22PM -0400, Joe Lawrence wrote: >> Add exported API for livepatch modules: >> >> klp_shadow_get() >> klp_shadow_attach() >> klp_shadow_get_or_attach() >> klp_shadow_update_or_attach() >> klp_shadow_detach() >>

Re: [PATCH v3] livepatch: introduce shadow variable API

2017-08-11 Thread Josh Poimboeuf
On Fri, Jul 28, 2017 at 01:25:22PM -0400, Joe Lawrence wrote: > Add exported API for livepatch modules: > > klp_shadow_get() > klp_shadow_attach() > klp_shadow_get_or_attach() > klp_shadow_update_or_attach() > klp_shadow_detach() > klp_shadow_detach_all() I like the API. > +Matching

Re: [PATCH v3] livepatch: introduce shadow variable API

2017-08-10 Thread Miroslav Benes
> > > +/* > > > + * klp_shadow_set() - initialize a shadow variable > > > + * @shadow: shadow variable to initialize > > > + * @obj: pointer to parent object > > > + * @id: data identifier > > > + * @data:pointer to data to attach to parent > > > + * @size:size of att

Re: [PATCH v3] livepatch: introduce shadow variable API

2017-08-10 Thread Joe Lawrence
On Thu, Aug 10, 2017 at 04:40:05PM +0200, Miroslav Benes wrote: > > It generally looks ok. Only few questions below... > > [...] > > > +In-flight parent objects > > + > > + ps_lock = klp_shadow_get_or_attach(sta, PS_LOCK, > > + &ps_lock_fallback, sizeo

Re: [PATCH v3] livepatch: introduce shadow variable API

2017-08-10 Thread Miroslav Benes
It generally looks ok. Only few questions below... [...] > +In-flight parent objects > + > + > +Sometimes it may not be convenient or possible to allocate shadow > +variables alongside their parent objects. Or a livepatch fix may > +require shadow varibles to only a subs