Here is v3, addressing review feedback from the v2 thread as well as finding a few more things along the way.
I'll reply to specific patches with more details on new bugs/behavior. I've ordered the patchset IMHO order of importance, fixing bugs then moving on to enhancements. v3: - 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-gog6c5a8gxw7bs...@mail.gmail.com/T/#t Joe Lawrence (13): objtool/klp: honor SHF_MERGE entry alignment in elf_add_data() 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: fix version mismatch when short-circuiting livepatch/klp-build: provide friendlier error messages livepatch/klp-build: add terminal color output livepatch/klp-build: report patch validation drift livepatch/klp-build: don't look for changed objects in tools/ scripts/livepatch/Makefile | 20 +++++ scripts/livepatch/klp-build | 142 ++++++++++++++++++++++-------------- tools/objtool/elf.c | 25 +------ 3 files changed, 110 insertions(+), 77 deletions(-) create mode 100644 scripts/livepatch/Makefile -- Joe -- 2.53.0
