Skip to content

livepatch-klp-build: small fixups and enhancements

Joe Lawrence live-patching lkml 4 versions – Applied

Status from this message: The following commit has been merged into the objtool/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest12 patches 4 repliesApplied
  2. v313 patches 36 repliesSuperseded
  3. v25 patches 13 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches20 repliesSuperseded

Changes in v4 from the cover letter

- Rebased on 9a73f085dc91 (tip/objtool/urgent)
- Dropped elf_add_data() fix, added __clone_symbol() align fix [Josh]
- Adopted Josh's kernel version fix [Josh]
- Updated friendly msg, "foo.patch: unsupported patch to bar.c" [Josh]
- s/warn:/warning:/, trap_err -> die, and commit msg clarification on colorization commit [Josh]
- Use "fuzz" instead of "drift", adjust output ordering, and send patch cmd errors to stderr [Josh]
- Dropped ("livepatch/klp-build: don't look for changed objects in tools/") for now
- Added Song's Acks [Song]

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/12objtool/klp: fix data alignment in __clone_symbol()tools/objtool/klp-diff.c+2 -10 replies
2/12objtool/klp: fix mkstemp() failure with long pathstools/objtool/elf.c+3 -200 replies
3/12livepatch/klp-build: support patches that add/remove filesscripts/livepatch/klp-build+27 -70 replies
4/12livepatch/klp-build: switch to GNU patch and recountdiffscripts/livepatch/klp-build+13 -461 reply
5/12livepatch/klp-build: add grep-override functionscripts/livepatch/klp-build+7 -00 replies
6/12livepatch/klp-build: add Makefile with check targetscripts/livepatch/Makefile+20 -00 replies
7/12livepatch/klp-build: fix shellcheck complaintsscripts/livepatch/klp-build+1 -10 replies
8/12livepatch/klp-build: improve short-circuit validationscripts/livepatch/klp-build+5 -20 replies
9/12livepatch/klp-build: Fix inconsistent kernel versionscripts/livepatch/klp-build+4 -51 reply
10/12livepatch/klp-build: provide friendlier error messagesscripts/livepatch/klp-build+5 -40 replies
11/12livepatch/klp-build: add terminal color outputscripts/livepatch/klp-build+13 -40 replies
12/12livepatch/klp-build: report patch validation fuzzscripts/livepatch/klp-build+19 -51 reply

Reviews trailers per patch

11 of 12 patches have a Reviewed-by or Acked-by.

PatchSong Liu
1/12
2/12A-b
3/12A-b
4/12A-b
5/12A-b
6/12A-b
7/12A-b
8/12A-b
9/12A-b
10/12A-b
11/12A-b
12/12A-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 00/12] livepatch-klp-build: small fixups and enhancements

v4:

- Rebased on 9a73f085dc91 (tip/objtool/urgent)
- Dropped elf_add_data() fix, added __clone_symbol() align fix [Josh]
- Adopted Josh's kernel version fix [Josh]
- Updated friendly msg, "foo.patch: unsupported patch to bar.c" [Josh]
- s/warn:/warning:/, trap_err -> die, and commit msg clarification on colorization commit [Josh]
- Use "fuzz" instead of "drift", adjust output ordering, and send patch cmd errors to stderr [Josh]
- Dropped ("livepatch/klp-build: don't look for changed objects in tools/") for now
- Added Song's Acks [Song]

v3: https://lore.kernel.org/live-patching/[email protected]/T/#t

- Added a patch to objtool ELF code to fix packed string section alignment
- Simplified the mkstemp() patch and surrounding code [Josh]
- Added patches to catch grep use, add Makefile shellcheck, and fix current shellcheck warnings [Josh]
- Simplified the short-circuit validation patch [Josh]
- Added a patch to fix short-circuit version mismatch
- Pretty-print output in color [Josh]
- Reduce 'patch' chatter to fuzz/offset warning during patch validation
- Prune tools/ from paths that find_objects() looks for changed objects

v2: https://lore.kernel.org/live-patching/[email protected]/

- Update patch subject prefixes accordingly [Josh]
- Added a small objtool/klp patch. Test systems setup crazy long pathnames :D
- Removed patch ("limit parent .git directory search") as this version replaces the use of git apply --recount with patch and recountdiff. A side effect of this simplification was no longer needing this weird hack. [Josh]
- Updated the patch that handles input patches that add files to also support removing files, implement this by directly inspecting the .patch +++ and --- header lines via two file lists [Josh]
- Implement two short-circuiting updates: validate patches for steps 1 and 2, and allow the user to omit patches for steps 3 and 4. This combines the original 'fail-fast' patch and some related notes on the v1 thread. [Josh]
- Since v2 replaces git apply with patch and recountdiff, there is no need for a -z/--fuzz argument, it comes with GNU patch for free.

v1: https://lore.kernel.org/live-patching/CAPhsuW5qrueccM123YbTo2ZvP-Rf+0UT-goG6c5A8gXw7BsF3w@mail.gmail.com/T/#t

Joe Lawrence (11):
objtool/klp: fix data alignment in __clone_symbol() objtool/klp: fix mkstemp() failure with long paths livepatch/klp-build: support patches that add/remove files livepatch/klp-build: switch to GNU patch and recountdiff livepatch/klp-build: add grep-override function livepatch/klp-build: add Makefile with check target livepatch/klp-build: fix shellcheck complaints livepatch/klp-build: improve short-circuit validation livepatch/klp-build: provide friendlier error messages livepatch/klp-build: add terminal color output livepatch/klp-build: report patch validation fuzz

Josh Poimboeuf (1):
livepatch/klp-build: Fix inconsistent kernel version

 scripts/livepatch/Makefile  |  20 ++++++
 scripts/livepatch/klp-build | 140 ++++++++++++++++++++----------------
 tools/objtool/elf.c         |  23 +-----
 tools/objtool/klp-diff.c    |   3 +-
 4 files changed, 105 insertions(+), 81 deletions(-)
 create mode 100644 scripts/livepatch/Makefile
Signature · 1 line
2.53.0