[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2] Livepatch for ARM 64 and 32.



Hey!

Since v1 (and RFC): 
[https://lists.xen.org/archives/html/xen-devel/2016-08/msg01835.html]
 - Acted on most all comments.
 - Added ARM32 support.

The patches are based on: [PATCH v4] Livepatch fixes and features for v4.8.
(https://lists.xen.org/archives/html/xen-devel/2016-08/msg02705.html)

And the git tree is:
 git://xenbits.xen.org/people/konradwilk/xen.git livepatch.v4.8.v4

There are two outstanding questions that should be addressed at some point:
 -  #16 "livepatch: tests: Make them compile under ARM64"
    We chatted about adding a specific CPU bit (LIVEPATCH) so that alternative
    code always gets exercised. This being for both x86 and ARM. But this has
    a side effect that it gets exposed to the toolstack and can also be
    exposed to the guests. I think it is better if we do not do that
    so left it to be enabled based on the most common errata (or feature
    on x86).
 -  #13 "livepatch: Initial ARM64 support."
    Need to look in erratum #843419 on some Cortex-A53 and figuring
    out how to avoid payloads having R_AARCH64_ADR_PREL_PG_HI21 relocations.
    
But beside that, please enjoy the patchset! Hopefully I didn't miss
any comments - if I did, please remind me!

 .gitignore                                         |   8 +-
 MAINTAINERS                                        |   2 +
 xen/Makefile                                       |   5 +-
 xen/arch/arm/Makefile                              |  16 +-
 xen/arch/arm/alternative.c                         |  50 ++--
 xen/arch/arm/arm32/Makefile                        |   1 +
 xen/arch/arm/arm32/livepatch.c                     | 286 ++++++++++++++++++
 xen/arch/arm/arm64/Makefile                        |   1 +
 xen/arch/arm/arm64/insn.c                          |  61 ++++
 xen/arch/arm/arm64/livepatch.c                     | 330 +++++++++++++++++++++
 xen/arch/arm/domain.c                              |   6 +
 xen/arch/arm/livepatch.c                           | 135 +++++++--
 xen/arch/arm/mm.c                                  |  27 +-
 xen/arch/arm/traps.c                               |   6 +
 xen/arch/x86/Kconfig                               |   8 +
 xen/arch/x86/Makefile                              |   5 -
 xen/arch/x86/alternative.c                         |  29 +-
 xen/arch/x86/livepatch.c                           |  27 +-
 xen/arch/x86/mm.c                                  |   5 +-
 xen/common/Kconfig                                 |   2 +-
 xen/common/livepatch.c                             |  29 +-
 xen/common/livepatch_elf.c                         |  27 +-
 xen/include/asm-arm/alternative.h                  |   7 +-
 xen/include/asm-arm/arm32/page.h                   |   9 +
 xen/include/asm-arm/arm64/insn.h                   |  23 ++
 xen/include/asm-arm/config.h                       |   9 +-
 xen/include/asm-arm/livepatch.h                    |  28 ++
 xen/include/asm-arm/page.h                         |  11 +
 xen/include/asm-x86/alternative.h                  |  11 +-
 xen/include/xen/elfstructs.h                       |  56 +++-
 xen/include/xen/livepatch.h                        |   4 +-
 xen/include/xen/mm.h                               |   2 +-
 xen/include/xen/types.h                            |   6 +
 xen/test/Makefile                                  |   7 +
 xen/{arch/x86/test => test/livepatch}/Makefile     |  14 +-
 .../x86/test => test/livepatch}/xen_bye_world.c    |   0
 .../test => test/livepatch}/xen_bye_world_func.c   |   0
 .../x86/test => test/livepatch}/xen_hello_world.c  |   0
 .../test => test/livepatch}/xen_hello_world_func.c |   8 +-
 .../test => test/livepatch}/xen_replace_world.c    |   0
 .../livepatch}/xen_replace_world_func.c            |   0
 41 files changed, 1139 insertions(+), 122 deletions(-)

Konrad Rzeszutek Wilk (20):
      livepatch: Bubble up sanity checks on Elf relocs
      x86/arm: Make 'make debug' work properly.
      x86/arm64: Expose the ALT_[ORIG|REPL]_PTR macros to header files.
      alternatives: x86 rename and change parameters on ARM
      arm64/alternatives: Make it possible to patch outside of hypervisor.
      arm/alternative: Use _start instead of _stext
      arm/x86: Add ALTERNATIVE and HAS_EX_TABLE
      x86: change modify_xen_mappings to return error
      arm/mm: Introduce modify_xen_mappings
      arm64/insn: introduce aarch64_insn_gen_{nop|branch_imm}() helper functions
      arm/arm64: Update comment about VA layout.
      x86,arm: Change arch_livepatch_quiesce() decleration.
      livepatch: Initial ARM64 support.
      livepatch: ARM 32|64: Ignore mapping symbols: $[d,a,x,t]
      livepatch: Move test-cases to common
      livepatch: tests: Make them compile under ARM64
      xen/arm32: Add an helper to invalidate all instruction caches
      xen/arm32/livepatch: Add BPICALLIS to helper to invalidate all 
instruction caches
      livepatch/elf: Adjust section aligment to word
      livepatch: ARM32 support.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.