Re: [XTF] xenbus: Don't wait if the response ring is full

2020-07-10 Thread Wieczorkiewicz, Pawel
> On 9. Jul 2020, at 20:46, Julien Grall wrote: > > > From: Julien Grall > > XenStore response can be bigger than the response ring. In this case, > it is possible to have the ring full (e.g cons = 19 and prod = 1043). > > However, XTF will consider that there is no data and therefore wait

Re: [Xen-devel] [PATCH v6 00/12] livepatch: new features and fixes

2020-06-12 Thread Wieczorkiewicz, Pawel
> On 11. Jun 2020, at 15:48, George Dunlap wrote: > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > > On Tue, Nov 26, 2019 at 10:14 AM Pawel Wieczorkiewicz

Re: [PATCH XTF] vsnprintf: Expand \n to \r\n for console output

2020-06-05 Thread Wieczorkiewicz, Pawel
> On 4. Jun 2020, at 16:12, Andrew Cooper wrote: > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > xenconsoled doesn't automatically convert \n into \r\n,

Re: [XTF 2/4] lib: always append CR after LF in vsnprintf()

2020-04-21 Thread Wieczorkiewicz, Pawel
> On 20. Apr 2020, at 21:26, Andrew Cooper wrote: > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 16/04/2020 12:36,

Re: [XTF 4/4] setup: Setup PV console for HVM guests on xen >4.2

2020-04-16 Thread Wieczorkiewicz, Pawel
> On 16. Apr 2020, at 12:36, Andrew Cooper wrote: > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 16/04/2020 10:41, Pawel Wieczorkiewicz wrote: >> @@

Re: [XTF 3/4] Enabled serial writing for hvm guests

2020-04-16 Thread Wieczorkiewicz, Pawel
> On 16. Apr 2020, at 12:32, Andrew Cooper wrote: > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 16/04/2020 10:41, Pawel Wieczorkiewicz wrote: >>

Re: [XTF 2/4] lib: always append CR after LF in vsnprintf()

2020-04-16 Thread Wieczorkiewicz, Pawel
> On 16. Apr 2020, at 12:18, Andrew Cooper wrote: > > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you can confirm the sender and know the > content is safe. > > > > On 16/04/2020 10:41, Pawel Wieczorkiewicz wrote: >>

Re: [Xen-devel] [PATCH] docs/misc: livepatch: Espace backslash

2020-01-14 Thread Wieczorkiewicz, Pawel
> On 13. Jan 2020, at 23:12, Julien Grall wrote: > > pandoc is currently failing to generate the pdf with the following > error: > ! Undefined control sequence. > l.1048 metadata string format is: key=value\0 > > In this case, we want to print \0 so we need to backslash-escape the > first

Re: [Xen-devel] [PATCH v6 07/12] livepatch: Add per-function applied/reverted state tracking marker

2020-01-06 Thread Wieczorkiewicz, Pawel
On 5. Jan 2020, at 12:36, Andrew Cooper mailto:andrew.coop...@citrix.com>> wrote: On 26/11/2019 10:07, Pawel Wieczorkiewicz wrote: @@ -1274,6 +1297,9 @@ static void livepatch_do_action(void) else break; @@ -1309,6 +1338,9 @@ static void livepatch_do_action(void)

Re: [Xen-devel] livepatch-build-tools regression

2019-12-02 Thread Wieczorkiewicz, Pawel
> On 27. Nov 2019, at 16:56, Sergey Dyasli wrote: > > On 27/11/2019 15:22, Wieczorkiewicz, Pawel wrote: >> >> >>> On 27. Nov 2019, at 12:16, Sergey Dyasli wrote: >>> >>> On 26/11/2019 18:37, Wieczorkiewicz, Pawel wrote: >>>&g

Re: [Xen-devel] livepatch-build-tools regression

2019-11-27 Thread Wieczorkiewicz, Pawel
> On 27. Nov 2019, at 12:16, Sergey Dyasli wrote: > > On 26/11/2019 18:37, Wieczorkiewicz, Pawel wrote: >> It looks like gcc plays the usual dirty tricks with local variables renaming: >> >> - xen-syms >> 7529: 82d0805fed50 8 OBJECT LOCAL DEFAULT 4

Re: [Xen-devel] livepatch-build-tools regression

2019-11-26 Thread Wieczorkiewicz, Pawel
.. Can you please try to build the livepatch module with additional option '—prelink' and give it a try ? > On 26. Nov 2019, at 18:51, Wieczorkiewicz, Pawel wrote: > > > >> On 20. Nov 2019, at 12:42, Sergey Dyasli wrote: >> >> On 19/11/2019 17:2

Re: [Xen-devel] livepatch-build-tools regression

2019-11-26 Thread Wieczorkiewicz, Pawel
> On 20. Nov 2019, at 12:42, Sergey Dyasli wrote: > > On 19/11/2019 17:21, Wieczorkiewicz, Pawel wrote: >> >> >>> On 18. Nov 2019, at 18:41, Sergey Dyasli wrote: >>> >>> On 18/11/2019 17:28, Wieczorkiewicz, Pawel wrote: >>>>

Re: [Xen-devel] [PATCH v2 6/7] livepatch-build: Strip transient or unneeded symbols

2019-11-26 Thread Wieczorkiewicz, Pawel
> On 25. Nov 2019, at 15:38, Ross Lagerwall wrote: > > On 9/16/19 12:30 PM, Pawel Wieczorkiewicz wrote: >> In the process of creating a final hotpatch module file make sure to >> strip all transient symbols that have not been caught and removed by >> create-diff-object processing. For now

Re: [Xen-devel] [PATCH v5 00/12] livepatch: new features and fixes

2019-11-20 Thread Wieczorkiewicz, Pawel
> On 20. Nov 2019, at 03:25, Konrad Rzeszutek Wilk > wrote: > > On Thu, Nov 14, 2019 at 01:06:41PM +, Pawel Wieczorkiewicz wrote: >> This series introduces new features to the livepatch functionality as >> briefly discussed during Xen Developer Summit 2019: [a] and [b]. >> It also

Re: [Xen-devel] livepatch-build-tools regression

2019-11-19 Thread Wieczorkiewicz, Pawel
> On 18. Nov 2019, at 18:41, Sergey Dyasli wrote: > > On 18/11/2019 17:28, Wieczorkiewicz, Pawel wrote: >> >> Could you build the lp with debug (-d) and provide me with the >> create-diff-object.log file? >> > > I've attached the log. Btw, I think I

Re: [Xen-devel] livepatch-build-tools regression

2019-11-18 Thread Wieczorkiewicz, Pawel
> On 18. Nov 2019, at 18:09, Sergey Dyasli wrote: > > On 18/11/2019 16:47, Wieczorkiewicz, Pawel wrote: >> >> >>> On 18. Nov 2019, at 17:42, Sergey Dyasli wrote: >>> >>> Hello, >>> >>> Trying to build a simple version of X

Re: [Xen-devel] livepatch-build-tools regression

2019-11-18 Thread Wieczorkiewicz, Pawel
> On 18. Nov 2019, at 17:42, Sergey Dyasli wrote: > > Hello, > > Trying to build a simple version of XSA-304 Live-Patch for 4.13 gives > the following error during LP upload: > >(XEN) livepatch: lp: Unknown symbol: .LC7 > > Bisecting identified the first bad commit as: > >commit

Re: [Xen-devel] [PATCH v4 00/12] livepatch: new features and fixes

2019-10-19 Thread Wieczorkiewicz, Pawel
> On 18. Oct 2019, at 17:34, Ross Lagerwall wrote: > > On 10/18/19 3:25 PM, Konrad Rzeszutek Wilk wrote: >> On Sat, Sep 28, 2019 at 03:12:53PM +, Pawel Wieczorkiewicz wrote: >>> This series introduces new features to the livepatch functionality as >>> briefly discussed during Xen Developer

Re: [Xen-devel] [PATCH for-4.13 2/2] xen/nospec: Introduce CONFIG_SPECULATIVE_BRANCH_HARDEN and disable it

2019-10-04 Thread Wieczorkiewicz, Pawel
> On 2. Oct 2019, at 23:02, Andrew Cooper wrote: > > On 02/10/2019 10:50, Wieczorkiewicz, Pawel wrote: >>>>>> I've taken, as a simple example, >>>>>> p2m_mem_access_sanity_check(), and this looks to be the way gcc9 has >>>>>> gen

Re: [Xen-devel] [PATCH for-4.13 2/2] xen/nospec: Introduce CONFIG_SPECULATIVE_BRANCH_HARDEN and disable it

2019-10-02 Thread Wieczorkiewicz, Pawel
> On 1. Oct 2019, at 17:37, Andrew Cooper wrote: > > On 01/10/2019 15:32, Jan Beulich wrote: >> On 01.10.2019 14:51, Andrew Cooper wrote: >>> On 01/10/2019 13:21, Jan Beulich wrote: On 30.09.2019 20:24, Andrew Cooper wrote: > The code generation for barrier_nospec_true() is not

Re: [Xen-devel] [PATCH v4 12/12] livepatch: Add python bindings for livepatch operations

2019-10-01 Thread Wieczorkiewicz, Pawel
> On 30. Sep 2019, at 17:13, Ross Lagerwall wrote: > > On 9/28/19 4:13 PM, Pawel Wieczorkiewicz wrote: >> Extend the XC python bindings library to support also all common snip >> >> + >> +fd = open(filename, O_RDONLY); >> +if ( fd < 0 ) >> +goto error; >> + >> +if (

Re: [Xen-devel] [PATCH v4 02/12] livepatch: Allow to override inter-modules buildid dependency

2019-09-30 Thread Wieczorkiewicz, Pawel
> On 30. Sep 2019, at 13:05, Jan Beulich wrote: > > On 28.09.2019 17:12, Pawel Wieczorkiewicz wrote: >> --- a/xen/include/public/sysctl.h >> +++ b/xen/include/public/sysctl.h >> @@ -35,7 +35,7 @@ >> #include "domctl.h" >> #include "physdev.h" >> >> -#define XEN_SYSCTL_INTERFACE_VERSION

Re: [Xen-devel] [PATCH v4 10/12] livepatch: Handle arbitrary size names with the list operation

2019-09-30 Thread Wieczorkiewicz, Pawel
> On 30. Sep 2019, at 10:50, Jan Beulich wrote: > > On 28.09.2019 17:13, Pawel Wieczorkiewicz wrote: >> --- a/xen/include/public/sysctl.h >> +++ b/xen/include/public/sysctl.h >> @@ -925,10 +925,11 @@ struct xen_sysctl_livepatch_get { >> * >> snip >> uint32_t pad;

Re: [Xen-devel] [PATCH v3 12/12] livepatch: Add python bindings for livepatch operations

2019-09-26 Thread Wieczorkiewicz, Pawel
> On 25. Sep 2019, at 18:47, Ross Lagerwall wrote: > > On 9/16/19 12:40 PM, Pawel Wieczorkiewicz wrote: >> Extend the XC python bindings library to support also all common >> livepatch operations and actions. >> Add the python bindings for the following operations: >> - status

Re: [Xen-devel] [PATCH v3 11/12] livepatch: Add metadata runtime retrieval mechanism

2019-09-25 Thread Wieczorkiewicz, Pawel
> On 25. Sep 2019, at 17:47, Ross Lagerwall wrote: > > On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: >> Extend the livepatch list operation to fetch also payloads' metadata. >> This is achieved by extending the sysctl list interface with 2 extra >> guest handles: >> * metadata - an

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

2019-09-23 Thread Wieczorkiewicz, Pawel
> On 19. Sep 2019, at 18:06, Ross Lagerwall wrote: > > On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: >> 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

Re: [Xen-devel] [PATCH v3 07/12] livepatch: Add per-function applied/reverted state tracking marker

2019-09-20 Thread Wieczorkiewicz, Pawel
> On 19. Sep 2019, at 17:18, Ross Lagerwall wrote: > > On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: >> Livepatch only tracks an entire payload applied/reverted state. But, >> with an option to supply the apply_payload() and/or revert_payload() >> functions as optional hooks, it becomes

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-19 Thread Wieczorkiewicz, Pawel
> On 18. Sep 2019, at 17:23, Lars Kurth wrote: > > > > On 18/09/2019, 12:27, "Wieczorkiewicz, Pawel" wrote: > > > >> On 18. Sep 2019, at 13:19, Julien Grall wrote: >> >> Hi Pawel, >> >> On 18/09/2019 11:44, Wieczork

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Wieczorkiewicz, Pawel
> On 18. Sep 2019, at 13:19, Julien Grall wrote: > > Hi Pawel, > > On 18/09/2019 11:44, Wieczorkiewicz, Pawel wrote: >>> On 18. Sep 2019, at 12:41, Ian Jackson wrote: >>> >>> Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Wieczorkiewicz, Pawel
> On 18. Sep 2019, at 12:41, Ian Jackson wrote: > > Julien Grall writes ("Re: [PATCH] create-diff-object: more precisely identify > .rodata sections"): >> On 18/09/2019 10:52, Wieczorkiewicz, Pawel wrote: >>> $ scripts/./add_maintainers.pl -d ~/git/livepat

Re: [Xen-devel] [PATCH] create-diff-object: more precisely identify .rodata sections

2019-09-18 Thread Wieczorkiewicz, Pawel
> On 18. Sep 2019, at 11:49, Jan Beulich wrote: > > On 18.09.2019 09:35, Pawel Wieczorkiewicz wrote: >> This is needed for more precise patchability verification. >> Only non-special .rodata sections should be subject >> for such a non-referenced check in kpatch_verify_patchability(). >>

Re: [Xen-devel] [PATCH v3 04/12] livepatch: Implement pre-|post- apply|revert hooks

2019-09-17 Thread Wieczorkiewicz, Pawel
> On 16. Sep 2019, at 19:54, Ross Lagerwall wrote: > >> snip >> 2) post-apply hook >> runs after the apply action has been executed and quiescing zone >> exited. Its main purpose is to provide an ability to follow-up on >> actions performed by the pre- hook, when module application was

Re: [Xen-devel] [PATCH v3 10/12] livepatch: Handle arbitrary size names with the list operation

2019-09-17 Thread Wieczorkiewicz, Pawel
> On 17. Sep 2019, at 10:48, Jan Beulich wrote: > > On 17.09.2019 10:40, Wieczorkiewicz, Pawel wrote: >> >> >> On 17. Sep 2019, at 10:27, Jan Beulich >> mailto:jbeul...@suse.com>> wrote: >> >> On 16.09.2019 12:59, Pawel Wi

Re: [Xen-devel] [PATCH v3 10/12] livepatch: Handle arbitrary size names with the list operation

2019-09-17 Thread Wieczorkiewicz, Pawel
On 17. Sep 2019, at 10:27, Jan Beulich mailto:jbeul...@suse.com>> wrote: On 16.09.2019 12:59, Pawel Wieczorkiewicz wrote: @@ -951,11 +952,13 @@ struct xen_sysctl_livepatch_list { amount of payloads and version.

Re: [Xen-devel] [PATCH v3 02/12] livepatch: Allow to override inter-modules buildid dependency

2019-09-17 Thread Wieczorkiewicz, Pawel
On 16. Sep 2019, at 19:01, Ross Lagerwall mailto:ross.lagerw...@citrix.com>> wrote: On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: snip +/* + * Parse user provided action flags. + * This function expects to only receive an array of input parameters being flags. + * Expected action is

Re: [Xen-devel] [PATCH v3 01/12] livepatch: Always check hypervisor build ID upon hotpatch upload

2019-09-17 Thread Wieczorkiewicz, Pawel
On 16. Sep 2019, at 18:23, Ross Lagerwall mailto:ross.lagerw...@citrix.com>> wrote: On 9/16/19 11:59 AM, Pawel Wieczorkiewicz wrote: This change is part of a independant stacked hotpatch modules feature. This feature allows to bypass dependencies between modules upon loading, but still

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><mailto:konrad.w...@oracle.com>>

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 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 05/12] livepatch: Add support for apply|revert action replacement hooks

2019-08-28 Thread Wieczorkiewicz, Pawel
On 27. Aug 2019, at 18:58, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: On August 27, 2019 4:46:17 AM EDT, Pawel Wieczorkiewicz mailto:wipa...@amazon.de>> wrote: By default, in the quiescing zone, a hotpatch payload is applied with apply_payload() and reverted with

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-22 Thread Wieczorkiewicz, Pawel
On 22. Aug 2019, at 17:30, Julien Grall mailto:julien.gr...@arm.com>> wrote: Hi Pawel, On 22/08/2019 12:02, Wieczorkiewicz, Pawel wrote: On 22. Aug 2019, at 12:29, Julien Grall mailto:julien.gr...@arm.com> <mailto:julien.gr...@arm.com>> wrote: On 21/08/2019 09:19, Pawel Wi

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-22 Thread Wieczorkiewicz, Pawel
On 22. Aug 2019, at 12:43, Julien Grall mailto:julien.gr...@arm.com>> wrote: Hi, On 22/08/2019 11:20, Wieczorkiewicz, Pawel wrote: ..snip.. Cross-compiler are nowadays widely available. So build testing your changes in common code would be the minimum. I wish it was that

Re: [Xen-devel] [PATCH 10/14] livepatch: Add support for inline asm hotpatching expectations

2019-08-22 Thread Wieczorkiewicz, Pawel
On 22. Aug 2019, at 12:31, Julien Grall mailto:julien.gr...@arm.com>> wrote: Hi Pawel, On 21/08/2019 09:19, Pawel Wieczorkiewicz wrote: diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index b55ad6d050..e18322350d 100644 --- a/xen/include/public/sysctl.h +++

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-22 Thread Wieczorkiewicz, Pawel
On 22. Aug 2019, at 12:29, Julien Grall mailto:julien.gr...@arm.com>> wrote: Hi Pawel, Hi Julien, Thank for looking at this! On 21/08/2019 09:19, Pawel Wieczorkiewicz wrote: Livepatch only tracks an entire payload applied/reverted state. But, with an option to supply the apply_payload()

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-22 Thread Wieczorkiewicz, Pawel
On 22. Aug 2019, at 12:07, Julien Grall mailto:julien.gr...@arm.com>> wrote: Hi, On 22/08/2019 08:44, Wieczorkiewicz, Pawel wrote: …snip... Is this going to break livepatch on Arm? If so, do you have any plan to fix it? No, I do not think it is. But, I am unable to test on Arm (No

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-22 Thread Wieczorkiewicz, Pawel
On 21. Aug 2019, at 23:34, Julien Grall mailto:julien.gr...@arm.com>> wrote: Hi Pawel, Hi Julien, On 8/21/19 9:19 AM, Pawel Wieczorkiewicz wrote: Livepatch only tracks an entire payload applied/reverted state. But, with an option to supply the apply_payload() and/or revert_payload()

Re: [Xen-devel] [PATCH 08/20] livepatch-build: detect special section group sizes

2019-08-21 Thread Wieczorkiewicz, Pawel
> On 21. Aug 2019, at 20:49, Konrad Rzeszutek Wilk > wrote: > > >> +# Using xen-syms built in the previous step by build_full(). >> +SPECIAL_VARS=$(readelf -wi "$OUTPUT/xen-syms" | > > What version of readelf supports this? Asking as in the past there were some > options with

Re: [Xen-devel] [PATCH 06/14] livepatch: Add support for apply|revert action replacement hooks

2019-08-21 Thread Wieczorkiewicz, Pawel
On 21. Aug 2019, at 20:31, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: By default, in the quiescing zone, a hotpatch payload is applied with apply_payload() and reverted with revert_payload() functions. Both of the functions

Re: [Xen-devel] [PATCH 10/14] livepatch: Add support for inline asm hotpatching expectations

2019-08-21 Thread Wieczorkiewicz, Pawel
> On 21. Aug 2019, at 20:30, Konrad Rzeszutek Wilk > wrote: > > On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: >> typedef enum livepatch_func_state { >> LIVEPATCH_FUNC_NOT_APPLIED = 0, >> LIVEPATCH_FUNC_APPLIED = 1 >> @@ -838,11 +850,12 @@ struct livepatch_func { >> uint32_t

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-21 Thread Wieczorkiewicz, Pawel
> On 21. Aug 2019, at 20:28, Konrad Rzeszutek Wilk > wrote: > > On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: >> struct livepatch_func { >> const char *name; /* Name of function to be patched. */ >> void *new_addr; >> @@ -834,6 +839,10 @@ struct livepatch_func { >>

Re: [Xen-devel] [livepatch-hooks-2 PATCH 4/4] livepatch: Add per-function applied/reverted state tracking marker

2019-08-21 Thread Wieczorkiewicz, Pawel
> On 21. Aug 2019, at 20:12, Konrad Rzeszutek Wilk > wrote: > > On 8/14/19 4:39 AM, Pawel Wieczorkiewicz wrote: >> #ifdef __XEN__ >> +typedef enum livepatch_func_state { >> +LIVEPATCH_FUNC_NOT_APPLIED = 0, >> +LIVEPATCH_FUNC_APPLIED = 1 >> +} livepatch_func_state_t; >> + >> struct

Re: [Xen-devel] [livepatch-hooks-2 PATCH 2/4] create-diff-object: Add support for applied/reverted marker

2019-08-21 Thread Wieczorkiewicz, Pawel
On 21. Aug 2019, at 20:09, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: On 8/14/19 4:38 AM, Pawel Wieczorkiewicz wrote: With version 2 of a payload structure additional field is supported to track whether given function has been applied or reverted. There also comes additional

Re: [Xen-devel] [livepatch-hooks-2 PATCH 3/4] livepatch: Add support for apply|revert action replacement hooks

2019-08-21 Thread Wieczorkiewicz, Pawel
On 21. Aug 2019, at 20:10, Konrad Rzeszutek Wilk mailto:konrad.w...@oracle.com>> wrote: On 8/14/19 4:38 AM, Pawel Wieczorkiewicz wrote: By default, in the quiescing zone, a hotpatch payload is applied with apply_payload() and reverted with revert_payload() functions. Both of the functions

Re: [Xen-devel] [livepatch: independ. modules v2 2/3] livepatch: Allow to override inter-modules buildid dependency

2019-08-20 Thread Wieczorkiewicz, Pawel
> On 20. Aug 2019, at 16:28, Julien Grall wrote: > > Hi, > >>> …snip... >> Yeah, since I got feedback and reviews on various patches that I have >> already submitted the way I did, >> I simply continue with what I have until all comments are addressed (I do >> not want to lose anything). >

Re: [Xen-devel] [livepatch: independ. modules v2 2/3] livepatch: Allow to override inter-modules buildid dependency

2019-08-20 Thread Wieczorkiewicz, Pawel
> On 20. Aug 2019, at 15:35, Julien Grall wrote: > > Hi, > > Something looks fishy in the threading: > > - The patch #1 is answered in reply-to the patch #1 of version 1. > - This patch (#2) is answered in reply-to the patch #2 of version 1. > - The patch #3 is labeled as v3 an in reply-to

Re: [Xen-devel] [PATCH livepatch-python 1/1] livepatch: Add python bindings for livepatch operations

2019-08-20 Thread Wieczorkiewicz, Pawel
On 19. Aug 2019, at 23:39, Marek Marczykowski-Górecki mailto:marma...@invisiblethingslab.com>> wrote: On Thu, Aug 15, 2019 at 11:36:46AM +, Pawel Wieczorkiewicz wrote: Extend the XC python bindings library to support also all common livepatch operations and actions. …snip... + +static

Re: [Xen-devel] [PATCH livepatch-python 1/1] livepatch: Add python bindings for livepatch operations

2019-08-20 Thread Wieczorkiewicz, Pawel
Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879 PGPMIME Versions Identification Description: PGP/MIME Versions

Re: [Xen-devel] [livepatch: independ. modules 3/3] python: Add XC binding for Xen build ID

2019-08-20 Thread Wieczorkiewicz, Pawel
> On 19. Aug 2019, at 22:40, Marek Marczykowski-Górecki > wrote: > > On Thu, Aug 15, 2019 at 09:44:00AM +, Pawel Wieczorkiewicz wrote: >> Extend the list of xc() object methods with additional one to display >> Xen's buildid. The implementation follows the libxl implementation >> (e.g. max

Re: [Xen-devel] [livepatch-build-tools part3 v2 3/3] create-diff-object: Strip all undefined entires of known size

2019-08-19 Thread Wieczorkiewicz, Pawel
On 16. Aug 2019, at 17:02, Ross Lagerwall mailto:ross.lagerw...@citrix.com>> wrote: On 8/8/19 1:51 PM, Pawel Wieczorkiewicz wrote: The patched ELF object file contains all sections and symbols as resulted from the compilation. However, certain symbols may not be copied over to the resulting

Re: [Xen-devel] [PATCH livepatch-python 1/1] livepatch: Add python bindings for livepatch operations

2019-08-16 Thread Wieczorkiewicz, Pawel
> On 16. Aug 2019, at 14:37, Wei Liu wrote: > > On Thu, Aug 15, 2019 at 11:36:46AM +, Pawel Wieczorkiewicz wrote: >> Extend the XC python bindings library to support also all common >> livepatch operations and actions. >> >> …snip... >> >> Signed-off-by: Pawel Wieczorkiewicz >>

Re: [Xen-devel] [PATCH lp-metadata 3/3] livepatch: Add metadata runtime retrieval mechanism

2019-08-16 Thread Wieczorkiewicz, Pawel
> On 16. Aug 2019, at 14:44, Wei Liu wrote: > > On Thu, Aug 15, 2019 at 11:27:50AM +, Pawel Wieczorkiewicz wrote: >> Extend the livepatch list operation to fetch also payloads' metadata. >> This is achieved by extending the sysctl list interface with 2 extra >> guest handles: >> * metadata

Re: [Xen-devel] [livepatch: independ. modules 3/3] python: Add XC binding for Xen build ID

2019-08-16 Thread Wieczorkiewicz, Pawel
On 16. Aug 2019, at 14:47, Wei Liu mailto:w...@xen.org>> wrote: On Thu, Aug 15, 2019 at 09:44:00AM +, Pawel Wieczorkiewicz wrote: Extend the list of xc() object methods with additional one to display Xen's buildid. The implementation follows the libxl implementation (e.g. max buildid size

Re: [Xen-devel] [livepatch-build-tools part2 v2 6/6] create-diff-object: Do not include all .rodata sections

2019-08-16 Thread Wieczorkiewicz, Pawel
> On 16. Aug 2019, at 11:57, Ross Lagerwall wrote: > > On 8/8/19 1:39 PM, Pawel Wieczorkiewicz wrote: >> …snip... >> #define inc_printf(fmt, ...) \ >> log_debug("%*s" fmt, recurselevel, "", ##__VA_ARGS__); > This patch looks good. There is a comment at the top of >

Re: [Xen-devel] [livepatch-build-tools part2 v2 5/6] create-diff-object: Add new entries to special sections array array

2019-08-16 Thread Wieczorkiewicz, Pawel
On 16. Aug 2019, at 11:40, Ross Lagerwall mailto:ross.lagerw...@citrix.com>> wrote: On 8/8/19 1:35 PM, Pawel Wieczorkiewicz wrote: …snip... * The rela groups in the .fixup section vary in size. The beginning of each * .fixup rela group is referenced by the .ex_table section. To find the

Re: [Xen-devel] [PATCH lp-metadata 2/3] livepatch: Handle arbitrary size names with the list operation

2019-08-15 Thread Wieczorkiewicz, Pawel
;a=summary I hope that makes navigation and dealing with the swarm of patches a bit easier. Best Regards, Pawel Wieczorkiewicz On 15. Aug 2019, at 17:29, Julien Grall mailto:julien.gr...@arm.com>> wrote: On 15/08/2019 16:19, Wieczorkiewicz, Pawel wrote: Hi Lars, Julien, Hi,

Re: [Xen-devel] [PATCH lp-metadata 2/3] livepatch: Handle arbitrary size names with the list operation

2019-08-15 Thread Wieczorkiewicz, Pawel
Hi Lars, Julien, Thanks for the pointers, I will read them up and follow the recommendations with my future contributions. Sorry for the mess… But, let me ask first before reading the wikis, how do you prefer submitting series that contain patches belonging to 2 distinct repos (e.g. xen and

Re: [Xen-devel] [livepatch-build-tools part2 6/6] create-diff-object: Do not include all .rodata sections

2019-04-30 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 18:11, Ross Lagerwall wrote: > > On 4/16/19 1:07 PM, Pawel Wieczorkiewicz wrote: >> Starting with the "2af6f1aa6233 Fix patch creation with GCC 6.1+" commit >> all .rodata sections are included by default (regardless of whether they >> are needed or not). >> During stacked

Re: [Xen-devel] [livepatch-build-tools part2 5/6] create-diff-object: Add new entries to special sections array

2019-04-30 Thread Wieczorkiewicz, Pawel
On 29. Apr 2019, at 17:47, Ross Lagerwall mailto:ross.lagerw...@citrix.com>> wrote: On 4/16/19 1:07 PM, Pawel Wieczorkiewicz wrote: Handle .livepatch.hooks* and .altinstr_replacement sections as the special sections with assigned group_size resolution function. By default each .livepatch.hooks*

Re: [Xen-devel] [livepatch-build-tools part2 3/6] create-diff-object: Add is_special_section() helper function

2019-04-30 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 17:25, Ross Lagerwall wrote: > > On 4/16/19 1:07 PM, Pawel Wieczorkiewicz wrote: >> This function determines, based on the given section name, if the >> sections belongs to the special sections category. >> It treats a name from the special_sections array as a prefix. Any

Re: [Xen-devel] [livepatch-build-tools part2 2/6] common: Add is_referenced_section() helper function

2019-04-29 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 17:14, Ross Lagerwall wrote: > > On 4/16/19 1:07 PM, Pawel Wieczorkiewicz wrote: >> This function checks if given section has an included corresponding >> RELA section and/or any of the symbols table symbols references the >> section. Section associated symbols are ignored

Re: [Xen-devel] [livepatch-build-tools 4/4] livepatch-build: Handle newly created object files

2019-04-29 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 15:53, Ross Lagerwall wrote: > > On 4/8/19 9:32 AM, Pawel Wieczorkiewicz wrote: >> Up to now the livepatch-build ignores newly created object files. >> When patch applies new .c file and augments its Makefile to build it >> the resulting object file is not taken into

Re: [Xen-devel] [livepatch-build-tools part2 4/6] livepatch-build: detect special section group sizes

2019-04-29 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 16:21, Ross Lagerwall wrote: > > On 4/29/19 3:10 PM, Ross Lagerwall wrote: >> On 4/16/19 1:07 PM, Pawel Wieczorkiewicz wrote: >>> Hard-coding the special section group sizes is unreliable. Instead, >>> determine them dynamically by finding the related struct definitions

Re: [Xen-devel] [livepatch-build-tools 3/4] livepatch-build: Do not follow every symlink for patch file

2019-04-29 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 14:40, Ross Lagerwall wrote: > > On 4/8/19 9:32 AM, Pawel Wieczorkiewicz wrote: >> In some build systems symlinks might be used for patch file names >> to point from target directories to actual patches. Following those >> symlinks breaks naming convention as the resulting

Re: [Xen-devel] [livepatch-build-tools part3 1/3] create-diff-object: Do not create empty .livepatch.funcs section

2019-04-29 Thread Wieczorkiewicz, Pawel
> On 29. Apr 2019, at 16:37, Ross Lagerwall wrote: > > On 4/25/19 5:51 AM, Konrad Rzeszutek Wilk wrote: >> On Tue, Apr 16, 2019 at 12:22:39PM +, Pawel Wieczorkiewicz wrote: >>> When there is no changed function in the generated payload, do not >>> create an empty .livepatch.funcs section.

Re: [Xen-devel] [PATCH] xen/tools: Fix symbols segfaults

2019-04-03 Thread Wieczorkiewicz, Pawel
On 3. Apr 2019, at 10:10, Jan Beulich mailto:jbeul...@suse.com>> wrote: On 03.04.19 at 09:56, mailto:wipa...@amazon.de>> wrote: The symbols tool is outdated and has a bug in it leading to crashes. The tool is derived from linux kernel where this bug has been already fixed. Thanks for noticing