SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching with Xen LivePatch
Non disruptive patching of hypervisor
Ross Lagerwall
Citrix
Software Engineer
Konrad Rzeszutek Wilk
Oracle
Software Development Director
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Agenda:
•Non disruptive patching.
•Why would you want this?
•Other known patching techniques.
•Patching!
•Tiny details.
•Roadmap.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
What is this?
• Replacing compiled functions with new code.
• While hypervisor is running with guests.
constchar*xen_extra_version(void)
{
return XEN_EXTRAVERSION;
}
=>
constchar*xen_extra_version(void)
{
return “HelloWorld”;
}
push %rbp
mov %rsp,%rbp
lea 0x16698b(%rip),%rax
leaveq
retq
=>
push %rbp
mov %rsp,%rbp
lea 0x29333b(%rip),%rax
leaveq
retq
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Why binary patching? Why not migrate to another host?
• Local storage (SATA?),
• PCI pass-through (SR-IOV),
• NUMA locality,
• Giant guests (memory or CPU) and cannot fit on other hosts,
• Or system administrator simply does not want to reboot host:
– Can or want to only during scheduled maintaince windows.
• Patching is almost instantenous
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Known patching techniques.
• On Linux:
– kGraft (SuSE).
– kPatch(Red Hat).
– kSplice(Oracle).
– Linux live-patching(upstream) – common paths of kGraft + kPatch.
• On Xen:
– Xen Livepatch(Oracle, Citrix), with Amazon contributing to design.
• http://wiki.xenproject.org/wiki/LivePatch
• http://xenbits.xen.org/docs/unstable/misc/livepatch.html
– Amazon’s internal hotpatching design:
• http://www.linuxplumbersconf.net/2014/ocw//system/presentations/2421/original/xen_hotpatchin
g-2014-10-16.pdf
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Non disruptive patching options.
Oracle Confidential –Internal/Restricted/Highly Restricted 6
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
And their functionality:
Level Name Function+ Data Patchingof data
structures
Inline
patching
Userspace kSplice userpace
(glibc,openssl)
  
Kernel
Linuxhot patching 
kGraft(SuSE) 
kPatch(RedHat)  [via hooks]
kSplice   
Hypervisor Xen livepatch  [via hooks,
hopefully in Xen 4.8]
Oracle Confidential –Internal/Restricted/Highly Restricted 7
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching!
• At first blush this sounds like binary translation – we convert old code to
new code:
• XSA-132 “domctl/sysctl:
don’t leak hypervisor stack
to toolstack” – change inside arch_do_domctl.
• But nobody can translate the code for us. We NEED to change the code in
memory while the hypervisor is executing.
mov %rsp,%rax
and $0xffffffffffff8000,%rax
movq $0x0,-0x48(%rbp)
movq $0x0,-0x40(%rbp)
movq $0x0,-0x38(%rbp)
mov %rsp,%rax
and $0xffffffffffff8000,%rax
Extra 18 bytes
of code.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching: inserting new code.
• But adding in code means moving other code as well:
arch_do_domctl:
55 48 89 E5 48 89 FB 90
89 05 A4 9C 1E 00 8B 13
48 8D 05 83 71 12 00 8B
14 90 48 B8 00 00 00 80
D0 82 FF FF 48 8D 04 02
49 89 06 8B 03 83 C0 01
89 03 89 C0 48 89 05 7F
9C 1E 00 48 8D 3D D0 12
17 00 E8 E3 EC FF FF B8
48 89 E0 48 25 00 80 FF
FF 00 00 00 48 8B 1C 24
4C 8B 64 24 08 4C 8B 6C
24 10 4C 8B 74 24 18 C9
do_domctl:
55 48 89 E5 48 81 EC 70
01 00 00 48 89 5D D8 4C
…
55 48 89 E5 48 89 FB 90
89 05 A4 9C 1E 00 8B 13
48 8D 05 83 71 12 00 8B
14 90 48 B8 00 00 00 80
D0 82 FF FF 48 8D 04 02
49 89 06 8B 03 83 C0 01
89 03 89 C0 48 89 05 7F
9C 1E 00 48 8D 3D D0 12
17 00 E8 E3 EC FF FF B8
48 C7 45 B8 00 00 00 00
48 C7 45 C0 00 00 00 00
48 C7 45 C8 00 00 00 00
48 89 E0 48 25 00 80 FF
FF 00 00 00 48 8B 1C 24
4C 8B 64 24 08 4C 8B 6C
24 10 4C 8B 74 24 18 C9
C3 90 90 90 90 90 90 90
90 90 55 48 89 E5 48 81
• Otherwise we end up
executing nonsense code
at old location!
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching: Jumping
• We could add padding in all the functions to deal with this. But what if the
amount of changes is greater than the padding?
• Jump!
– Allocate new memory.
– Copy new code in memory.
– Check that nobody is running old code.
– Compute offset from old code to new code.
– Add trampoline jump to new code.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching: 1) Allocate + copy new code in
• New arch_do_domctl code at newly allocated memory space:
<arch_do_domctl>:
55 push %rbp
48 89 e5 mov %rsp,%rbp
41 57 push %r15
…
48 c7 45 b8 00 00 00 00 movq $0x0,-0x48(%rbp)
48 c7 45 c0 00 00 00 00 movq $0x0,-0x40(%rbp)
48 c7 45 c8 00 00 00 00 movq $0x0,-0x38(%rbp)
48 89 e0 mov %rsp,%rax
48 25 00 80 ff ff and $0xffffffffffff8000,%rax
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching: 2) Check code 3) Compute offset
<arch_do_domctl>:
55 push %rbp
48 89 e5 mov %rsp,%rbp
41 57 push %r15
…
48 c7 45 b8 00 00 00 00 movq $0x0,-0x48(%rbp)
48 c7 45 c0 00 00 00 00 movq $0x0,-0x40(%rbp)
48 c7 45 c8 00 00 00 00 movq $0x0,-0x38(%rbp)
48 89 e0 mov %rsp,%rax
48 25 00 80 ff ff and $0xffffffffffff8000,%rax
<arch_do_domctl>:
55 push %rbp
48 89 e5 mov %rsp,%rbp
41 57 push %r15
…
48 89 e0 mov %rsp,%rax
48 25 00 80 ff ff and $0xffffffffffff8000,%rax
• Check that arch_do_domctl is not being executed.
• Figure out offset from new to old code.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching: 4) Add trampoline
• Add trampoline:
13
<arch_do_domctl>:
55 push %rbp
48 89 e5 mov %rsp,%rbp
41 57 push %r15
…
48 c7 45 b8 00 00 00 00 movq $0x0,-0x48(%rbp)
48 c7 45 c0 00 00 00 00 movq $0x0,-0x40(%rbp)
48 c7 45 c8 00 00 00 00 movq $0x0,-0x38(%rbp)
48 89 e0 mov %rsp,%rax
48 25 00 80 ff ff and $0xffffffffffff8000,%rax
<arch_do_domctl>:
E9 1A 97 EA FF jmpq <arch_do_domctl>[NEW]
…
48 89 e0 mov %rsp,%rax
48 25 00 80 ff ff and $0xffffffffffff8000,%rax
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Patching: Conclusion
• For code just need to over-write start of function with:
• For data it can be inline replacement (changing in .data values):
…
E9 1A 97 EA FF jmpq <arch_do_domctl>[NEW] …
<opt_noreboot>:
00 00
...
<opt_noreboot>:
00 01
...
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
That was easy, what is the fuss about?
• Relocation of symbols – data or functions:
Need to compute new code/data the offsets to other functions, data
structures, etc.
– Xen hyprvisor now has an ELF final dynamic linker to resolve this.
• Correctness: Is the old code the same as what the hot-patch had been
based on? Using an build-id(unique value) generated by compiler.
– The tools to generate payloads need to embed the correct build-id
– Allows also to stack payloads on top of each other (with each having an unique build-
id and depending on prior payload’s build-id):
…
8b 0d 53 80 fb ff mov -0x47fad(%rip),%ecx # ffff82d0802848c0 <pfn_pdx_hole_shift>
…
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Payloads dependencies – and how build-id are used for
that.
• Hypervisor build-id (0x17ac1..)
– Payload test1 (build-id: 0x8ef93.., depends on 0x17ac1..)
• Payload test2 (build-id: b409fb.., depends on 0x8ef93..)
–And so on.
–Can apply payloads on top of each other.
–Can also replace the chain of them with a new one:
–Hypervisor build-id(0x17ac1..)
• Payloadtest1 (build-id: 0x8ef93..,depends on 0x17ac1..)
–…
• Payloadreplace (build-id: 0x99432..,depends on 0x17ac1..)
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
How do guarantee we don’t patch code which may be in
this (or another) CPU cache/stack?
• Stack checking: Cannot patch the function which is in use by another CPU!
– We patch when the hypervisor has no stack – at deterministic point.
• A two stage rendezvous mechanism:
– Schedule_worksets per_cpu(work_to_do) and global do_work.
– Whoever gets first to check_for_livepatach_workis master, all others are sub-
ordinates.check_for_livepatch_workcalled in VMEXIT handlers and idle_loop loop.
• Master IPIs all other CPUs to call function which sets per_cpu(work_to_do)
• Slave CPUs IPI handler is called. It sets per_cpu(work_to_do), and right before entering to the guest
calls check_for_livepatch_work. Spins waiting until ->ready is set.
• Master spins until all CPUs have incremented a atomic counter (aka – all subordinates are waiting on
->ready). Sets ->ready=1.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Hypervisor patching code
• Master signals to sub-ordinates to disable IRQs (we don’t want IRQ
handlers to run as we may be patching them).
– Sub-ordinatesdisable IRQs, and spin waiting on patching (->do_work) to be complete.
• Master disables IRQs, disables Write Protection on read-only memory and
patches code, re-enables Write Protection.
• Master enables IRQs, clears ->do_work.
• Sub-ordinates stop spinning, flush their pipeline, and restore IRQs.
• Master prints that it has finished patching.
• Same mechanism for revert and replace - only what’s written into the
trampoline differs.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Tool side functionality:
• Query what payloads have been loaded and their status (checked, applied).
• Upload new payloads.
• Apply, revert or replace payloads.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Roadmap – Further work in hypervisor:
• /proc/xen/xensyms needs symbols introduced by payloads
• Signature verification code.
• NMI and MCE handling when patching
• OSSTest
• ARM64 support
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Roadmap – Further work in tools:
• Sensibly patching assembly code (probably requires HV changes too)
• Ensure that .config is unchanged between the original build and the
patched build
• General livepatch-build improvements to increase the success rate to patch
anything close to 100%.
• Merge xen-livepatch tool into xl.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Questions and Answer
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Backup slides
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Signature verification:
• The signature is to be appended at the end of the ELF payload prefixed with
the string: ~Module signature appended~n
• Signature header afterwards matches Linux’s one.
Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
Screenshot of xen-livepatch
Building live patches
Live patches are binary les containing code to be loaded by
the hypervisor — like kernel modules.
How are these created?
Enter livepatch-build-tools!
livepatch-build-tools is based on kpatch-build
http://xenbits.xen.org/gitweb/?p=livepatch-build-tools.git
Building live patches: Inputs
$ livepatch­build ­s xen ­c orig.config 
    ­­depends 55776af8c7377e7191d733797543b87a59631c50 
    ­p xsa182.patch ­o outdir
Takes as input:
The exact source tree from the running Xen.
The .con g from the original build of Xen.
A build-id onto which the livepatch will be applied.
A source patch.
Building live patches: Process
livepatch-build does:
1. Build Xen
2. Apply Patch
3. Build Xen with "-ffunction-sections -fdata-sections"
4. Unapply patch
5. Build Xen again with "-ffunction-sections -fdata-sections"
6. Create a livepatch from the changed object les.
For each pair of changed objects, ‘original’ and ‘patched’, run
:
Building live patches: Diff
create‐diff‐tool
Load objects and check that the headers match.
Adjust the ELFs to make them easier to process:
Replace section symbols with function/object symbols
Rename mangled symbols: .isra. .part.
.constprop.
map_domain_page.isra.9 ➡ map_domain_page.isra.2
Building live patches: Diff
Correlate sections: for each section in ‘original’, nd its twin
in ‘patched’.
Correlate symbols: for each symbol in ‘original’, nd its twin
in ‘patched’.
Correlate static locals: match randomly named static local
variables from ‘original’ to ‘patched’.
Static locals are correlated if they have the same base
name and are referenced by a pair of correlated
sections.
avail_static.16247 ➡ avail_static.24561
Building live patches: Diff
Compare and mark as SAME, CHANGED or NEW.
For each CHANGED function or NEW global, include it and
its references recursively.
Handle special sections (bug frames, altinstructions,
exception tables).
Building live patches: Diff
Rename local symbols to match the format used by Xen
( lename#symbolname).
For each CHANGED function, create an entry in a special
livepatch section (.livepatch.funcs).
Write out the new object le.
Building live patches: Link
Link all the diff object les into a single ELF le, adding:
A dependency section containing the target build id,
and a new build id for the object le.
This object le gets uploaded to the hypervisor.
Pitfalls when building live patches: Assembly
There are some XSAs which patch assembly, for example
XSA-183. It is not currently possible to generate a livepatch
using livepatch-build.
Have less assembly (yay!).
Rewrite assembly into self-contained functional units (aka
assembler functions) with entries in the symbol table.
Inline patching of assembly (when possible).
Pitfalls when building live patches: Data
New data and read-only data is handled correctly.
Changing initialized data or existing data structures is hard
so such changes are prevented.
Use hook functions to allow code to be executed at various
stages during the patch apply (or revert) process.
Allows data to be transformed during patch apply, even
if the data is dynamically allocated
Allows once-off initializations.
Use shadow variables to attach new members to existing
data structures.
Hopefully in Xen 4.8.
Pitfalls when building live patches: Visibility
Changing the type or visibility of a symbol is not allowed.
Issue when building a patch for XSA-58.
put_old_guest_table goes from local symbol to a global
symbol.
Rename the function (e.g. lp_put_old_guest_table)
then replace all references to the old name with the new
name.
This isn't ideal because it means potentially many functions
need to be changed unnecessarily, but it is the current
solution.
Pitfalls when building live patches: __init
Tool prevents changes to __init — doesn't make sense
anyway.
Use a hook function to make the equivalent change during
patch load.
Need to verify per-patch that it is actually safe since to do
this ➡ otherwise reboot!
Pitfalls when building live patches:
__LINE__
__LINE__ causes many functions to be CHANGED and
included in the ouput.
Not necessarily a problem since the size is small, but it is
harder to analyze.
dprintk uses __LINE__ — not in release build
Patches coming to reduce uses of __LINE__ to zero for a
release build.
Pitfalls when building live patches: leaks
Even if the patch is trivial to build and apply, it is not
necessarily correct — XSA-100
Freed pages aren't scrubbed after live patch is applied.
Schedule an asynchronous scrub of the free heap
Scrub before handing pages to the guest.
Do not blindly trust the tools with the output they
generate.
Demo!

Contenu connexe

Tendances

XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...The Linux Foundation
 
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...The Linux Foundation
 
KVM Tuning @ eBay
KVM Tuning @ eBayKVM Tuning @ eBay
KVM Tuning @ eBayXu Jiang
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOpenStack Foundation
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...The Linux Foundation
 
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, CitrixXPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, CitrixThe Linux Foundation
 
Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVMPradeep Kumar
 
Disk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVMDisk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVMnknytk
 
XPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems Inc
XPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems IncXPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems Inc
XPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems IncThe Linux Foundation
 
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...The Linux Foundation
 
Performance: Observe and Tune
Performance: Observe and TunePerformance: Observe and Tune
Performance: Observe and TunePaul V. Novarese
 
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelXPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelThe Linux Foundation
 
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleXPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleThe Linux Foundation
 
Ceph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephCeph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephDanielle Womboldt
 
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NECXPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NECThe Linux Foundation
 
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015: Speed up your kernel development cycle with QEMUKernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015: Speed up your kernel development cycle with QEMUAnne Nicolas
 
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
XPDS16:  CPUID handling for guests - Andrew Cooper, CitrixXPDS16:  CPUID handling for guests - Andrew Cooper, Citrix
XPDS16: CPUID handling for guests - Andrew Cooper, CitrixThe Linux Foundation
 

Tendances (20)

XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
 
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embe...
 
KVM Tuning @ eBay
KVM Tuning @ eBayKVM Tuning @ eBay
KVM Tuning @ eBay
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
 
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, CitrixXPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
XPDS14 - Scaling Xen's Aggregate Storage Performance - Felipe Franciosi, Citrix
 
Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVM
 
Disk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVMDisk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVM
 
XPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems Inc
XPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems IncXPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems Inc
XPDS16: Windows PV Network Performance - Paul Durrant, Citrix Systems Inc
 
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
XPDS14: Removing the Xen Linux Upstream Delta of Various Linux Distros - Luis...
 
Performance: Observe and Tune
Performance: Observe and TunePerformance: Observe and Tune
Performance: Observe and Tune
 
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelXPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
 
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, OracleXPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
XPDS14: Xen 4.5 Roadmap - Konrad Wilk, Oracle
 
Quickly Debug VM Failures in OpenStack
Quickly Debug VM Failures in OpenStackQuickly Debug VM Failures in OpenStack
Quickly Debug VM Failures in OpenStack
 
kdump: usage and_internals
kdump: usage and_internalskdump: usage and_internals
kdump: usage and_internals
 
Ceph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephCeph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for Ceph
 
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NECXPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
XPDS14 - Towards Massive Server Consolidation - Filipe Manco, NEC
 
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015: Speed up your kernel development cycle with QEMUKernel Recipes 2015: Speed up your kernel development cycle with QEMU
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
 
Obstacles & Solutions for Livepatch Support on ARM64 Architecture
Obstacles & Solutions for Livepatch Support on ARM64 ArchitectureObstacles & Solutions for Livepatch Support on ARM64 Architecture
Obstacles & Solutions for Livepatch Support on ARM64 Architecture
 
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
XPDS16:  CPUID handling for guests - Andrew Cooper, CitrixXPDS16:  CPUID handling for guests - Andrew Cooper, Citrix
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
 

Similaire à XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Oracle & Ross Lagerwell, Citrix

HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...Yuji Kubota
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Wim Godden
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Pluginsamiable_indian
 
08 - Return Oriented Programming, the chosen one
08 - Return Oriented Programming, the chosen one08 - Return Oriented Programming, the chosen one
08 - Return Oriented Programming, the chosen oneAlexandre Moneger
 
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangPractical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangLyon Yang
 
Power of linked list
Power of linked listPower of linked list
Power of linked listPeter Hlavaty
 
BlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilitiesBlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilitiesBlueHat Security Conference
 
Tajo_Meetup_20141120
Tajo_Meetup_20141120Tajo_Meetup_20141120
Tajo_Meetup_20141120Hyoungjun Kim
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...Anne Nicolas
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingDive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingSaumil Shah
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?Sameh El-Ashry
 
Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28
Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28
Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28Amazon Web Services
 
“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the Core“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the CoreC4Media
 
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech TalksThe Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech TalksAmazon Web Services
 
OSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015: Linux Performance Profiling and Monitoring by Werner FischerOSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015: Linux Performance Profiling and Monitoring by Werner FischerNETWAYS
 
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner FischerOSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner FischerNETWAYS
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractionsAkshar Desai
 

Similaire à XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Oracle & Ross Lagerwell, Citrix (20)

HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
 
08 - Return Oriented Programming, the chosen one
08 - Return Oriented Programming, the chosen one08 - Return Oriented Programming, the chosen one
08 - Return Oriented Programming, the chosen one
 
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangPractical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
 
Power of linked list
Power of linked listPower of linked list
Power of linked list
 
BlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilitiesBlueHat v18 || A mitigation for kernel toctou vulnerabilities
BlueHat v18 || A mitigation for kernel toctou vulnerabilities
 
Verifikation - Metoder og Libraries
Verifikation - Metoder og LibrariesVerifikation - Metoder og Libraries
Verifikation - Metoder og Libraries
 
Tajo_Meetup_20141120
Tajo_Meetup_20141120Tajo_Meetup_20141120
Tajo_Meetup_20141120
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
Kernel Recipes 2018 - Mitigating Spectre and Meltdown (and L1TF) - David Wood...
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingDive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented Programming
 
How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?How to create SystemVerilog verification environment?
How to create SystemVerilog verification environment?
 
Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28
Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28
Amazon EC2 deepdive and a sprinkel of AWS Compute | AWS Floor28
 
“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the Core“Quantum” Performance Effects: beyond the Core
“Quantum” Performance Effects: beyond the Core
 
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech TalksThe Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
The Nitro Project: Next-Generation EC2 Infrastructure - AWS Online Tech Talks
 
OSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015: Linux Performance Profiling and Monitoring by Werner FischerOSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
 
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner FischerOSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
 
HPC Examples
HPC ExamplesHPC Examples
HPC Examples
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractions
 

Plus de The Linux Foundation

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleThe Linux Foundation
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...The Linux Foundation
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...The Linux Foundation
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...The Linux Foundation
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather ReportThe Linux Foundation
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...The Linux Foundation
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxThe Linux Foundation
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...The Linux Foundation
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderThe Linux Foundation
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...The Linux Foundation
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...The Linux Foundation
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixThe Linux Foundation
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdThe Linux Foundation
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...The Linux Foundation
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DThe Linux Foundation
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsThe Linux Foundation
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...The Linux Foundation
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...The Linux Foundation
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...The Linux Foundation
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEThe Linux Foundation
 

Plus de The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 

Dernier

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Dernier (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Oracle & Ross Lagerwell, Citrix

  • 1. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching with Xen LivePatch Non disruptive patching of hypervisor Ross Lagerwall Citrix Software Engineer Konrad Rzeszutek Wilk Oracle Software Development Director
  • 2. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Agenda: •Non disruptive patching. •Why would you want this? •Other known patching techniques. •Patching! •Tiny details. •Roadmap.
  • 3. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | What is this? • Replacing compiled functions with new code. • While hypervisor is running with guests. constchar*xen_extra_version(void) { return XEN_EXTRAVERSION; } => constchar*xen_extra_version(void) { return “HelloWorld”; } push %rbp mov %rsp,%rbp lea 0x16698b(%rip),%rax leaveq retq => push %rbp mov %rsp,%rbp lea 0x29333b(%rip),%rax leaveq retq
  • 4. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Why binary patching? Why not migrate to another host? • Local storage (SATA?), • PCI pass-through (SR-IOV), • NUMA locality, • Giant guests (memory or CPU) and cannot fit on other hosts, • Or system administrator simply does not want to reboot host: – Can or want to only during scheduled maintaince windows. • Patching is almost instantenous
  • 5. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Known patching techniques. • On Linux: – kGraft (SuSE). – kPatch(Red Hat). – kSplice(Oracle). – Linux live-patching(upstream) – common paths of kGraft + kPatch. • On Xen: – Xen Livepatch(Oracle, Citrix), with Amazon contributing to design. • http://wiki.xenproject.org/wiki/LivePatch • http://xenbits.xen.org/docs/unstable/misc/livepatch.html – Amazon’s internal hotpatching design: • http://www.linuxplumbersconf.net/2014/ocw//system/presentations/2421/original/xen_hotpatchin g-2014-10-16.pdf
  • 6. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Non disruptive patching options. Oracle Confidential –Internal/Restricted/Highly Restricted 6
  • 7. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | And their functionality: Level Name Function+ Data Patchingof data structures Inline patching Userspace kSplice userpace (glibc,openssl)    Kernel Linuxhot patching  kGraft(SuSE)  kPatch(RedHat)  [via hooks] kSplice    Hypervisor Xen livepatch  [via hooks, hopefully in Xen 4.8] Oracle Confidential –Internal/Restricted/Highly Restricted 7
  • 8. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching! • At first blush this sounds like binary translation – we convert old code to new code: • XSA-132 “domctl/sysctl: don’t leak hypervisor stack to toolstack” – change inside arch_do_domctl. • But nobody can translate the code for us. We NEED to change the code in memory while the hypervisor is executing. mov %rsp,%rax and $0xffffffffffff8000,%rax movq $0x0,-0x48(%rbp) movq $0x0,-0x40(%rbp) movq $0x0,-0x38(%rbp) mov %rsp,%rax and $0xffffffffffff8000,%rax Extra 18 bytes of code.
  • 9. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching: inserting new code. • But adding in code means moving other code as well: arch_do_domctl: 55 48 89 E5 48 89 FB 90 89 05 A4 9C 1E 00 8B 13 48 8D 05 83 71 12 00 8B 14 90 48 B8 00 00 00 80 D0 82 FF FF 48 8D 04 02 49 89 06 8B 03 83 C0 01 89 03 89 C0 48 89 05 7F 9C 1E 00 48 8D 3D D0 12 17 00 E8 E3 EC FF FF B8 48 89 E0 48 25 00 80 FF FF 00 00 00 48 8B 1C 24 4C 8B 64 24 08 4C 8B 6C 24 10 4C 8B 74 24 18 C9 do_domctl: 55 48 89 E5 48 81 EC 70 01 00 00 48 89 5D D8 4C … 55 48 89 E5 48 89 FB 90 89 05 A4 9C 1E 00 8B 13 48 8D 05 83 71 12 00 8B 14 90 48 B8 00 00 00 80 D0 82 FF FF 48 8D 04 02 49 89 06 8B 03 83 C0 01 89 03 89 C0 48 89 05 7F 9C 1E 00 48 8D 3D D0 12 17 00 E8 E3 EC FF FF B8 48 C7 45 B8 00 00 00 00 48 C7 45 C0 00 00 00 00 48 C7 45 C8 00 00 00 00 48 89 E0 48 25 00 80 FF FF 00 00 00 48 8B 1C 24 4C 8B 64 24 08 4C 8B 6C 24 10 4C 8B 74 24 18 C9 C3 90 90 90 90 90 90 90 90 90 55 48 89 E5 48 81 • Otherwise we end up executing nonsense code at old location!
  • 10. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching: Jumping • We could add padding in all the functions to deal with this. But what if the amount of changes is greater than the padding? • Jump! – Allocate new memory. – Copy new code in memory. – Check that nobody is running old code. – Compute offset from old code to new code. – Add trampoline jump to new code.
  • 11. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching: 1) Allocate + copy new code in • New arch_do_domctl code at newly allocated memory space: <arch_do_domctl>: 55 push %rbp 48 89 e5 mov %rsp,%rbp 41 57 push %r15 … 48 c7 45 b8 00 00 00 00 movq $0x0,-0x48(%rbp) 48 c7 45 c0 00 00 00 00 movq $0x0,-0x40(%rbp) 48 c7 45 c8 00 00 00 00 movq $0x0,-0x38(%rbp) 48 89 e0 mov %rsp,%rax 48 25 00 80 ff ff and $0xffffffffffff8000,%rax
  • 12. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching: 2) Check code 3) Compute offset <arch_do_domctl>: 55 push %rbp 48 89 e5 mov %rsp,%rbp 41 57 push %r15 … 48 c7 45 b8 00 00 00 00 movq $0x0,-0x48(%rbp) 48 c7 45 c0 00 00 00 00 movq $0x0,-0x40(%rbp) 48 c7 45 c8 00 00 00 00 movq $0x0,-0x38(%rbp) 48 89 e0 mov %rsp,%rax 48 25 00 80 ff ff and $0xffffffffffff8000,%rax <arch_do_domctl>: 55 push %rbp 48 89 e5 mov %rsp,%rbp 41 57 push %r15 … 48 89 e0 mov %rsp,%rax 48 25 00 80 ff ff and $0xffffffffffff8000,%rax • Check that arch_do_domctl is not being executed. • Figure out offset from new to old code.
  • 13. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching: 4) Add trampoline • Add trampoline: 13 <arch_do_domctl>: 55 push %rbp 48 89 e5 mov %rsp,%rbp 41 57 push %r15 … 48 c7 45 b8 00 00 00 00 movq $0x0,-0x48(%rbp) 48 c7 45 c0 00 00 00 00 movq $0x0,-0x40(%rbp) 48 c7 45 c8 00 00 00 00 movq $0x0,-0x38(%rbp) 48 89 e0 mov %rsp,%rax 48 25 00 80 ff ff and $0xffffffffffff8000,%rax <arch_do_domctl>: E9 1A 97 EA FF jmpq <arch_do_domctl>[NEW] … 48 89 e0 mov %rsp,%rax 48 25 00 80 ff ff and $0xffffffffffff8000,%rax
  • 14. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Patching: Conclusion • For code just need to over-write start of function with: • For data it can be inline replacement (changing in .data values): … E9 1A 97 EA FF jmpq <arch_do_domctl>[NEW] … <opt_noreboot>: 00 00 ... <opt_noreboot>: 00 01 ...
  • 15. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | That was easy, what is the fuss about? • Relocation of symbols – data or functions: Need to compute new code/data the offsets to other functions, data structures, etc. – Xen hyprvisor now has an ELF final dynamic linker to resolve this. • Correctness: Is the old code the same as what the hot-patch had been based on? Using an build-id(unique value) generated by compiler. – The tools to generate payloads need to embed the correct build-id – Allows also to stack payloads on top of each other (with each having an unique build- id and depending on prior payload’s build-id): … 8b 0d 53 80 fb ff mov -0x47fad(%rip),%ecx # ffff82d0802848c0 <pfn_pdx_hole_shift> …
  • 16. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Payloads dependencies – and how build-id are used for that. • Hypervisor build-id (0x17ac1..) – Payload test1 (build-id: 0x8ef93.., depends on 0x17ac1..) • Payload test2 (build-id: b409fb.., depends on 0x8ef93..) –And so on. –Can apply payloads on top of each other. –Can also replace the chain of them with a new one: –Hypervisor build-id(0x17ac1..) • Payloadtest1 (build-id: 0x8ef93..,depends on 0x17ac1..) –… • Payloadreplace (build-id: 0x99432..,depends on 0x17ac1..)
  • 17. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | How do guarantee we don’t patch code which may be in this (or another) CPU cache/stack? • Stack checking: Cannot patch the function which is in use by another CPU! – We patch when the hypervisor has no stack – at deterministic point. • A two stage rendezvous mechanism: – Schedule_worksets per_cpu(work_to_do) and global do_work. – Whoever gets first to check_for_livepatach_workis master, all others are sub- ordinates.check_for_livepatch_workcalled in VMEXIT handlers and idle_loop loop. • Master IPIs all other CPUs to call function which sets per_cpu(work_to_do) • Slave CPUs IPI handler is called. It sets per_cpu(work_to_do), and right before entering to the guest calls check_for_livepatch_work. Spins waiting until ->ready is set. • Master spins until all CPUs have incremented a atomic counter (aka – all subordinates are waiting on ->ready). Sets ->ready=1.
  • 18. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Hypervisor patching code • Master signals to sub-ordinates to disable IRQs (we don’t want IRQ handlers to run as we may be patching them). – Sub-ordinatesdisable IRQs, and spin waiting on patching (->do_work) to be complete. • Master disables IRQs, disables Write Protection on read-only memory and patches code, re-enables Write Protection. • Master enables IRQs, clears ->do_work. • Sub-ordinates stop spinning, flush their pipeline, and restore IRQs. • Master prints that it has finished patching. • Same mechanism for revert and replace - only what’s written into the trampoline differs.
  • 19. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. |
  • 20. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Tool side functionality: • Query what payloads have been loaded and their status (checked, applied). • Upload new payloads. • Apply, revert or replace payloads.
  • 21. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Roadmap – Further work in hypervisor: • /proc/xen/xensyms needs symbols introduced by payloads • Signature verification code. • NMI and MCE handling when patching • OSSTest • ARM64 support
  • 22. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Roadmap – Further work in tools: • Sensibly patching assembly code (probably requires HV changes too) • Ensure that .config is unchanged between the original build and the patched build • General livepatch-build improvements to increase the success rate to patch anything close to 100%. • Merge xen-livepatch tool into xl.
  • 23. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Questions and Answer
  • 24. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Backup slides
  • 25. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Signature verification: • The signature is to be appended at the end of the ELF payload prefixed with the string: ~Module signature appended~n • Signature header afterwards matches Linux’s one.
  • 26. Copyright © 2015, Oracleand/orits affiliates. Allrights reserved. | Screenshot of xen-livepatch
  • 27. Building live patches Live patches are binary les containing code to be loaded by the hypervisor — like kernel modules. How are these created? Enter livepatch-build-tools! livepatch-build-tools is based on kpatch-build http://xenbits.xen.org/gitweb/?p=livepatch-build-tools.git
  • 28. Building live patches: Inputs $ livepatch­build ­s xen ­c orig.config      ­­depends 55776af8c7377e7191d733797543b87a59631c50      ­p xsa182.patch ­o outdir Takes as input: The exact source tree from the running Xen. The .con g from the original build of Xen. A build-id onto which the livepatch will be applied. A source patch.
  • 29. Building live patches: Process livepatch-build does: 1. Build Xen 2. Apply Patch 3. Build Xen with "-ffunction-sections -fdata-sections" 4. Unapply patch 5. Build Xen again with "-ffunction-sections -fdata-sections" 6. Create a livepatch from the changed object les.
  • 30. For each pair of changed objects, ‘original’ and ‘patched’, run : Building live patches: Diff create‐diff‐tool Load objects and check that the headers match. Adjust the ELFs to make them easier to process: Replace section symbols with function/object symbols Rename mangled symbols: .isra. .part. .constprop. map_domain_page.isra.9 ➡ map_domain_page.isra.2
  • 31. Building live patches: Diff Correlate sections: for each section in ‘original’, nd its twin in ‘patched’. Correlate symbols: for each symbol in ‘original’, nd its twin in ‘patched’. Correlate static locals: match randomly named static local variables from ‘original’ to ‘patched’. Static locals are correlated if they have the same base name and are referenced by a pair of correlated sections. avail_static.16247 ➡ avail_static.24561
  • 32. Building live patches: Diff Compare and mark as SAME, CHANGED or NEW. For each CHANGED function or NEW global, include it and its references recursively. Handle special sections (bug frames, altinstructions, exception tables).
  • 33. Building live patches: Diff Rename local symbols to match the format used by Xen ( lename#symbolname). For each CHANGED function, create an entry in a special livepatch section (.livepatch.funcs). Write out the new object le.
  • 34. Building live patches: Link Link all the diff object les into a single ELF le, adding: A dependency section containing the target build id, and a new build id for the object le. This object le gets uploaded to the hypervisor.
  • 35. Pitfalls when building live patches: Assembly There are some XSAs which patch assembly, for example XSA-183. It is not currently possible to generate a livepatch using livepatch-build. Have less assembly (yay!). Rewrite assembly into self-contained functional units (aka assembler functions) with entries in the symbol table. Inline patching of assembly (when possible).
  • 36. Pitfalls when building live patches: Data New data and read-only data is handled correctly. Changing initialized data or existing data structures is hard so such changes are prevented. Use hook functions to allow code to be executed at various stages during the patch apply (or revert) process. Allows data to be transformed during patch apply, even if the data is dynamically allocated Allows once-off initializations. Use shadow variables to attach new members to existing data structures. Hopefully in Xen 4.8.
  • 37. Pitfalls when building live patches: Visibility Changing the type or visibility of a symbol is not allowed. Issue when building a patch for XSA-58. put_old_guest_table goes from local symbol to a global symbol. Rename the function (e.g. lp_put_old_guest_table) then replace all references to the old name with the new name. This isn't ideal because it means potentially many functions need to be changed unnecessarily, but it is the current solution.
  • 38. Pitfalls when building live patches: __init Tool prevents changes to __init — doesn't make sense anyway. Use a hook function to make the equivalent change during patch load. Need to verify per-patch that it is actually safe since to do this ➡ otherwise reboot!
  • 39. Pitfalls when building live patches: __LINE__ __LINE__ causes many functions to be CHANGED and included in the ouput. Not necessarily a problem since the size is small, but it is harder to analyze. dprintk uses __LINE__ — not in release build Patches coming to reduce uses of __LINE__ to zero for a release build.
  • 40. Pitfalls when building live patches: leaks Even if the patch is trivial to build and apply, it is not necessarily correct — XSA-100 Freed pages aren't scrubbed after live patch is applied. Schedule an asynchronous scrub of the free heap Scrub before handing pages to the guest. Do not blindly trust the tools with the output they generate.
  • 41. Demo!