Files
xen/.gitignore
T
Pawel Wieczorkiewicz 8e24c88788 livepatch: Add support for inline asm livepatching expectations
This is the initial implementation of the expectations enhancement
to improve inline asm livepatching.

Expectations are designed as optional feature, since the main use of
them is planned for inline asm livepatching. The flag enabled allows
to control the expectation state.
Each expectation has data and len fields that describe the data
that is expected to be found at a given patching (old_addr) location.
The len must not exceed the data array size. The data array size
follows the size of the opaque array, since the opaque array holds
the original data and therefore must match what is specified in the
expectation (if enabled).

The payload structure is modified as each expectation structure is
part of the livepatch_func structure and hence extends the payload.

Each expectation is checked prior to the apply action (i.e. as late
as possible to check against the most current state of the code).

For the replace action a new payload's expectations are checked AFTER
all applied payloads are successfully reverted, but BEFORE new payload
is applied. That breaks the replace action's atomicity and in case of
an expectation check failure would leave a system with all payloads
reverted. That is obviously insecure. Use it with caution and act
upon replace errors!

Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Andra-Irina Paraschiv <andraprs@amazon.com>
Reviewed-by: Martin Pohlack <mpohlack@amazon.de>
Reviewed-by: Norbert Manthey <nmanthey@amazon.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
2019-12-13 14:45:32 +00:00

415 lines
10 KiB
Plaintext

.hg
.*.tmp
*.orig
*~
*.swp
*.o
*.d
*.d2
*.opic
*.a
*.so
*.so.[0-9]*
*.bin
*.bak
*.tmp
*.spot
*.spit
*.gcno
*.gcda
*.py[ocd]
TAGS
GTAGS
GRTAGS
GPATH
GSYMS
tags
cscope.files
cscope.in.out
cscope.out
cscope.po.out
.config
.vimrc
.vscode
dist
stubdom/*.tar.gz
autom4te.cache/
config.log
config.status
config.cache
config/Toplevel.mk
config/Paths.mk
build-*
dist/*
docs/tmp.*
docs/html/
docs/man/xl.cfg.5.pod
docs/man/xl.1.pod
docs/man1/
docs/man5/
docs/man7/
docs/man8/
docs/pdf/
docs/txt/
extras/mini-os*
install/*
stubdom/*-minios-config.mk
stubdom/autom4te.cache/
stubdom/binutils-*
stubdom/config.cache
stubdom/config.log
stubdom/config.status
stubdom/cross-root-*
stubdom/gcc-*
stubdom/gmp-*
stubdom/grub-*
stubdom/include
stubdom/ioemu
stubdom/ioemu/
stubdom/libs-*
stubdom/libxc-*
stubdom/libxencall-*
stubdom/libxenevtchn-*
stubdom/libxenforeignmemory-*
stubdom/libxengnttab-*
stubdom/libxentoolcore-*
stubdom/libxentoollog-*
stubdom/lwip-*
stubdom/lwip/
stubdom/mini-os-*
stubdom/mk-headers-*
stubdom/newlib-1.*
stubdom/newlib-x86*
stubdom/ocaml-*
stubdom/pciutils-*
stubdom/pkg-config/*
stubdom/polarssl-*
stubdom/stubdompath.sh
stubdom/tpm_emulator-*
stubdom/vtpm/vtpm_manager.h
stubdom/xenstore
stubdom/zlib-*
tools/*/build/lib*/*.py
tools/autom4te.cache/
tools/config.h
tools/config.log
tools/config.status
tools/config.cache
config/Tools.mk
config/Stubdom.mk
config/Docs.mk
tools/libs/toolcore/headers.chk
tools/libs/toolcore/xentoolcore.pc
tools/libs/toollog/headers.chk
tools/libs/toollog/xentoollog.pc
tools/libs/evtchn/headers.chk
tools/libs/evtchn/xenevtchn.pc
tools/libs/gnttab/headers.chk
tools/libs/gnttab/xengnttab.pc
tools/libs/call/headers.chk
tools/libs/call/xencall.pc
tools/libs/foreignmemory/headers.chk
tools/libs/foreignmemory/xenforeignmemory.pc
tools/libs/devicemodel/headers.chk
tools/libs/devicemodel/xendevicemodel.pc
tools/console/xenconsole
tools/console/xenconsoled
tools/console/client/_paths.h
tools/console/daemon/_paths.h
tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/*
tools/debugger/gdb/gdb-6.2.1/*
tools/debugger/gdb/gdb-6.2.1.tar.bz2
tools/debugger/gdbsx/gdbsx
tools/debugger/xenitp/xenitp
tools/firmware/*/biossums
tools/firmware/*.bin
tools/firmware/*.sym
tools/firmware/*bios/*bios*.txt
tools/firmware/etherboot/gpxe/*
tools/firmware/extboot/extboot.img
tools/firmware/extboot/signrom
tools/firmware/hvmloader/dsdt*
tools/firmware/hvmloader/hvmloader
tools/firmware/hvmloader/mk_dsdt
tools/firmware/hvmloader/roms.h
tools/firmware/hvmloader/roms.inc
tools/firmware/hvmloader/ssdt*
tools/firmware/rombios/BIOS-bochs-[^/]*
tools/firmware/rombios/_rombios[^/]*_.c
tools/firmware/rombios/rombios[^/]*.s
tools/firmware/rombios/32bit/32bitbios_flat.h
tools/firmware/vgabios/vbetables-gen
tools/firmware/vgabios/vbetables.h
tools/firmware/xen-dir/*.old
tools/firmware/xen-dir/linkfarm.stamp*
tools/firmware/xen-dir/xen-root
tools/firmware/xen-dir/xen-shim
tools/firmware/xen-dir/xen-shim-syms
tools/flask/utils/flask-getenforce
tools/flask/utils/flask-get-bool
tools/flask/utils/flask-loadpolicy
tools/flask/utils/flask-setenforce
tools/flask/utils/flask-set-bool
tools/flask/utils/flask-label-pci
tools/fuzz/libelf/afl-libelf-fuzzer
tools/fuzz/x86_instruction_emulator/asm
tools/fuzz/x86_instruction_emulator/afl-harness
tools/fuzz/x86_instruction_emulator/afl-harness-cov
tools/fuzz/x86_instruction_emulator/wrappers.c
tools/fuzz/x86_instruction_emulator/x86_emulate
tools/fuzz/x86_instruction_emulator/x86-emulate.[ch]
tools/helpers/_paths.h
tools/helpers/init-xenstore-domain
tools/helpers/xen-init-dom0
tools/hotplug/common/hotplugpath.sh
tools/hotplug/FreeBSD/rc.d/xencommons
tools/hotplug/FreeBSD/rc.d/xendriverdomain
tools/hotplug/Linux/init.d/sysconfig.xencommons
tools/hotplug/Linux/init.d/sysconfig.xendomains
tools/hotplug/Linux/init.d/xen-watchdog
tools/hotplug/Linux/init.d/xencommons
tools/hotplug/Linux/init.d/xendomains
tools/hotplug/Linux/init.d/xendriverdomain
tools/hotplug/Linux/launch-xenstore
tools/hotplug/Linux/systemd/*.conf
tools/hotplug/Linux/systemd/*.mount
tools/hotplug/Linux/systemd/*.socket
tools/hotplug/Linux/systemd/*.service
tools/hotplug/Linux/vif-setup
tools/hotplug/Linux/xen-backend.rules
tools/hotplug/Linux/xen-hotplug-common.sh
tools/hotplug/Linux/xendomains
tools/hotplug/NetBSD/rc.d/xencommons
tools/hotplug/NetBSD/rc.d/xendriverdomain
tools/include/acpi
tools/include/xen/*
tools/include/xen-xsm/*
tools/include/xen-foreign/*.(c|h|size)
tools/include/xen-foreign/checker
tools/libvchan/xenvchan.pc
tools/libxc/*.pc
tools/libxl/_libxl.api-for-check
tools/libxl/*.api-ok
tools/libxl/*.pc
tools/libxl/dsdt*
tools/libxl/libxlu_cfg_y.output
tools/libxl/mk_dsdt
tools/libxl/ssdt*
tools/libxl/testenum
tools/libxl/testenum.c
tools/libxl/tmp.*
tools/misc/cpuperf/cpuperf-perfcntr
tools/misc/cpuperf/cpuperf-xen
tools/misc/xc_shadow
tools/misc/xen_cpuperf
tools/misc/xen-cpuid
tools/misc/xen-detect
tools/misc/xen-diag
tools/misc/xen-tmem-list-parse
tools/misc/xen-livepatch
tools/misc/xenperf
tools/misc/xenpm
tools/misc/xen-hvmctx
tools/misc/xenlockprof
tools/misc/lowmemd
tools/misc/xencov
tools/pkg-config/*
tools/qemu-xen-build
tools/xentrace/xenalyze
tools/pygrub/build/*
tools/python/build/*
tools/security/secpol_tool
tools/security/xen/*
tools/security/xensec_tool
tools/tests/depriv/depriv-fd-checker
tools/tests/x86_emulator/*.bin
tools/tests/x86_emulator/*.tmp
tools/tests/x86_emulator/32/x86_emulate
tools/tests/x86_emulator/3dnow*.[ch]
tools/tests/x86_emulator/asm
tools/tests/x86_emulator/avx*.[ch]
tools/tests/x86_emulator/blowfish.h
tools/tests/x86_emulator/fma*.[ch]
tools/tests/x86_emulator/*sse*.[ch]
tools/tests/x86_emulator/test_x86_emulator
tools/tests/x86_emulator/x86_emulate
tools/tests/x86_emulator/xop*.[ch]
tools/tests/xen-access/xen-access
tools/tests/xenstore/xs-test
tools/tests/regression/installed/*
tools/tests/regression/build/*
tools/tests/regression/downloads/*
tools/tests/mem-sharing/memshrtool
tools/tests/mce-test/tools/xen-mceinj
tools/tests/vpci/list.h
tools/tests/vpci/vpci.[hc]
tools/tests/vpci/test_vpci
tools/xcutils/lsevtchn
tools/xcutils/readnotes
tools/xenbackendd/_paths.h
tools/xenbackendd/xenbackendd
tools/xenmon/xentrace_setmask
tools/xenmon/xenbaked
tools/xenpaging/xenpaging
tools/xenpmd/xenpmd
tools/xenstat/libxenstat/src/_paths.h
tools/xenstat/libxenstat/xenstat.pc
tools/xenstat/xentop/xentop
tools/xenstore/xenstore
tools/xenstore/xenstore-chmod
tools/xenstore/xenstore-exists
tools/xenstore/xenstore-list
tools/xenstore/xenstore-read
tools/xenstore/xenstore-rm
tools/xenstore/xenstore-write
tools/xenstore/xenstore-control
tools/xenstore/xenstore-ls
tools/xenstore/xenstored
tools/xenstore/xenstored_test
tools/xenstore/xenstore.pc
tools/xenstore/xs_tdb_dump
tools/xentrace/xentrace_setsize
tools/xentrace/tbctl
tools/xentrace/xenctx
tools/xentrace/xentrace
xen/.banner
xen/.config
xen/.config.old
xen/.xen.elf32
xen/System.map
xen/arch/x86/asm-macros.i
xen/arch/x86/boot/mkelf32
xen/arch/x86/boot/cmdline.S
xen/arch/x86/boot/reloc.S
xen/arch/x86/boot/*.bin
xen/arch/x86/boot/*.lnk
xen/arch/x86/efi.lds
xen/arch/x86/efi/check.efi
xen/arch/x86/efi/mkreloc
xen/arch/*/xen.lds
xen/arch/*/asm-offsets.s
xen/arch/*/efi/boot.c
xen/arch/*/efi/compat.c
xen/arch/*/efi/efi.h
xen/arch/*/efi/runtime.c
xen/include/headers*.chk
xen/include/asm
xen/include/asm-*/asm-offsets.h
xen/include/asm-x86/asm-macros.h
xen/include/compat/*
xen/include/config/
xen/include/generated/
xen/include/public/public
xen/include/xen/*.new
xen/include/xen/acm_policy.h
xen/include/xen/compile.h
xen/include/xen/lib/x86/cpuid-autogen.h
xen/test/livepatch/config.h
xen/test/livepatch/expect_config.h
xen/test/livepatch/*.livepatch
xen/tools/kconfig/.tmp_gtkcheck
xen/tools/kconfig/.tmp_qtcheck
xen/tools/symbols
xen/xsm/flask/include/av_perm_to_string.h
xen/xsm/flask/include/av_permissions.h
xen/xsm/flask/include/class_to_string.h
xen/xsm/flask/include/flask.h
xen/xsm/flask/include/initial_sid_to_string.h
xen/xsm/flask/policy.*
xen/xsm/flask/xenpolicy-*
tools/flask/policy/policy.conf
tools/flask/policy/xenpolicy-*
xen/xen
xen/xen-syms
xen/xen-syms.map
xen/xen.*
unmodified_drivers/linux-2.6/.tmp_versions
unmodified_drivers/linux-2.6/*.cmd
unmodified_drivers/linux-2.6/*.ko
unmodified_drivers/linux-2.6/*.mod.c
LibVNCServer*
tools/qemu-xen-dir-remote
tools/qemu-xen-dir
tools/qemu-xen-traditional-dir-remote
tools/qemu-xen-traditional-dir
tools/firmware/seabios-dir-remote
tools/firmware/seabios-dir
tools/firmware/ovmf-dir-remote
tools/firmware/ovmf-dir
tools/firmware/rombios/_rombios_.c
tools/firmware/rombios/rombios.s
tools/firmware/rombios/rombios.sym
tools/include/xen-foreign/checker.c
tools/include/xen-foreign/structs.pyc
tools/include/xen-foreign/x86_32.h
tools/include/xen-foreign/x86_64.h
tools/include/xen-foreign/arm32.h
tools/include/xen-foreign/arm64.h
.git
tools/misc/xen-hptool
tools/misc/xen-mfndump
tools/libs/toolcore/include/_*.h
tools/libxc/_*.[ch]
tools/libxl/_*.[ch]
tools/libxl/testidl
tools/libxl/testidl.c
tools/libxl/*.pyc
tools/libxl/libxl-save-helper
tools/libxl/test_timedereg
tools/libxl/test_fdderegrace
tools/firmware/etherboot/eb-roms.h
tools/firmware/etherboot/gpxe-git-snapshot.tar.gz
tools/misc/xenwatchdogd
tools/misc/xen-hvmcrash
tools/misc/xen-lowmemd
tools/libvchan/vchan-node[12]
tools/ocaml/*/.ocamldep.make
tools/ocaml/*/*.cm[ixao]
tools/ocaml/*/*.cmxa
tools/ocaml/*/*.annot
tools/ocaml/*/*/.ocamldep.make
tools/ocaml/*/*/*.cm[ixao]
tools/ocaml/*/*/*.cmxa
tools/ocaml/*/*/*.annot
tools/ocaml/*/*/META
tools/ocaml/libs/xl/_libxl_types.inc
tools/ocaml/libs/xl/_libxl_types.ml.in
tools/ocaml/libs/xl/_libxl_types.mli.in
tools/ocaml/libs/xl/xenlight.ml
tools/ocaml/libs/xl/xenlight.mli
tools/ocaml/libs/xentoollog/_xtl_levels.*
tools/ocaml/libs/xentoollog/xentoollog.ml
tools/ocaml/libs/xentoollog/xentoollog.mli
tools/ocaml/libs/xs/paths.ml
tools/ocaml/libs/xc/xenctrl_abi_check.h
tools/ocaml/xenstored/_paths.h
tools/ocaml/xenstored/oxenstored
tools/ocaml/xenstored/oxenstored.conf
tools/ocaml/xenstored/paths.ml
tools/ocaml/test/xtl
tools/ocaml/test/send_debug_keys
tools/ocaml/test/list_domains
tools/ocaml/test/dmesg
tools/ocaml/test/raise_exception
tools/debugger/kdd/kdd
tools/firmware/etherboot/ipxe.tar.gz
tools/firmware/etherboot/ipxe/
tools/python/xen/lowlevel/xl/_pyxl_types.c
tools/python/xen/lowlevel/xl/_pyxl_types.h
tools/xenstore/xenstore-watch
tools/xl/_paths.h
tools/xl/xl
docs/txt/misc/*.txt
docs/txt/man/*.txt
docs/figs/*.png