Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-21 Thread Ross Lagerwall
On 09/16/2016 04:29 PM, Konrad Rzeszutek Wilk wrote: The NOP functionality will NOP any of the code at the 'old_addr' or at 'name' if the 'new_addr' is zero. The purpose of this is to NOP out calls, such as: e8 <4-bytes-offset> (5 byte insn), or on ARM a 4 byte insn for branching. We need

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-20 Thread Jan Beulich
>>> On 19.09.16 at 19:02, wrote: > On Mon, Sep 19, 2016 at 10:31:23AM -0600, Jan Beulich wrote: >> >>> On 19.09.16 at 18:11, wrote: >> > On Mon, Sep 19, 2016 at 02:59:32AM -0600, Jan Beulich wrote: >> >> >>> On 16.09.16 at 17:29,

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-19 Thread Konrad Rzeszutek Wilk
> > > Ooh, good idea. But I think it maybe better as a seperate patch (as it > > > also touches the ARM code). > > > > That's in the other series, isn't it? > > It expands the existing ones. Right now in 'staging' branch we have an > arch/arm/livepatch.c which has these functions in it. > >

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-19 Thread Konrad Rzeszutek Wilk
On Mon, Sep 19, 2016 at 10:31:23AM -0600, Jan Beulich wrote: > >>> On 19.09.16 at 18:11, wrote: > > On Mon, Sep 19, 2016 at 02:59:32AM -0600, Jan Beulich wrote: > >> >>> On 16.09.16 at 17:29, wrote: > >> > @@ -31,11 +30,11 @@ void

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-19 Thread Jan Beulich
>>> On 19.09.16 at 18:11, wrote: > On Mon, Sep 19, 2016 at 02:59:32AM -0600, Jan Beulich wrote: >> >>> On 16.09.16 at 17:29, wrote: >> > @@ -31,11 +30,11 @@ void arch_livepatch_revive(void) >> > >> > int arch_livepatch_verify_func(const struct

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-19 Thread Konrad Rzeszutek Wilk
On Mon, Sep 19, 2016 at 02:59:32AM -0600, Jan Beulich wrote: > >>> On 16.09.16 at 17:29, wrote: > > @@ -31,11 +30,11 @@ void arch_livepatch_revive(void) > > > > int arch_livepatch_verify_func(const struct livepatch_func *func) > > { > > -/* No NOP patching yet. */

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-19 Thread Jan Beulich
>>> On 16.09.16 at 17:29, wrote: > docs/misc/livepatch.markdown | 7 +-- > xen/arch/x86/alternative.c| 2 +- > xen/arch/x86/livepatch.c | 40 > +-- > xen/common/livepatch.c| 3 ++- >

Re: [Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-19 Thread Jan Beulich
>>> On 16.09.16 at 17:29, wrote: > @@ -31,11 +30,11 @@ void arch_livepatch_revive(void) > > int arch_livepatch_verify_func(const struct livepatch_func *func) > { > -/* No NOP patching yet. */ > -if ( !func->new_size ) > +/* If NOPing only do up to maximum

[Xen-devel] [PATCH v6 3/6] livepatch: NOP if func->new_addr is zero.

2016-09-16 Thread Konrad Rzeszutek Wilk
The NOP functionality will NOP any of the code at the 'old_addr' or at 'name' if the 'new_addr' is zero. The purpose of this is to NOP out calls, such as: e8 <4-bytes-offset> (5 byte insn), or on ARM a 4 byte insn for branching. We need the EIP of where we need to the NOP, and that can be