Skip to content

livepatch: Fail object initialization on duplicate patched function

Petr Mladek live-patching lkml sashiko-reviews 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 18 repliesIn review
  2. v10 of 5 patches 1 replySuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5livepatch: Fail object initialization on duplicate patched functionkernel/livepatch/core.c+16 -16 replies
2/5selftests/livepatch: Test rejection of aliased symbols in one objecttools/testing/selftests/livepatch/Makefile tools/testing/selftests/livepatch/test-alias.sh tools/testing/selftests/livepatch/test_modules/Makefile +2 more+196 -21 reply
3/5livepatch: Move code for updating livepatch object relocationskernel/livepatch/core.c+36 -361 reply
4/5livepatch: Clear relocations when klp_apply_object_relocs() failskernel/livepatch/core.c+18 -55 replies
5/5livepatch: Clean up klp_init_object_loaded() when failskernel/livepatch/core.c+25 -122 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchSong LiuMiroslav Benes
1/5
2/5A-b
3/5A-b
4/5
5/5A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] livepatch: Fail object initialization on duplicate patched function

This is v4 of the patch failing object initialization when it patches the same underlying function twice through two aliased symbols (functions sharing one address) in the same object.

Changes against [v3]:

+ Add selftest for livepatching aliased symbols [Song, Harry]

+ Only partially revert relocations when failing inside klp_apply_object_relocs() [Sashiko]

+ Cleanup changes made by klp_init_object_loaded() for failing patch on another failures in klp_module_coming() [Sashiko]

Changes against [v2]:

+ Clarify comments and the commit message [Miroslav]

+ Cleanup when klp_init_object_loaded() fails [Sashiko]

[v2] https://lore.kernel.org/r/[email protected]
[v3] https://lore.kernel.org/r/[email protected]

Harry Hsu (2):
livepatch: Fail object initialization on duplicate patched function selftests/livepatch: Test rejection of aliased symbols in one object

Petr Mladek (3):
livepatch: Move code for updating livepatch object relocations
livepatch: Clear relocations when klp_apply_object_relocs() fails
livepatch: Clean up klp_init_object_loaded() when fails

 kernel/livepatch/core.c                       | 137 ++++++++++++------
 tools/testing/selftests/livepatch/Makefile    |   3 +-
 .../testing/selftests/livepatch/test-alias.sh |  81 +++++++++++
 .../selftests/livepatch/test_modules/Makefile |   4 +-
 .../test_modules/test_klp_alias_patch.c       |  62 ++++++++
 .../test_modules/test_klp_alias_target.c      |  48 ++++++
 6 files changed, 285 insertions(+), 50 deletions(-)
 create mode 100755 tools/testing/selftests/livepatch/test-alias.sh
 create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_alias_patch.c
 create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_alias_target.c
Signature · 1 line
2.55.0