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

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



Hey!

Since v3: [https://lists.xen.org/archives/html/xen-devel/2016-09/msg01127.html]
 - Addressed Jan's comment (most are renaming)
 - Addressed Julien's and Jan's idea of HAS_ALTERNATIVE
 - Addressed Julien's review comments of "arm: poison initmem when it is freed."

v2: [http://www.gossamer-threads.com/lists/xen/devel/444461?page=last]
 - Addressed the two outstanding concerns: CPU bit feature to test alternative
   test-case, and errata #843419 on some Cortex-A53 
 - Dealt with comments from Jan, Julien and Andrew.
 - Fixed (offlist) with Julien ARM32 not branching properly.
 - Committed some of the patches that had been reviewed/Acked.

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

The patches are based on: [PATCH v6] Livepatch fixes and features for v4.8.
https://lists.xen.org/archives/html/xen-devel/2016-09/msg01719.html

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

These patches enable livepatching to work on ARM64 and ARM32. They have
been tested on multi-CPU environments (Foundation Model, 4CPU for ARM64;
and ARM CubieTruck for ARM32).

In terms of review or such, two patches have been reviewed:

 #2 livepatch: Reject payloads with .alternative or
 #6 livepatch: ARM 32|64: Ignore mapping symbols: $[d,a,x]

The rest still needs review.  Thanks!

Konrad Rzeszutek Wilk (16):
      arm/x86/common: Add HAS_[ALTERNATIVE|EX_TABLE]
      livepatch: Reject payloads with .alternative or .ex_table if support is 
not built-in.
      arm: poison initmem when it is freed.
      livepatch: Initial ARM64 support.
      livepatch: ARM/x86: Check displacement of old_addr and new_addr
      livepatch: ARM 32|64: Ignore mapping symbols: $[d,a,x]
      livepatch/arm/x86: Check payload for for unwelcomed symbols.
      livepatch: Move test-cases to their own sub-directory in test.
      livepatch: tests: Make them compile under ARM64
      livepatch: x86, ARM, alternative: Expose FEATURE_LIVEPATCH
      xen/arm32: Add an helper to invalidate all instruction caches
      bug/x86/arm: Align bug_frames sections.
      livepatch: Initial ARM32 support.
      livepatch, arm[32|64]: Share arch_livepatch_revert_jmp
      livepatch: arm[32,64],x86: NOP test-case
      livepatch: In xen_nop test-case remove the .bss and .data sections

 .gitignore                                  |   8 +-
 MAINTAINERS                                 |   2 +
 docs/misc/livepatch.markdown                |  14 +-
 xen/Makefile                                |   5 +-
 xen/arch/arm/Kconfig                        |   3 -
 xen/arch/arm/Makefile                       |  16 +-
 xen/arch/arm/arm32/Makefile                 |   1 +
 xen/arch/arm/arm32/livepatch.c              | 290 +++++++++++++++++
 xen/arch/arm/arm64/Makefile                 |   1 +
 xen/arch/arm/arm64/livepatch.c              | 468 ++++++++++++++++++++++++++++
 xen/arch/arm/domain.c                       |   6 +
 xen/arch/arm/livepatch.c                    | 159 ++++++++--
 xen/arch/arm/mm.c                           |  17 +-
 xen/arch/arm/traps.c                        |   6 +
 xen/arch/x86/Kconfig                        |   2 +
 xen/arch/x86/Makefile                       |   5 -
 xen/arch/x86/livepatch.c                    |  14 +
 xen/arch/x86/test/Makefile                  |  85 -----
 xen/arch/x86/test/xen_bye_world.c           |  34 --
 xen/arch/x86/test/xen_bye_world_func.c      |  22 --
 xen/arch/x86/test/xen_hello_world.c         |  67 ----
 xen/arch/x86/test/xen_hello_world_func.c    |  39 ---
 xen/arch/x86/test/xen_replace_world.c       |  33 --
 xen/arch/x86/test/xen_replace_world_func.c  |  22 --
 xen/arch/x86/xen.lds.S                      |   1 -
 xen/common/Kconfig                          |   8 +-
 xen/common/livepatch.c                      |  20 +-
 xen/common/livepatch_elf.c                  |   7 +
 xen/include/asm-arm/alternative.h           |   2 +
 xen/include/asm-arm/arm32/page.h            |  13 +
 xen/include/asm-arm/bug.h                   |   1 +
 xen/include/asm-arm/config.h                |   5 +
 xen/include/asm-arm/cpufeature.h            |   5 +
 xen/include/asm-arm/livepatch.h             |  39 +++
 xen/include/asm-x86/bug.h                   |   1 +
 xen/include/asm-x86/livepatch.h             |   4 +
 xen/include/xen/elfstructs.h                |  79 ++++-
 xen/include/xen/livepatch.h                 |  23 +-
 xen/include/xen/types.h                     |   9 +
 xen/test/Makefile                           |   7 +
 xen/test/livepatch/Makefile                 | 111 +++++++
 xen/test/livepatch/xen_bye_world.c          |  34 ++
 xen/test/livepatch/xen_bye_world_func.c     |  22 ++
 xen/test/livepatch/xen_hello_world.c        |  67 ++++
 xen/test/livepatch/xen_hello_world_func.c   |  47 +++
 xen/test/livepatch/xen_nop.c                |  49 +++
 xen/test/livepatch/xen_replace_world.c      |  33 ++
 xen/test/livepatch/xen_replace_world_func.c |  22 ++
 48 files changed, 1579 insertions(+), 349 deletions(-)

_______________________________________________
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®.