Re: [Xen-devel] [PATCH] tools/livepatch: recognize functions in livepatch.ignore.functions

2017-12-12 Thread Ross Lagerwall
kpatch's build tool was recently refactored to make this easier. Cheers, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] tools/livepatch: recognize functions in livepatch.ignore.functions

2017-12-13 Thread Ross Lagerwall
); Which apparently caused the symbol not being a function type, but a string(?). You've got a single # before _fn which causes stringification of the macro parameter. Therefore the symbol became a string and not a function. Cheers, -- Ross Lage

Re: [Xen-devel] [PATCH] livepatch: always print XENLOG_ERR information (ARM, ELF)

2019-09-13 Thread Ross Lagerwall
/livepatch.c | 28 +-- xen/common/livepatch_elf.c | 104 - 3 files changed, 80 insertions(+), 80 deletions(-) With Andrew's suggested whitespace changes: Reviewed-by: Ross Lagerwall ___ Xen-devel ma

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

2019-09-16 Thread Ross Lagerwall
goto out; + rc = build_symbol_table(payload, &elf); if ( rc ) goto out; It is a bit confusing having a new function called check_xen_build_id() when there is already a xen_build_id_check(). Perhaps the new one should be called xen_build_id_dep() as it is analogous to the

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

2019-09-16 Thread Ross Lagerwall
= name; -rc = upload_func(2 /* */, new_argv); +/* Fill in all user provided flags */ +for ( i = 0; i < argc - 1; i++ ) +apply_argv[i + 1] = argv[i + 1]; Wouldn't this make the loop body simpler? i = 1; i < argc; Or alternatively, just a straight memcpy()

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

2019-09-16 Thread Ross Lagerwall
((weak, used)) \ +const livepatch_prerevert_data_##_fn __section(".livepatch.hooks.prerevert") = _fn; + +#define LIVEPATCH_POSTREVERT_HOOK(_fn) \ +livepatch_postcall_t *__attribute__((weak, used)) \ +const livepatch_postrevert_data_##_fn __sectio

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

2019-09-17 Thread Ross Lagerwall
sable. OK, fair enough. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH for-4.13] xen/arm: livepatch: Prevent CPUs to fetch stale instructions after livepatching

2019-09-18 Thread Ross Lagerwall
ost_action(void) { -/* arch_livepatch_revive has nuked the instruction cache. */ +/* Discard any stale instructions that may have been fetched. */ +isb(); } void arch_livepatch_mask(void) Acked-by: Ross Lagerwall ___ Xen-devel mailin

Re: [Xen-devel] [PATCH v3 05/12] livepatch: Add support for apply|revert action replacement hooks

2019-09-19 Thread Ross Lagerwall
data->state = LIVEPATCH_STATE_APPLIED; +apply_payload_tail(data); } break; With the above minor issues addressed, Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v3 06/12] livepatch: Do not enforce ELF_LIVEPATCH_FUNC section presence

2019-09-19 Thread Ross Lagerwall
g to patch. Aborting...\n", + elf->name); +return -EINVAL; + } + +return 0; +} + LGTM, Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-19 Thread Ross Lagerwall
/* * These functions are called around the critical region patching live code, * for an architecture to take make appropratie global state adjustments. @@ -117,7 +142,7 @@ int arch_livepatch_quiesce(void); void arch_livepatch_revive(void); -- Ross Lagerwall __

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

2019-09-19 Thread Ross Lagerwall
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 planned for inline asm hotpatching. The flag enabled allows to contr

Re: [Xen-devel] [PATCH v3 09/12] livepatch: Add support for modules .modinfo section metadata

2019-09-19 Thread Ross Lagerwall
artin Pohlack Reviewed-by: Norbert Manthey Signed-off-by: Konrad Rzeszutek Wilk --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-25 Thread Ross Lagerwall
uint64_t name_total_size; +off_t name_off; If name_total_size becomes 32-bit, then I think you can replace the few usages of off_t with just a uint32_t (it doesn't need to be signed). Otherwise looks good to me. Thanks, -- Ross Lagerwall ___ Xen

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

2019-09-25 Thread Ross Lagerwall
live patch without having to list all of them. That should be done as a separate patch from this one, I think. Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-25 Thread Ross Lagerwall
ct == NULL ) +{ +Py_DECREF(list); + Py_DECREF(metadata_list); +rc = EFAULT; +goto error; +} +PyList_SetItem(list, i, info_dict); +Py_DECREF(info_dict); You can use PyList_SET_ITEM() to avoid the need for PyDECREF. Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-09-25 Thread Ross Lagerwall
On 9/17/19 9:27 AM, Wieczorkiewicz, Pawel wrote: 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

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

2019-09-25 Thread Ross Lagerwall
On 9/23/19 8:03 AM, Wieczorkiewicz, Pawel wrote: 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

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

2019-09-25 Thread Ross Lagerwall
On 9/25/19 5:34 PM, Wieczorkiewicz, Pawel wrote: 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

Re: [Xen-devel] [PATCH RFC for-4.13 06/10] xen/arm: Move ARCH_PATCH_INSN_SIZE out of the header livepatch.h

2019-09-27 Thread Ross Lagerwall
-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH] xen/efi: Set nonblocking callbacks

2019-09-27 Thread Ross Lagerwall
Other parts of the kernel expect these nonblocking EFI callbacks to exist and crash when running under Xen. Since the implementations of xen_efi_set_variable() and xen_efi_query_variable_info() do not take any locks, use them for the nonblocking callbacks too. Signed-off-by: Ross Lagerwall

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

2019-09-30 Thread Ross Lagerwall
elf->xc_handle) : Py_None; +} + The fstat() and mmap() error paths leak fd on error. Regards, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH] xenbus: Avoid deadlock during suspend due to open transactions

2019-05-08 Thread Ross Lagerwall
r discards the transaction, return OK since no changes were made anyway. This only affects users of the xenbus file interface. In-kernel users of xenbus are assumed to be well-behaved and complete all transactions before freezing. Signed-off-by: Ross Lagerwall --- drivers/xen/xenbu

[Xen-devel] [PATCH v2] xenbus: Avoid deadlock during suspend due to open transactions

2019-05-13 Thread Ross Lagerwall
to be well-behaved and complete all transactions before freezing. Signed-off-by: Ross Lagerwall --- Changed in v2: rewrote according to Juergen's suggestion. drivers/xen/xenbus/xenbus.h | 3 +++ drivers/xen/xenbus/xenbus_dev_frontend.c | 18 ++ drivers/xen/xen

Re: [Xen-devel] [PATCH v2] xenbus: Avoid deadlock during suspend due to open transactions

2019-05-22 Thread Ross Lagerwall
Ping? On 5/13/19 2:56 PM, Ross Lagerwall wrote: During a suspend/resume, the xenwatch thread waits for all outstanding xenstore requests and transactions to complete. This does not work correctly for transactions started by userspace because it waits for them to complete after freezing

[Xen-devel] [PATCH] xen: Avoid calling device suspend/resume callbacks

2019-07-29 Thread Ross Lagerwall
n HVM guest through 1000 migration cycles. I also tested PV guest migration (though less rigorously). Signed-off-by: Ross Lagerwall --- drivers/xen/manage.c | 24 +++--- drivers/xen/xenbus/xenbus_probe_frontend.c | 22 include/xen/xen

[Xen-devel] [PATCH] xen/netback: Reset nr_frags before freeing skb

2019-08-05 Thread Ross Lagerwall
At this point nr_frags has been incremented but the frag does not yet have a page assigned so freeing the skb results in a crash. Reset nr_frags before freeing the skb to prevent this. Signed-off-by: Ross Lagerwall --- drivers/net/xen-netback/netback.c | 2 ++ 1 file changed, 2 insertions

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

2019-08-16 Thread Ross Lagerwall
hypervisor changes * Changing directory in subshells to simplified the command Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [livepatch-build-tools part2 v2 1/6] common: Add is_standard_section() helper function

2019-08-16 Thread Ross Lagerwall
wicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey --- v2: * Keep lines to 80 chars --- Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-08-16 Thread Ross Lagerwall
xen-syms - dropped the redundant bug_frames_3_group_size() Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-08-16 Thread Ross Lagerwall
). New special sections are: .altinstr_replacement. Is this paragraph describing patch 5/6? Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey --- Reviewed-by: Ross Lagerwall (With the above paragraph and the

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 Ross Lagerwall
erate_special_section would work with .altinstr_replacement having a group size of 0. It looks to me like the for loop in that function would become an infinite loop (due to incrementing by group_size) and should_keep_rela_group would always return false. Regards, -- Ross Lagerwall _

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

2019-08-16 Thread Ross Lagerwall
-off-by: Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman

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

2019-08-16 Thread Ross Lagerwall
* strings sections. */ In fact, it is probably a good idea to rename the function to something like "is_rodata_str_section()" since this more accurately describes what it does now. Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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 Ross Lagerwall
On 8/16/19 1:06 PM, Wieczorkiewicz, Pawel wrote: 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   * .f

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

2019-08-16 Thread Ross Lagerwall
should_keep_rela_group() be updated instead? Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [livepatch-build-tools part3 v2 2/3] create-diff-object: Extend patchability verification: STN_UNDEF

2019-08-16 Thread Ross Lagerwall
?: "none"); Perhaps this log message is a bit misleading if only the second condition is true? Maybe something slightly more general like "has an entry with an undefined symbol". Otherwise looks OK to me. Thanks, -- Ross Lagerwall ___ X

Re: [Xen-devel] [livepatch-hooks-1 PATCH 1/3] create-diff-object: Handle extra pre-|post- hooks

2019-08-19 Thread Ross Lagerwall
Signed-off-by: Pawel Wieczorkiewicz --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [livepatch-hooks-1 PATCH 2/3] livepatch: Export payload structure via livepatch_payload.h

2019-08-19 Thread Ross Lagerwall
hlack Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH livepatch-hooks-4 1/1] livepatch: always print XENLOG_ERR information

2019-08-19 Thread Ross Lagerwall
relevant XENLOG_ERR messages. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Amit Shah Reviewed-by: Martin Mazein Reviewed-by: Bjoern Doebel --- Reviewed-by: Ross Lagerwall This changes is much-needed. Thanks, Ross ___ Xen-devel mailing list Xen-devel

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

2019-08-20 Thread Ross Lagerwall
On 4/29/19 4:24 PM, Wieczorkiewicz, Pawel wrote: 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

Re: [Xen-devel] [PATCH LIVEPATCH-BUILD-TOOLS] Introduce a MAINTAINERS file

2019-08-20 Thread Ross Lagerwall
On 8/15/19 7:16 PM, Lars Kurth wrote: Rationale: this will allow us to use get_maintainer.pl / add_maintainers.pl scripts from xen.git Signed-off-by: Lars Kurth Acked-by: Ross Lagerwall Thanks! ___ Xen-devel mailing list Xen-devel

Re: [Xen-devel] [PATCH 09/20] create-diff-object: Add new entries to special sections array

2019-08-22 Thread Ross Lagerwall
Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 10/20] create-diff-object: Do not include all .rodata sections

2019-08-22 Thread Ross Lagerwall
: Bjoern Doebel Reviewed-by: Norbert Manthey --- Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 11/20] create-diff-object: Do not create empty .livepatch.funcs section

2019-08-22 Thread Ross Lagerwall
only hooks are specified. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Martin Mazein Reviewed-by: Martin Pohlack --- create-diff-object.c | 5 + 1 file changed, 5 insertions(+) Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing

Re: [Xen-devel] [PATCH 12/20] create-diff-object: Extend patchability verification: STN_UNDEF

2019-08-22 Thread Ross Lagerwall
--- Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 13/20] create-diff-object: Strip all undefined entires of known size

2019-08-22 Thread Ross Lagerwall
-Irina Paraschiv --- Reviewed-by: Ross Lagerwall Thanks ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] livepatch: Identify the object file create-diff-object dislikes

2019-08-27 Thread Ross Lagerwall
On 08/27/2019 04:38 PM, Andrew Cooper wrote: ... rather than leaving the user with no hint as to where to debug next. Signed-off-by: Andrew Cooper --- CC: Konrad Rzeszutek Wilk CC: Ross Lagerwall Reviewed-by: Ross Lagerwall Thanks ___ Xen

Re: [Xen-devel] [PATCH] livepatch-build-tools: Detect special section group sizes

2019-04-16 Thread Ross Lagerwall
-by: Glenn Enright --- CC: Ross Lagerwall CC: Konrad Rzeszutek Wilk This patch resulted in a loadable livepatch. The alt section size in my case was actually 14. Thanks for the patch! Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list

Re: [Xen-devel] [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions

2019-04-29 Thread Ross Lagerwall
Reviewed-by: Bjoern Doebel Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [livepatch-build-tools 2/4] livepatch-gcc: Ignore built_in.o and prelink.o object files

2019-04-29 Thread Ross Lagerwall
iewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-04-29 Thread Ross Lagerwall
adlink -f "$(dirname "$patcharg")")/$(basename "$patcharg")" CONFIGFILE="$(readlink -m -- "$configarg")" OUTPUT="$(readlink -m -- "$outputarg")" This works, but would it not be simpler to just pass $patcharg into

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

2019-04-29 Thread Ross Lagerwall
Manthey This looks to resolve: https://xenproject.atlassian.net/browse/XEN-90 (I think?) Yes, I expect it would. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-04-29 Thread Ross Lagerwall
viously a patch on xen-devel which took a different approach (https://lists.xenproject.org/archives/html/xen-devel/2017-06/msg03532.html). Perhaps you could look at it and see which approach would be better? Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-04-29 Thread Ross Lagerwall
"can't find special struct size" +fi +for i in $ALT_STRUCT_SIZE $BUG_STRUCT_SIZE $EX_STRUCT_SIZE; do +if [[ ! $i -gt 0 ]] || [[ ! $i -le 16 ]]; then +die "invalid special struct size $i" + fi +

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

2019-04-29 Thread Ross Lagerwall
;s recent patch ("livepatch-build-tools: Detect special section group sizes") but slightly more complete as it detects sizes for the bug frames too so it should probably be used instead. Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-d

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

2019-04-29 Thread Ross Lagerwall
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 in the DWARF metadata. This is a livepatch backport of kpatch

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

2019-04-29 Thread Ross Lagerwall
load them. Such payloads without any changed functions may appear when only hooks are specified. Ross, I am going to push this in next week unless you have other thoughts? Reviewed-by: Ross Lagerwall This code change looks OK to me. However: 1) I think that the hypervisor should treat an empty

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

2019-04-29 Thread Ross Lagerwall
(is_standard_section(sec) || should_include_str_section(sec->name)) { Let's keep lines to 80 chars where feasible (1 tab == 8 spaces). Otherwise LGTM. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-04-29 Thread Ross Lagerwall
s */ + if (sym->type == STT_SECTION) + continue; + if (sym->sec->index == sec->index) + return true; You can simplify this check to `sym->sec == sec` like the rest of the code does. -- Ross Lagerwall _

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

2019-04-29 Thread Ross Lagerwall
ecial->name))) + return true; This check is not as precise as it could be, since ".altinstructionsfoo" would be considered special when it actually means nothing to this tool. -- Ross Lagerwall ___ Xen-devel mailin

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

2019-04-29 Thread Ross Lagerwall
eplacement. It needs to parse the updated, pruned .altinstructions section and regenerate .altinstr_replacement, including only what is needed. I don't know why .livepatch.hooks is included in this list either since all hooks are always included and there is nothing to regenerate/pr

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

2019-04-29 Thread Ross Lagerwall
er to just amend the previous function rather than introducing a new one. E.g. ... || (should_include_str_section(sec->name) && is_referenced_section(sec, kelf)) Regards, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-11-19 Thread Ross Lagerwall
> The xen-livepatch tool has been also modified to handle the name > back-to-back transfers correctly. > > Signed-off-by: Pawel Wieczorkiewicz > Reviewed-by: Andra-Irina Paraschiv > Reviewed-by: Bjoern Doebel > Reviewed-by: Martin Pohlack > Signed-off-by: Konrad Rzeszu

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

2019-11-19 Thread Ross Lagerwall
ily parse the metadata for a given module > by a machine. > > Signed-off-by: Pawel Wieczorkiewicz > Reviewed-by: Andra-Irina Paraschiv > Reviewed-by: Martin Pohlack > Reviewed-by: Norbert Manthey > Signed-off-by: Konrad Rzeszutek Wilk > --- Reviewed-by: Ross Lagerwall

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

2019-11-19 Thread Ross Lagerwall
me.\n" > + " name [str]: Module name to be used\n" > + " filename [str]: Filename of a module to be uploaded\n" > + "Returns: None on success; throwing an exception on error\n" }, > + > +{ "livepatch_action", > +

Re: [Xen-devel] [PATCH v2 1/7] livepatch-build: Embed hypervisor build id into every hotpatch

2019-11-25 Thread Ross Lagerwall
;.livpatch.xen_depends' containing the hypervisor build id. > > The hypervisor build id must be always provided as a command line > parameter: --xen-depends. > > Signed-off-by: Pawel Wieczorkiewicz > Reviewed-by: Andra-Irina Paraschiv > Reviewed-by: Bjoern Doe

Re: [Xen-devel] [PATCH v2 3/7] create-diff-object: Handle optional apply|revert hooks

2019-11-25 Thread Ross Lagerwall
On 9/16/19 12:30 PM, Pawel Wieczorkiewicz wrote: > Include new sections containing optional apply and revert action > hooks. > > The following new section names are supported: > - .livepatch.hooks.apply > - .livepatch.hooks.revert > > Signed-off-by: Pawel Wieczorki

Re: [Xen-devel] [PATCH v2 4/7] create-diff-object: Add support for applied/reverted marker

2019-11-25 Thread Ross Lagerwall
ns. > > The new fields are zero-out upon .livepatch.funcs section creation. > > Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 5/7] create-diff-object: Add support for expectations

2019-11-25 Thread Ross Lagerwall
expectation field is zero-out and the expectation is > disabled unless explicitly specified in the patch. > > Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https:/

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

2019-11-25 Thread Ross Lagerwall
ed/xen && find . -type f -name '*.o' | > sort) <(cd original/xen && find . -type f -name '*.o' | sort)) > for i in $NEW_FILES; do > cp "patched/$i" "output/$i" > +strip --strip-unneeded "output/$i" This strips debug symbols too which is not necessarily desirable and I think for most software is normally left a high level process (e.g. rpmbuild). Can you make this optional please? Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2 7/7] livepatch-build: Strip all metadata symbols from hotpatch modules

2019-11-25 Thread Ross Lagerwall
he hotpatch modules and should be > stripped to avoid symbol names collisions and to save hotpatch files > space. > > Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] create-diff-object: do not strip STN_UNDEF symbols from *.fixup

2019-11-25 Thread Ross Lagerwall
mbols anyway. > > Signed-off-by: Pawel Wieczorkiewicz > --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-11-25 Thread Ross Lagerwall
-by: Andra-Irina Paraschiv > Reviewed-by: Bjoern Doebel > Reviewed-by: Norbert Manthey > --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v2] MAINTAINERS: Add mandatory V: version identifier

2019-11-26 Thread Ross Lagerwall
On 11/26/19 1:11 PM, Pawel Wieczorkiewicz wrote: > The livepatch-build-tools MAINTAINERS file is missing V: version > identifier. This seems required by the Xen repo's add_maintainers.pl > script. > > Signed-off-by: Pawel Wieczorkiewicz > --- A

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

2019-11-26 Thread Ross Lagerwall
additionally strip all unneeded symbols > from new object files. > > Signed-off-by: Pawel Wieczorkiewicz > --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] Ping: [PATCH v2] build: provide option to disambiguate symbol names

2019-11-28 Thread Ross Lagerwall
> is an error. > It's due to the way livepatch-build tool interposes on the build to capture changed object files for later comparison. Now that objcopy writes out the proper object files rather than gcc (which just writes a temporary one), the livepatch-build tool needs some adjustment otherwise it doesn't capture any changed files. I'm working on a patch. Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH LP-BUILD_TOOLS] Fix building with updated ENFORCE_UNIQUE_SYMBOLS behaviour

2019-11-28 Thread Ross Lagerwall
object files so intercept calls to objcopy as well to capture the final object files. While in the area, add a couple of extra object files to be ignored when patching. Signed-off-by: Ross Lagerwall --- With this change, I've built and successfully applied a trivial livepatch with Jan

Re: [Xen-devel] Ping: [PATCH v2] build: provide option to disambiguate symbol names

2019-11-28 Thread Ross Lagerwall
On 11/28/19 1:57 PM, Jan Beulich wrote: > On 28.11.2019 14:54, Ross Lagerwall wrote: >> On 11/28/19 1:49 PM, Jan Beulich wrote: >>> On 28.11.2019 13:15, Sergey Dyasli wrote: >>>> Applying the patch didn't end up well for my test LP (from another thread): >>

Re: [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later

2019-12-04 Thread Ross Lagerwall
us, in order to decide if string section should be > included or not, all symbols must be evaluated first. > > Signed-off-by: Pawel Wieczorkiewicz > Reported-by: Sergey Dyasli Reviewed-by: Ross Lagerwall ... and pushed. Thanks! ___ Xen-d

Re: [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Ignore .init sections

2019-12-04 Thread Ross Lagerwall
rkiewicz Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-10-18 Thread Ross Lagerwall
expect I will have time on Monday to look at the rest. Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v3 5/7] x86/livepatch: Fail the build if duplicate symbols exist

2019-10-23 Thread Ross Lagerwall
On 10/23/19 2:58 PM, Andrew Cooper wrote: From: Ross Lagerwall The binary diffing algorithm used by xen-livepatch depends on having unique symbols. Signed-off-by: Ross Lagerwall Presumably this should be "livepatch-build" or "livepatch-build-tools" rather than "

Re: [Xen-devel] Tagging livepatch-build-tools.git with Xen releases

2019-10-25 Thread Ross Lagerwall
o move in lockstep with Xen. I would always recommend using the tip commit since bugs often get fixed around the time that patching is needed. Therefore I don't see any value in tagging it for the time being. Thanks, -- Ross Lagerwall ___ Xen-dev

Re: [Xen-devel] [PATCH 2/2] x86/livepatch: Prevent patching with active waitqueues

2019-11-08 Thread Ross Lagerwall
forable to the fireworks which occur from trying to unwind > the old stack frame at a later point. > > Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 1/2] xen/livepatch: Add a return value to load hooks

2019-11-08 Thread Ross Lagerwall
On 11/5/19 7:43 PM, Andrew Cooper wrote: > One use of load hooks is to perform a safety check of the system in its > quiesced state. Any non-zero return value from a load hook will abort the > apply attempt. > > Signed-off-by: Andrew Cooper Reviewed-by:

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

2019-11-08 Thread Ross Lagerwall
y > Reviewed-by: Petre Eftime > Reviewed-by: Leonard Foerster > Reviewed-by: Martin Pohlack > Reviewed-by: Norbert Manthey > Signed-off-by: Konrad Rzeszutek Wilk > --- > Changed since v3: > * simplified loop in xen-livepatch.c > Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-11-08 Thread Ross Lagerwall
; Signed-off-by: Pawel Wieczorkiewicz > Reviewed-by: Andra-Irina Paraschiv > Reviewed-by: Petre Eftime > Reviewed-by: Martin Pohlack > Reviewed-by: Norbert Manthey > Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2019-11-08 Thread Ross Lagerwall
the top of the design document] > > Signed-off-by: Pawel Wieczorkiewicz > Reviewed-by: Andra-Irina Paraschiv > Reviewed-by: Bjoern Doebel > Reviewed-by: Martin Pohlack > Signed-off-by: Konrad Rzeszutek Wilk > Acked-by: Julien Grall Reviewed-by: Ross Lagerwall

[Xen-devel] [PATCH] xen/pciback: Check dev_data before using it

2018-12-14 Thread Ross Lagerwall
If pcistub_init_device fails, the release function will be called with dev_data set to NULL. Check it before using it to avoid a NULL pointer dereference. Signed-off-by: Ross Lagerwall --- drivers/xen/xen-pciback/pci_stub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[Xen-devel] [PATCH] xen_pt: Present the size of 64 bit BARs correctly

2018-05-14 Thread Ross Lagerwall
The full size of the BAR is stored in the lower PCIIORegion.size. The upper PCIIORegion.size is 0. Calculate the size of the upper half correctly from the lower half otherwise the size read by the guest will be incorrect. Signed-off-by: Ross Lagerwall --- hw/xen/xen_pt_config_init.c | 2 ++ 1

[Xen-devel] [PATCH] x86/shutdown: use ACPI reboot method for Dell PowerEdge R540

2018-05-14 Thread Ross Lagerwall
Vendor: Dell Inc. Version: 1.3.7 Release Date: 02/09/2018 System Information Manufacturer: Dell Inc. Product Name: PowerEdge R540 Signed-off-by: Ross Lagerwall --- xen/arch/x86/shutdown.c | 9 + 1 file changed, 9 insertions(+) diff --git a/xen/arch/x86/shutdown.c b/xen

Re: [Xen-devel] [PATCH] x86/shutdown: use ACPI reboot method for Dell PowerEdge R540

2018-05-14 Thread Ross Lagerwall
this hardware to use the ACPI reboot method instead. BIOS Information Vendor: Dell Inc. Version: 1.3.7 Release Date: 02/09/2018 System Information Manufacturer: Dell Inc. Product Name: PowerEdge R540 Signed-off-by: Ross Lagerwall Acked-by: Jan Beulich with a remark

Re: [Xen-devel] [PATCH LP-BUILD-TOOLS] Allow patching files compiled multiple times

2018-03-05 Thread Ross Lagerwall
On 02/23/2018 05:08 PM, Ross Lagerwall wrote: gas prior to binutils commit fbdf9406b0 (appears in 2.27) outputs symbol table entries resulting from .file in reverse order. If we get two consecutive file symbols, prefer the first one if that names an object file or has a directory component (to

Re: [Xen-devel] [PATCH v4 0/6] Add dmops to allow use of VGA with restricted QEMU

2018-03-05 Thread Ross Lagerwall
On 03/05/2018 02:40 PM, Anthony PERARD wrote: On Tue, Jan 23, 2018 at 03:22:40PM +, Ross Lagerwall wrote: The recently added support for restricting QEMU prevents use of the VGA console. This series addresses that by adding a couple of new dmops. A corresponding patch for QEMU is needed to

Re: [Xen-devel] [PATCH] docs/qemu-deprivilege: Revise and update with status and future plans

2018-03-23 Thread Ross Lagerwall
traightforward +to listen on a TCP socket outside of its own network namespace. One +option would be to use VNC over a UNIX socket: -3) root -As a last resort, libxl will start QEMU as root. +-vnc unix:/var/run/xen/vnc- +However, this would break functionality in the general case; I think +we need to have the toolstack open a socket and pass the fd to QEMU +(which requires changes to QEMU). -Please note that running QEMU as non-root causes several features like -migration and PCI passthrough to not work properly and may prevent the guest -from booting. Although there are still a lot of todos, this looks generally good and is a big improvement on the previous document. Cheers, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] docs/qemu-deprivilege: Revise and update with status and future plans

2018-03-23 Thread Ross Lagerwall
On 03/23/2018 10:53 AM, George Dunlap wrote: On 03/23/2018 09:41 AM, Ross Lagerwall wrote: On 03/22/2018 06:24 PM, George Dunlap wrote: snip -for ((i=1; i<65536; i++)) +# Introduction + +# Setup + +## Getting the right versions of software + +Linux 4.XX (For dom0 kernel...) Requires 4

Re: [Xen-devel] [PATCH] docs/qemu-deprivilege: Revise and update with status and future plans

2018-03-28 Thread Ross Lagerwall
ere: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg04674.html Regards, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] docs/qemu-deprivilege: Revise and update with status and future plans

2018-03-28 Thread Ross Lagerwall
d just refer to the documentation for xentoolcore_restrict_all? Note that file descriptors are not just closed, they are replaced with /dev/null. Also note that any gnttab and gntalloc file descriptors (used by libxengnttab) are also replaced with /dev/null. Regards, -- Ross Lagerwall

Re: [Xen-devel] [PATCH net-next] xen-netfront: fix queue name setting

2018-07-20 Thread Ross Lagerwall
n-event device/vif/0-q1-rx Fixes: f599c64fdf7d ("xen-netfront: Fix race between device setup and open") Signed-off-by: Vitaly Kuznetsov --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https:/

  1   2   3   >