[Xen-devel] [PATCH 1/2] pygrub: Ignore GRUB2 if statements

2016-04-07 Thread Ross Lagerwall
om booting using the default entry. Since I'm not aware of any distro GRUB config which puts useful entries within conditionals, ignore them. Signed-off-by: Ross Lagerwall --- tools/pygrub/src/GrubConf.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/pyg

Re: [Xen-devel] [PATCH v5 19/28] build_id: Provide ld-embedded build-ids

2016-04-08 Thread Ross Lagerwall
re the one who observed this? Yes, that would probably solve the problem. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v5 27/28] xsplice: Add support for shadow variables.

2016-04-08 Thread Ross Lagerwall
ng it is OK. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v5 15/28] xsplice: Add .xsplice.hooks functions and test-case

2016-04-08 Thread Ross Lagerwall
SA-60 XSA-64 XSA-80 XSA-82 XSA-97 XSA-107 XSA-114 XSA-150 -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v5 23/28] xsplice: Stacking build-id dependency checking.

2016-04-08 Thread Ross Lagerwall
linear stack of patches with dependency management done in userspace, despite having old code checking. What kSplice use in practice is exactly what is implemented here; a linear stack of patches using some sort of identifier (build-id/uuid). -- Ross Lagerwall __

Re: [Xen-devel] [PATCH v5 13/28] xsplice, symbols: Implement symbol name resolution on address.

2016-04-11 Thread Ross Lagerwall
that is determined). There's also a different type of symbol lookup in the xsplice code: looking up the address of the symbol to be replaced. In this case, it is the original symbol thatr needs to be returned. This prevents having a chain of jumps if a function is patched multiple times. -- R

Re: [Xen-devel] [PATCH v5 15/28] xsplice: Add .xsplice.hooks functions and test-case

2016-04-11 Thread Ross Lagerwall
w variables. The XSAs I've listed above fall into this category. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v7] xSplice v1 design and implementation.

2016-04-12 Thread Ross Lagerwall
o trip a 5s watchdog timeout, let alone 30ms timeout. So what is important is not really the number of pCPUs but the kind of workload that it being run. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v8.1 14/27] xsplice, symbols: Implement symbol name resolution on address.

2016-04-20 Thread Ross Lagerwall
roduced in this binary patch or whether it overrides a symbol in a previous binary patch (or the core binary). Either way, the symbol will be used when resolving a backtrace. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v8 02/25] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op

2016-04-20 Thread Ross Lagerwall
ad_lock); + +return rc; +} + +int xsplice_op(xen_sysctl_xsplice_op_t *xsplice) -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v8.1 14/27] xsplice, symbols: Implement symbol name resolution on address.

2016-04-22 Thread Ross Lagerwall
mbol table, if more than one payload is loaded, there will be duplicate conflicting symbols. So, to prevent these symbols from going into the symbol table, I disallowed STT_NOTYPE. Perhaps not the best solution but... -- Ross Lagerwall ___ Xen-devel

Re: [Xen-devel] [PATCH v8.1 14/27] xsplice, symbols: Implement symbol name resolution on address.

2016-04-22 Thread Ross Lagerwall
names. The problem is that these are generated symbols, so even if you had e.g. keyhandler.c#.LC0, keyhandler.c#.LC1, in the symbol table, they might be completed unrelated if you change the source even slightly. Having these entries in the symbol table would not make any sense. Rather than ignori

Re: [Xen-devel] [PATCH v8.1 14/27] xsplice, symbols: Implement symbol name resolution on address.

2016-04-22 Thread Ross Lagerwall
sistent for core and modules. Yes. And, as best I can tell, .L symbols are not in the core table so this would then make it consistent for modules. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH] xen/qspinlock: Don't kick CPU if IRQ is not initialized

2016-04-22 Thread Ross Lagerwall
the spinlock, so it won't have initialized the interrupt in the meantime. Signed-off-by: Ross Lagerwall --- arch/x86/xen/spinlock.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 9e2ba5c..f42e78d 100644 --- a/arch/x86/xen/spin

Re: [Xen-devel] [PATCH v8.1 14/27] xsplice, symbols: Implement symbol name resolution on address.

2016-04-24 Thread Ross Lagerwall
-9]* (for assembler generated local labels) So to match what is used by the default hypervisor build, I think we should change the check to discard when the symbol matches (2), (5), or (6) above and refers to a mergeable section. The above rules are defined in _bfd_elf_is_local_label_name and elf_

Re: [Xen-devel] [PATCH v8 02/25] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op

2016-04-25 Thread Ross Lagerwall
On 04/25/2016 10:03 AM, Jan Beulich wrote: On 22.04.16 at 20:06, wrote: On Wed, Apr 20, 2016 at 02:18:48PM +0100, Ross Lagerwall wrote: On 04/13/2016 10:09 PM, Konrad Rzeszutek Wilk wrote: snip +static int xsplice_action(xen_sysctl_xsplice_action_t *action) +{ +struct payload *data

Re: [Xen-devel] [PATCH v9 04/27] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op

2016-04-26 Thread Ross Lagerwall
KED stated, then it doesn't make sense to have the above case. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 06/27] xen-xsplice: Tool to manipulate xsplice payloads

2016-04-26 Thread Ross Lagerwall
ame patch.\n" +" load upload, check and apply .\n" Since the check command is removed, this should be "upload and apply ..." -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 05/27] libxc: Implementation of XEN_XSPLICE_op in libxc

2016-04-26 Thread Ross Lagerwall
return _xc_xsplice_action(xch, name, XSPLICE_ACTION_CHECK, timeout); +} And this? -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 04/27] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op

2016-04-26 Thread Ross Lagerwall
) */ +/* for operation to take. */ I guess XSPLICE_ACTION_CHECK should also be removed and XSPLICE_ACTION_* renumbered. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 10/27] xsplice: Add helper elf routines

2016-04-26 Thread Ross Lagerwall
mpiling with -ffunction-sections -fdata-sections, the build tool can quite easily exceed this limit. IMO the check doesn't serve any useful purpose and should be removed. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 11/27] xsplice: Implement payload loading

2016-04-26 Thread Ross Lagerwall
ec[i].load_addr = buf + offset[i]; + +/* + * Don't copy NOBITS - such as BSS. We don't memset BSS as + * arch_xsplice_alloc_payload has zeroed it out for us. + */ + if ( elf->sec[i].sec->sh_type != SHT_NOBITS ) +

Re: [Xen-devel] [PATCH v9 17/27] xsplice: Add support for bug frames.

2016-04-26 Thread Ross Lagerwall
ptr < (data->ro_addr + data->ro_size)) || + (ptr >= data->text_addr && + ptr < (data->text_addr + data->text_size)) ) The above 3 calculations are wrong due to the use of void *. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 16/27] x86, xsplice: Print payload's symbol name and payload name in backtraces

2016-04-26 Thread Ross Lagerwall
gion->start = payload->text_addr; +region->end = payload->text_addr + payload->text_size; This calculation is wrong due to the use of void *. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v9 16/27] x86, xsplice: Print payload's symbol name and payload name in backtraces

2016-04-26 Thread Ross Lagerwall
} +/* Setup the virtual region with proper data. */ +region = &payload->region; + +region->symbols_lookup = xsplice_symbols_lookup; +region->start = payload->text_addr; +region->end = payload->text_addr + payload->text_size; This calculation is wro

Re: [Xen-devel] [PATCH v9 17/27] xsplice: Add support for bug frames.

2016-04-26 Thread Ross Lagerwall
On 04/26/2016 12:05 PM, Ross Lagerwall wrote: On 04/25/2016 04:35 PM, Konrad Rzeszutek Wilk wrote: snip diff --git a/xen/common/xsplice.c b/xen/common/xsplice.c index 72a3b88..11b19dd 100644 --- a/xen/common/xsplice.c +++ b/xen/common/xsplice.c @@ -123,6 +123,35 @@ static int verify_payload

Re: [Xen-devel] [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads

2016-05-06 Thread Ross Lagerwall
Cc: Ross Lagerwall --- xen/common/xsplice_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c index 1e1f167..918a1bf 100644 --- a/xen/common/xsplice_elf.c +++ b/xen/common/xsplice_elf.c @@ -397,7 +397,8 @@ static int

[Xen-devel] [PATCH v1 0/7] Make building xSplice patches easier

2016-05-06 Thread Ross Lagerwall
Here is a set of changes to make building xSplice patches easier. Tested to boot on x86. Compile-tested on arm. This is probably too late to make it into 4.7, but hey, if someone wants to put it in I've CC'd Wei. Ross Lagerwall (7): lib: Add a generic implementation of current

[Xen-devel] [PATCH v1 2/7] sched: Remove dependency on __LINE__ for release builds

2016-05-06 Thread Ross Lagerwall
When using xsplice, use of __LINE__ can generate spurious changes in functions due to embedded line numbers. For release builds, remove the use of these line numbers in domain_crash*() and print the current text address instead. Signed-off-by: Ross Lagerwall --- xen/include/xen/sched.h | 14

[Xen-devel] [PATCH v1 3/7] mm: Use statically defined locking order

2016-05-06 Thread Ross Lagerwall
Instead of using a locking order based on line numbers which doesn't play nicely with xSplice, statically define the locking order. Signed-off-by: Ross Lagerwall --- xen/arch/x86/mm/mm-locks.h | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git

[Xen-devel] [PATCH v1 5/7] iommu: Remove dependency on __LINE__ for release builds

2016-05-06 Thread Ross Lagerwall
When using xsplice, use of __LINE__ can generate spurious changes in functions due to embedded line numbers. For release builds, remove the use of these line numbers in IOMMU_WAIT_OP() and print the current text address instead. Signed-off-by: Ross Lagerwall --- xen/drivers/passthrough/vtd

[Xen-devel] [PATCH v1 7/7] Rename sections for compatibility with -ffunction-sections -fdata-sections

2016-05-06 Thread Ross Lagerwall
x27;s special sections with an extra period. The idea for this was taken from a similar patch series applied to the Linux kernel by the kSplice folks. Signed-off-by: Ross Lagerwall --- xen/arch/arm/xen.lds.S| 14 +++--- xen/arch/x86/boot/x86_64.S| 2 +- xen/arch/x86/hvm/

[Xen-devel] [PATCH v1 1/7] lib: Add a generic implementation of current_text_addr()

2016-05-06 Thread Ross Lagerwall
Remove the unused x86 implementation. Signed-off-by: Ross Lagerwall --- xen/common/lib.c| 12 xen/include/asm-x86/processor.h | 10 -- xen/include/xen/lib.h | 2 ++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/xen/common/lib.c

[Xen-devel] [PATCH v1 6/7] acpi: Remove dependency on __LINE__ for release builds

2016-05-06 Thread Ross Lagerwall
When using xsplice, use of __LINE__ can generate spurious changes in functions due to embedded line numbers. For release builds, remove the use of these line numbers in the ACPI code and print the current text address instead. Signed-off-by: Ross Lagerwall --- xen/drivers/acpi/utilities

[Xen-devel] [PATCH v1 4/7] page-alloc: Remove dependency on __LINE__ for release builds

2016-05-06 Thread Ross Lagerwall
When using xsplice, use of __LINE__ can generate spurious changes in functions due to embedded line numbers. For release builds, remove the use of these line numbers in BOOT_BUG_ON() and print the current text address instead. Signed-off-by: Ross Lagerwall --- xen/common/page_alloc.c | 8

[Xen-devel] [PATCH] xen/balloon: Fix declared-but-not-defined warning

2016-05-09 Thread Ross Lagerwall
Fix a declared-but-not-defined warning when building with XEN_BALLOON_MEMORY_HOTPLUG=n. This fixes a regression introduced by commit dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE"). Signed-off-by: Ross Lagerwall --- drivers/xen/balloon.c | 4 ++-- 1 file

[Xen-devel] [PATCH] xsplice: Prevent new symbols duplicating core symbols

2016-05-10 Thread Ross Lagerwall
When loading patches, the code prevents loading a patch containing a new symbol that duplicates a symbol from another loaded patch. However, the check should also prevent loading a new symbol that duplicates a symbol from the core hypervisor. Signed-off-by: Ross Lagerwall --- Wei, can you

[Xen-devel] [PATCH v2] xen/balloon: Fix declared-but-not-defined warning

2016-05-10 Thread Ross Lagerwall
Fix a declared-but-not-defined warning when building with XEN_BALLOON_MEMORY_HOTPLUG=n. This fixes a regression introduced by commit dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE"). Signed-off-by: Ross Lagerwall --- v2: Moved function instead of adding a

[Xen-devel] [PATCH] xen/events: Don't move disabled irqs

2016-05-10 Thread Ross Lagerwall
rom_fork+0x3f/0x70 [] ? kthread_create_on_node+0x1e0/0x1e0 Signed-off-by: Ross Lagerwall --- drivers/xen/events/events_base.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index cb7138c..71d49a9 100644 --- a/

Re: [Xen-devel] [PATCH] xen: remove incorrect forward declaration

2016-05-11 Thread Ross Lagerwall
ation/SubmittingPatches is not clear about it. Regardless, the build fix should be backported to 4.4. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH] x86: Move microcode loading earlier

2017-04-18 Thread Ross Lagerwall
g boot. Signed-off-by: Ross Lagerwall --- xen/arch/x86/cpu/common.c | 2 + xen/arch/x86/microcode.c| 131 +--- xen/arch/x86/microcode_amd.c| 3 +- xen/arch/x86/microcode_intel.c | 3 +- xen/arch/x86/setup.c| 2 + xen/arc

[Xen-devel] [PATCH] x86/microcode: Use the return value from early_microcode_update_cpu

2017-04-20 Thread Ross Lagerwall
Use the return value from early_microcode_update_cpu rather than ignoring it. Signed-off-by: Ross Lagerwall --- xen/arch/x86/microcode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/microcode.c b/xen/arch/x86/microcode.c index 4e7dfcd..7558202 100644 --- a

[Xen-devel] [PATCH] x86/efi: Reserve EFI properties table

2017-05-08 Thread Ross Lagerwall
EFI properties table as reserved in the E820, much like is done with the dmi regions. Signed-off-by: Ross Lagerwall --- xen/arch/x86/efi/efi-boot.h | 8 xen/common/efi/boot.c | 20 xen/common/efi/efi.h| 4 3 files changed, 32 insertions(+) d

Re: [Xen-devel] [PATCH] x86/efi: Reserve EFI properties table

2017-05-17 Thread Ross Lagerwall
On 05/15/2017 02:52 PM, Julien Grall wrote: Hi Andrew, On 08/05/17 17:29, Andrew Cooper wrote: On 08/05/17 17:17, Ross Lagerwall wrote: Some EFI firmware implementations may place the EFI properties table in RAM marked as BootServicesData, which Xen does not consider as reserved. When dom0

[Xen-devel] [PATCH] x86/vmx: Fix vmentry failure because of invalid LER on Broadwell

2017-05-25 Thread Ross Lagerwall
Occasionally, the top three bits of MSR_IA32_LASTINTTOIP (MSR_LER_TO_LIP) may be incorrect, as though the MSR is using the LBR_FORMAT_EIP_FLAGS_TSX format. The MSR should contain an offset into the current code segment according to the Intel documentation. It is not clear why this happens. It may b

[Xen-devel] [PATCH v2] x86/vmx: Fix vmentry failure because of invalid LER on Broadwell

2017-05-30 Thread Ross Lagerwall
is assumed to be erratum BDF14. Workaround the issue by sign-extending into bits 48:63 for MSR_IA32_LASTINT{FROM,TO}IP. Signed-off-by: Ross Lagerwall --- Changes in v2: - Use a single check if fixup is needed. - Rename to include the erratum name/number. - Sign extend properly rather than just

Re: [Xen-devel] [PATCH for v4.9] livepatch: Wrong usage of spinlock on debug console.

2017-06-09 Thread Ross Lagerwall
ocess_pending_softirqs(); if ( spin_trylock(&payload_lock) ) return The effect is that we have just effectively taken the lock and returned without unlocking! CC: Ross Lagerwall CC: Boris Ostrovsky CC: Jan Beulich CC: Andrew Cooper CC: Julien Grall Signed-off

[Xen-devel] [PATCH LIVEPATCH-BUILD-TOOLS 1/2] Ignore .discard sections

2017-06-09 Thread Ross Lagerwall
Ignore differences in discard sections. They are not included in the final xen binary so there is no need to include them in the live patch. Signed-off-by: Ross Lagerwall --- create-diff-object.c | 8 1 file changed, 8 insertions(+) diff --git a/create-diff-object.c b/create-diff

[Xen-devel] [PATCH LIVEPATCH-BUILD-TOOLS 2/2] Remove section alignment requirement

2017-06-09 Thread Ross Lagerwall
Remove the requirement that section twins have the same alignment. The section alignment of the patched section is respected by the loader in Xen so it shouldn't matter if the original section alignment was different. Signed-off-by: Ross Lagerwall --- create-diff-object.c | 1 - 1 file ch

Re: [Xen-devel] xsa213 and live patching

2017-06-09 Thread Ross Lagerwall
s not needed. I had previously fixed this but hadn't yet sent out that patch. I've now sent this fix along with another to xen-devel. Regards, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH LIVEPATCH-BUILD-TOOLS 2/2] Remove section alignment requirement

2017-06-12 Thread Ross Lagerwall
On 06/09/2017 06:08 PM, Konrad Rzeszutek Wilk wrote: On Fri, Jun 09, 2017 at 06:00:35PM +0100, Andrew Cooper wrote: On 09/06/17 17:38, Konrad Rzeszutek Wilk wrote: On Fri, Jun 09, 2017 at 05:03:36PM +0100, Ross Lagerwall wrote: Remove the requirement that section twins have the same alignment

[Xen-devel] [PATCH] rombios/ata: Wait for BSY to clear after write

2017-06-13 Thread Ross Lagerwall
s are probably rarely used these days, but they are used by GRUB 2 to write to its environment file which happens by default on Ubuntu. Signed-off-by: Ross Lagerwall --- tools/firmware/rombios/rombios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware/rombios/rombio

[Xen-devel] [PATCH] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq

2017-08-21 Thread Ross Lagerwall
When the guest writes to the RTC, Xen emulates it and broadcasts a TIMEOFFSET ioreq. Emit an RTC_CHANGE QMP message when this happens rather than ignoring it so that something useful can be done with the information. Signed-off-by: Ross Lagerwall --- hw/i386/xen/xen-hvm.c | 2 ++ 1 file changed

Re: [Xen-devel] [PATCH] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq

2017-08-22 Thread Ross Lagerwall
On 08/21/2017 11:30 PM, Stefano Stabellini wrote: On Mon, 21 Aug 2017, Ross Lagerwall wrote: When the guest writes to the RTC, Xen emulates it and broadcasts a TIMEOFFSET ioreq. Emit an RTC_CHANGE QMP message when this happens rather than ignoring it so that something useful can be done with

[Xen-devel] [PATCH v2] xen: Emit RTC_CHANGE upon TIMEOFFSET ioreq

2017-08-23 Thread Ross Lagerwall
RTC. This patch by itself doesn't affect any of the toolstacks that I checked; the libxl toolstack doesn't currently handle this event nor does the XAPI toolstack. If nothing handles the event, it is simply ignored. We plan on modifying XAPI to handle it. Signed-off-by: Ross

Re: [Xen-devel] [PATCH v4 01/11] livepatch: Expand check for safe_for_reapply if livepatch has only .rodata.

2017-10-05 Thread Ross Lagerwall
lying after an revert" for details. Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Ross Lagerwall The patch looks OK, but what is the use case for a live patch with only .rodata? Regards, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lis

Re: [Xen-devel] [PATCH v4 03/11] livepatch: Include sizes when an mismatch occurs

2017-10-05 Thread Ross Lagerwall
ot; in the warning. Also fix one case where we would fail if the size of the .ex_table was being zero - but that is OK. Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Ross Lagerwall Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH v4 01/11] livepatch: Expand check for safe_for_reapply if livepatch has only .rodata.

2017-10-05 Thread Ross Lagerwall
On 10/05/2017 02:51 PM, Konrad Rzeszutek Wilk wrote: On Thu, Oct 05, 2017 at 02:47:30PM +0100, Ross Lagerwall wrote: On 09/20/2017 11:31 PM, Konrad Rzeszutek Wilk wrote: If the livepatch has only .rodata sections then it is OK to also apply/revert/apply the livepatch without having to worry

Re: [Xen-devel] [PATCH v4 07/11] livepatch/x86/arm[32, 64]: Force .livepatch.depends section to be uint32_t aligned.

2017-10-05 Thread Ross Lagerwall
titled: "livepatch/arm/x86: Rename note_depends symbol from test-cases." which fixes this. Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Ian Jackson Cc: Wei Liu Acked-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-06 Thread Ross Lagerwall
user_gid) < 0) { fprintf(stderr, "Failed to setuid(%d)\n", user_pwd->pw_uid); exit(1); } This last one should be user_uid, not user_gid. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-06 Thread Ross Lagerwall
ctory has to contain a valid /dev/null. This is a bit annoying and prevents the chroot being on a "nodev" mount. Regards, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 25/24] xl: Document VGA problems arising from lack of physmap dmop

2017-10-06 Thread Ross Lagerwall
dmop to fix this properly. For now, document the problem. Signed-off-by: Ian Jackson Reported-by: Ross Lagerwall CC: Ross Lagerwall CC: Wei Liu CC: Paul Durrant --- docs/man/xl.cfg.pod.5.in | 6 ++ 1 file changed, 6 insertions(+) diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man

Re: [Xen-devel] [PATCH 04/24] xentoolcore, _restrict_all: Introduce new library and implementation

2017-10-06 Thread Ross Lagerwall
with hardcoded rules fixes the problem (although presumably there's a better way): handlereg.o: $(AUTOINCS) handlereg.opic: $(AUTOINCS) -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v4 04/11] livepatch/arm[32, 64]: Don't load and crash on livepatches loaded with wrong text alignment.

2017-10-09 Thread Ross Lagerwall
hes? Is the latter check not needed for ARM64? -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-10 Thread Ross Lagerwall
On 10/06/2017 02:19 PM, Paul Durrant wrote: -Original Message- From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Ross Lagerwall Sent: 06 October 2017 13:58 To: Ian Jackson ; qemu-de...@nongnu.org Cc: Anthony Perard ; xen- de...@lists.xenproject.org; Stefano Stabellini

[Xen-devel] [PATCH for-4.10] xen: Fix XEN_DMOP_remote_shutdown return value

2017-10-11 Thread Ross Lagerwall
Return 0 to indicate success rather than whatever rc was previously set to (-EINVAL). Signed-off-by: Ross Lagerwall --- xen/arch/x86/hvm/dm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/hvm/dm.c b/xen/arch/x86/hvm/dm.c index 82addea..32ade95 100644 --- a/xen/arch/x86/hvm

Re: [Xen-devel] [PATCH 3/8] xen: defer call to xen_restrict until just before os_setup_post

2017-10-13 Thread Ross Lagerwall
s its new root has a /dev/null). -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH v1 1/2] tools/libs/evtchn: Add support for restricting a handle

2017-10-13 Thread Ross Lagerwall
Implement support for restricting evtchn handles to a particular domain on Linux by calling the IOCTL_EVTCHN_RESTRICT_DOMID ioctl (support added in Linux v4.8). Signed-off-by: Ross Lagerwall --- tools/include/xen-sys/Linux/evtchn.h | 15 +++ tools/libs/evtchn/Makefile

[Xen-devel] [PATCH v2 2/2] xentoolcore_restrict_all: Implement for libxenevtchn

2017-10-13 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- tools/Rules.mk| 2 +- tools/libs/evtchn/Makefile| 4 ++-- tools/libs/evtchn/core.c | 13 + tools/libs/evtchn/private.h | 3 +++ tools/libs/toolcore/include/xentoolcore.h

Re: [Xen-devel] [PATCH v1 1/2] tools/libs/evtchn: Add support for restricting a handle

2017-10-16 Thread Ross Lagerwall
On 10/16/2017 11:53 AM, Ian Jackson wrote: Ross Lagerwall writes ("[PATCH v1 1/2] tools/libs/evtchn: Add support for restricting a handle"): +/* + * Restrict this file descriptor so that it can only be used to bind + * new interdomain events from one domain. Can it be used to

Re: [Xen-devel] [PATCH v1 1/2] tools/libs/evtchn: Add support for restricting a handle

2017-10-16 Thread Ross Lagerwall
On 10/16/2017 12:29 PM, Ian Jackson wrote: Ross Lagerwall writes ("Re: [PATCH v1 1/2] tools/libs/evtchn: Add support for restricting a handle"): No. As far as I can see, it can only be used to bind new interdomain events, not other events. OK, good, thanks. This entire file (inc

Re: [Xen-devel] [PATCH v2 2/2] xentoolcore_restrict_all: Implement for libxenevtchn

2017-10-17 Thread Ross Lagerwall
On 10/16/2017 11:55 AM, Ian Jackson wrote: Ross Lagerwall writes ("[PATCH v2 2/2] xentoolcore_restrict_all: Implement for libxenevtchn"): Signed-off-by: Ross Lagerwall ... int osdep_evtchn_open(xenevtchn_handle *xce); diff --git a/tools/libs/toolcore/include/xentoolcore.h b/

Re: [Xen-devel] [PATCH 03/26] tools: libxendevicemodel: Provide xendevicemodel_shutdown

2017-10-17 Thread Ross Lagerwall
*/ Why did all the symbols get moved to VERS_1.1 rather than adding only the new one to VERS_1.1 and keeping the rest at VERS_1.0 (like has been done with libxenforeignmemory)? -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https

Re: [Xen-devel] [PATCH] tools: libxendevicemodel: Restore symbol versions for 1.0

2017-10-18 Thread Ross Lagerwall
map alone and added a new version which simply adds the new symbol. Fix this. Reported-by: Ross Lagerwall CC: Stefano Stabellini Signed-off-by: Ian Jackson --- Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen

[Xen-devel] [PATCH v2 for-4.10 1/2] tools/libs/evtchn: Add support for restricting a handle

2017-10-18 Thread Ross Lagerwall
Implement support for restricting evtchn handles to a particular domain on Linux by calling the IOCTL_EVTCHN_RESTRICT_DOMID ioctl (support added in Linux v4.8). Signed-off-by: Ross Lagerwall Acked-by: Ian Jackson Release-acked-by: Julien Grall --- No change since v1. tools/include/xen-sys

[Xen-devel] [PATCH v2 for-4.10 2/2] xentoolcore_restrict_all: Implement for libxenevtchn

2017-10-18 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- Changed in v2: * Keep warning about DoS and resource exhaustion being a possibility. (Note that v1 of this patch was incorrectly titled v2.) tools/Rules.mk| 2 +- tools/libs/evtchn/Makefile| 4 ++-- tools/libs

[Xen-devel] [PATCH v1 2/5] xen: Provide XEN_DMOP_add_to_physmap

2017-10-18 Thread Ross Lagerwall
Provide XEN_DMOP_add_to_physmap, a limited version of XENMEM_add_to_physmap to allow a deprivileged QEMU to move VRAM when a guest programs its BAR. It is equivalent to XENMEM_add_to_physmap with space == XENMAPSPACE_gmfn. Signed-off-by: Ross Lagerwall --- xen/arch/x86/hvm/dm.c | 17

[Xen-devel] [PATCH v1 3/5] xen: Provide XEN_DMOP_pin_memory_cacheattr

2017-10-18 Thread Ross Lagerwall
Provide XEN_DMOP_pin_memory_cacheattr to allow a deprivileged QEMU to pin the caching type of RAM after moving the VRAM. It is equivalent to XEN_DOMCTL_pin_memory_cacheattr. Signed-off-by: Ross Lagerwall --- xen/arch/x86/hvm/dm.c | 12 xen/include/public/hvm/dm_op.h | 14

[Xen-devel] [PATCH v1 5/5] tools: libxendevicemodel: Provide xendevicemodel_pin_memory_cacheattr

2017-10-18 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- tools/libs/devicemodel/core.c | 19 +++ tools/libs/devicemodel/include/xendevicemodel.h | 14 ++ tools/libs/devicemodel/libxendevicemodel.map| 1 + 3 files changed, 34 insertions(+) diff --git a/tools/libs

[Xen-devel] [PATCH v1 4/5] tools: libxendevicemodel: Provide xendevicemodel_add_to_physmap

2017-10-18 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- tools/libs/devicemodel/Makefile | 2 +- tools/libs/devicemodel/core.c | 17 + tools/libs/devicemodel/include/xendevicemodel.h | 13 + tools/libs/devicemodel/libxendevicemodel.map| 5 + 4

[Xen-devel] [PATCH v1 1/5] xen/mm: Make xenmem_add_to_physmap global

2017-10-18 Thread Ross Lagerwall
Make it global in preparation to be called by a new dmop. Signed-off-by: Ross Lagerwall --- xen/common/memory.c | 5 ++--- xen/include/xen/mm.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index ad987e0..c4f05c7 100644 --- a

[Xen-devel] [PATCH v1 0/5] Add dmops to allow use of VGA with restricted QEMU

2017-10-18 Thread Ross Lagerwall
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 make use of the new dmops. Ross Lagerwall (5): xen/mm: Make xenmem_add_to_physmap public xen: Provide

Re: [Xen-devel] [PATCH v1 2/5] xen: Provide XEN_DMOP_add_to_physmap

2017-10-20 Thread Ross Lagerwall
r. Based on your other comments, would it make sense to instead use XENMAPSPACE_gmfn_range and have the caller set the size? As it is currently, QEMU does only populate VRAM one page at a time (using xen_xc_domain_add_to_physmap) so it is already slow but it could be impro

[Xen-devel] [PATCH v2 3/5] xen: Provide XEN_DMOP_pin_memory_cacheattr

2017-10-23 Thread Ross Lagerwall
Provide XEN_DMOP_pin_memory_cacheattr to allow a deprivileged QEMU to pin the caching type of RAM after moving the VRAM. It is equivalent to XEN_DOMCTL_pin_memory_cacheattr. Signed-off-by: Ross Lagerwall --- Changed in v2: * Check pad is 0. xen/arch/x86/hvm/dm.c | 18

[Xen-devel] [PATCH v2 2/5] xen: Provide XEN_DMOP_add_to_physmap

2017-10-23 Thread Ross Lagerwall
Provide XEN_DMOP_add_to_physmap, a limited version of XENMEM_add_to_physmap to allow a deprivileged QEMU to move VRAM when a guest programs its BAR. It is equivalent to XENMEM_add_to_physmap with space == XENMAPSPACE_gmfn_range. Signed-off-by: Ross Lagerwall --- Changed in v2: * Make it operate

[Xen-devel] [PATCH v2 4/5] tools: libxendevicemodel: Provide xendevicemodel_add_to_physmap

2017-10-23 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- Changed in v2: * Make it operate on a range. tools/libs/devicemodel/Makefile | 2 +- tools/libs/devicemodel/core.c | 21 + tools/libs/devicemodel/include/xendevicemodel.h | 15 +++ tools/libs

[Xen-devel] [PATCH v2 5/5] tools: libxendevicemodel: Provide xendevicemodel_pin_memory_cacheattr

2017-10-23 Thread Ross Lagerwall
Signed-off-by: Ross Lagerwall --- Acked-by: Ian Jackson Reviewed-by: Paul Durrant --- tools/libs/devicemodel/core.c | 19 +++ tools/libs/devicemodel/include/xendevicemodel.h | 14 ++ tools/libs/devicemodel/libxendevicemodel.map| 1 + 3 files

[Xen-devel] [PATCH v2 1/5] xen/mm: Make xenmem_add_to_physmap global

2017-10-23 Thread Ross Lagerwall
Make it global in preparation to be called by a new dmop. Signed-off-by: Ross Lagerwall --- Reviewed-by: Paul Durrant --- xen/common/memory.c | 5 ++--- xen/include/xen/mm.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c

[Xen-devel] [PATCH v2 0/5] Add dmops to allow use of VGA with restricted QEMU

2017-10-23 Thread Ross Lagerwall
on a range. Ross Lagerwall (5): xen/mm: Make xenmem_add_to_physmap global xen: Provide XEN_DMOP_add_to_physmap xen: Provide XEN_DMOP_pin_memory_cacheattr tools: libxendevicemodel: Provide xendevicemodel_add_to_physmap tools: libxendevicemodel: Provide xendevicemodel_pin_memory_cach

Re: [Xen-devel] [PATCH v2 2/5] xen: Provide XEN_DMOP_add_to_physmap

2017-10-23 Thread Ross Lagerwall
above size rather than below (since IIRC we only need pad up to the next 4 byte boundary). Nope, the build fails unless I pad it to an 8 byte boundary. This is also why I added padding to struct xen_dm_op_pin_memory_cacheattr... -- Ross Lagerwall __

Re: [Xen-devel] [PATCH v1 4/5] tools: libxendevicemodel: Provide xendevicemodel_add_to_physmap

2017-10-27 Thread Ross Lagerwall
n a range. -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH for-4.10] libs/evtchn: Remove active handler on clean-up or failure

2017-11-13 Thread Ross Lagerwall
andle() _before_ calling osdep_evtchn_close() to avoid trying to restrict a closed fd or some other fd that happens to have the same number. I think all the other libs need to be fixed as well, unless there was a reason it was done this way. -- Ross Lagerwall

Re: [Xen-devel] [PATCH for-4.10] libs/evtchn: Remove active handler on clean-up or failure

2017-11-14 Thread Ross Lagerwall
On 11/14/2017 11:51 AM, Ian Jackson wrote: Ross Lagerwall writes ("Re: [PATCH for-4.10] libs/evtchn: Remove active handler on clean-up or failure"): On 11/10/2017 05:10 PM, Julien Grall wrote: Commit 89d55473ed16543044a31d1e0d4660cf5a3f49df "xentoolcore_restrict_all

Re: [Xen-devel] [PATCH] tools: xentoolcore_restrict_all: Do deregistration before close

2017-11-14 Thread Ross Lagerwall
close(h->watch_pipe[1]); } -close(h->fd); xentoolcore__deregister_active_handle(&h->tc_ah); +close(h->fd); Since the rest of this file uses tabs, you may as well use tabs for this line as well. Reviewed-by: Ross Lagerwall _

[Xen-devel] PVH VCPU hotplug support v7?

2017-07-31 Thread Ross Lagerwall
Gross Thanks, -- Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v6 05/12] x86/domctl: Handle ACPI access from domctl

2017-07-31 Thread Ross Lagerwall
#x27;m looking at this code... This doesn't work if access->width > sizeof(val) (4 bytes). The same value (access->address) is always passed into acpi_cpumap_access_common for 'port' and this is used as an offset into the avail_cpus array. So the offset is unchanged and only

Re: [Xen-devel] PVH VCPU hotplug support v7?

2017-07-31 Thread Ross Lagerwall
On 07/31/2017 03:29 PM, Boris Ostrovsky wrote: On 07/31/2017 10:12 AM, Andrew Cooper wrote: On 31/07/17 14:55, Boris Ostrovsky wrote: On 07/31/2017 09:20 AM, Ross Lagerwall wrote: Hi Boris, I've modified your PVH VCPU hotplug support v6 patch series [1] to support HVM guests running _wi

Re: [Xen-devel] [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-22 Thread Ross Lagerwall
. Additionally, perform a safety check on elf->sym[symndx].sym before derefencing it, to avoid tripping over a NULL pointer when calculating val. Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall ___ Xen-devel mailing list Xen-devel@lists.xen.

Re: [Xen-devel] [PATCH for-4.9 v3 2/3] xen/livepatch: Use zeroed memory allocations for arrays

2017-06-23 Thread Ross Lagerwall
On 06/22/2017 07:15 PM, Andrew Cooper wrote: Each of these arrays is sparse. Use zeroed allocations to cause uninitialised array elements to contain deterministic values, most importantly for the embedded pointers. Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall

Re: [Xen-devel] [PATCH for-4.9 v3 3/3] xen/livepatch: Don't crash on encountering STN_UNDEF relocations

2017-06-23 Thread Ross Lagerwall
. Additionally, fix an off-by-one error while range checking symndx, and perform a safety check on elf->sym[symndx].sym before derefencing it, to avoid tripping over a NULL pointer when calculating val. Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerw

  1   2   3   4   >