Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-09-05 Thread Konrad Rzeszutek Wilk
> diff --git a/docs/misc/livepatch.pandoc b/docs/misc/livepatch.pandoc > index 6ab7f4c2d2..92a424e918 100644 > --- a/docs/misc/livepatch.pandoc > +++ b/docs/misc/livepatch.pandoc > @@ -300,6 +300,7 @@ which describe the functions to be patched: > /* Added to livepatch payload version 2:

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
> Ah, I forgot about endianness of course... > I am sending an improved patch. I hope it works this time as expected. Works nicely! (Tested only on ARM64, hadn't tried ARM32 yet). ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Wieczorkiewicz, Pawel
On 29. Aug 2019, at 19:49, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: On Thu, Aug 29, 2019 at 04:16:13PM +, Wieczorkiewicz, Pawel wrote: On 29. Aug 2019, at 17:58, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: …snip..

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
On Thu, Aug 29, 2019 at 04:16:13PM +, Wieczorkiewicz, Pawel wrote: > > > On 29. Aug 2019, at 17:58, Konrad Rzeszutek Wilk > mailto:konrad.w...@oracle.com>> wrote: > > +CODE_GET_EXPECT=$(shell objdump -d --insn-width=1 $(1) | grep -A6 -E > '<'$(2)'>:' | tail -n +2 | awk 'BEGIN {printf "{"}

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Wieczorkiewicz, Pawel
On 29. Aug 2019, at 17:58, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: +CODE_GET_EXPECT=$(shell objdump -d --insn-width=1 $(1) | grep -A6 -E '<'$(2)'>:' | tail -n +2 | awk 'BEGIN {printf "{"} {printf "0x%s,", $$2}' | sed 's/,$$/}/g') Ony my Hikey 960 when I compile using an

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
> +CODE_GET_EXPECT=$(shell objdump -d --insn-width=1 $(1) | grep -A6 -E > '<'$(2)'>:' | tail -n +2 | awk 'BEGIN {printf "{"} {printf "0x%s,", $$2}' | > sed 's/,$$/}/g') Ony my Hikey 960 when I compile using an native compiler I get: gcc -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Wieczorkiewicz, Pawel
On 29. Aug 2019, at 16:34, Konrad Rzeszutek Wilk mailto:kon...@darnok.org>> wrote: …snip... + +struct livepatch_func __section(".livepatch.funcs") livepatch_exceptions = { +.version = LIVEPATCH_PAYLOAD_VERSION, +.name = livepatch_exceptions_str, +.new_addr = xen_hello_world, +

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
> diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile > index 23113d3418..067861903f 100644 > --- a/xen/test/livepatch/Makefile > +++ b/xen/test/livepatch/Makefile > @@ -27,6 +27,8 @@ LIVEPATCH_ACTION_HOOKS_NOFUNC := > xen_action_hooks_nofunc.livepatch >

[Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-27 Thread Pawel Wieczorkiewicz
This is the initial implementation of the expectations enhancement to improve inline asm hotpatching. Expectations are designed as optional feature, since the main use of them is planned for inline asm hotpatching. The flag enabled allows to control the expectation state. Each expectation has