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

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



Hey!
Since v4:[https://lists.xen.org/archives/html/xen-devel/2016-09/msg01734.html]
 - Added Acks/Reviewed-by
 - Reworked "arm: poison initmem when it is freed." and
   "xen/arm32: Add an helper to invalidate all instruction caches"
 - Moved "livepatch: x86, ARM, alternative: Expose FEATURE_LIVEPATCH" to
   be in front of "livepatch: tests: Make them compile under ARM64"
 - Fixed up code as suggested by reviewers.

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 v7] Livepatch fixes and features for v4.8.
https://lists.xen.org/archives/html/xen-devel/2016-09/msg02305.html

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

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).

The state of the patches is as follow:

Legend:
 r - Reviewed
 a - Acked


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

Please review!

Konrad Rzeszutek Wilk (16):
      arm64: s/ALTERNATIVE/HAS_ALTERNATIVE/
      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: x86, ARM, alternative: Expose FEATURE_LIVEPATCH
      livepatch: tests: Make them compile under ARM64
      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
      livepatch: arm[32,64],x86: NOP test-case

 .gitignore                                  |   8 +-
 MAINTAINERS                                 |   2 +
 docs/misc/livepatch.markdown                |  17 +-
 xen/Makefile                                |   5 +-
 xen/arch/arm/Kconfig                        |   7 +-
 xen/arch/arm/Makefile                       |  18 +-
 xen/arch/arm/arm32/Makefile                 |   1 +
 xen/arch/arm/arm32/livepatch.c              | 298 +++++++++++++++++
 xen/arch/arm/arm64/Makefile                 |   1 +
 xen/arch/arm/arm64/livepatch.c              | 481 ++++++++++++++++++++++++++++
 xen/arch/arm/domain.c                       |   6 +
 xen/arch/arm/livepatch.c                    | 159 +++++++--
 xen/arch/arm/mm.c                           |  15 +-
 xen/arch/arm/traps.c                        |   6 +
 xen/arch/arm/xen.lds.S                      |   8 +-
 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           |   4 +-
 xen/include/asm-arm/arm32/page.h            |  16 +
 xen/include/asm-arm/bug.h                   |   1 +
 xen/include/asm-arm/config.h                |   5 +
 xen/include/asm-arm/cpuerrata.h             |   4 +-
 xen/include/asm-arm/cpufeature.h            |   3 +-
 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                 |  21 +-
 xen/include/xen/types.h                     |   9 +
 xen/test/Makefile                           |   7 +
 xen/test/livepatch/Makefile                 | 109 +++++++
 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 ++
 50 files changed, 1610 insertions(+), 357 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®.