mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@kernel.org>
To: Longjun Luo <luolongjuna@gmail.com>
Cc: peterz@infradead.org, mbenes@suse.cz, pmladek@suse.com,
	 joe.lawrence@redhat.com, song@kernel.org, puranjay@kernel.org,
	nathan@kernel.org,  ndesaulniers@google.com, morbo@google.com,
	justinstitt@google.com,  live-patching@vger.kernel.org,
	llvm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 00/11] objtool/klp: DWARF-based cross-build symbol correlation
Date: Thu, 12 Nov 2026 19:26:13 -0800	[thread overview]
Message-ID: <avZ9Ku61M8z-2axF@jpoimboe> (raw)
In-Reply-To: <20261104133158.3187525-1-luolongjuna@gmail.com>

On Wed, Nov 04, 2026 at 09:31:46PM +0800, Longjun Luo wrote: > Open Questions and Next Steps
> -----------------------------
> 
> This is a substantial change: 1,755 of the 4,010 added lines are tests,
> and about 1,300 implement the DWARF reader and identity layer. Before
> preparing a merge-ready series, I would like explicit maintainer guidance
> on how to stage its integration. My proposed sequence is:
> 
> - Submit Patches 1-3 separately with their regression tests.
> - Prepare the identity representation, DWARF reader, and ELF cross-checks
>   as a foundation that can be reviewed separately from twin matching.
> - Integrate the matching changes in Patches 7-10 together: reference
>   extension pairs repeated statics, and the reference checks reject
>   remaining ambiguous data references.
> - Submit the memory optimizations separately and pursue explicit state
>   annotations in a separate RFC.
> 
> This RFC retains upstream expectations for the three policy tests to
> make the behavior changes visible. For the merge-ready series, I will
> update their assertions to reflect the agreed policy and move Patch 11's
> tests alongside the changes they cover.
> 
> I plan to add triple-based DWARF correctness tests in upstream compilers,
> using known source definitions and optimization variants to check
> coverage, non-conflict, and attribution accuracy (with clones, pieces,
> anonymous scopes, and folding checked according to their respective
> semantics) without locking in a specific DIE layout or suffix scheme. My
> earlier bug reports and fixes on IPA-ICF, weak-override attribution, and
> assembly CU selection [2-6] provide concrete test inputs, and the same
> attribution model applies to consumers such as AutoFDO [7].
> 
> I would appreciate feedback on four questions:
> 
> 1. Would maintainers prefer to integrate the identity representation and
>    reader first, then evolve twin matching in a follow-up series, or keep
>    them together for integration?
> 2. Is constraining candidates by the identity triple and extending twins
>    via checksums and unchanged-function references the right foundation
>    for correlation, and how should the final ELF fallback be bounded?
> 3. Is the handling boundary in Case D reasonable, and should explicit
>    state annotations (such as `KLP_NEW_STATIC()` / `KLP_DEL_STATIC()`) be
>    pursued in a separate RFC?
> 4. How should we structure upstream compiler tests around the identity
>    triple to protect both DWARF producers and livepatch consumers?

There are a LOT of words in this cover letter.  The whole thing is a bit
overwhelming to try to review, much less answer these questions.  Please
don't use LLM-generated text, as it can be very difficult to follow.

Also, I noticed the cover letter has several back-references to v1,
adding to my confusion.  The cover letter should be self-contained, such
that a reviewer can easily understand what the patch series does without
first studying v1.

DWARF is the most controversial and complex part of this series.  Before
going there, we should look at whatever can be improved *without*
relying on DWARF.  That will then make it much easier to evaluate what
additional benefits can be provided by DWARF later on.

klp-build is very much a pragmatic tool, and most likely will never be
able to handle all possible AI-imagined edge cases.  It should always be
used with caution, with someone (or something) double checking its
results at the end.

I suggest splitting up the patch series, focusing on fixing the more
realistic and tractable issues first.  Maybe even one issue at a time.
Human reviewer attention is spread very thin right now, please make
legibility a top priority.

-- 
Josh

  parent reply	other threads:[~2026-11-13  3:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 13:31 Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 01/11] objtool/klp: Fix checksums and copying of wide strings Longjun Luo
2026-11-13  2:42   ` Josh Poimboeuf
2026-11-13  4:32     ` Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 02/11] objtool/klp: Hash compound literals by content Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 03/11] objtool/klp: Preserve identifier digits when stripping suffixes Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 04/11] objtool/klp: Read symbol identities from DWARF Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 05/11] objtool/klp: Support reduced and split DWARF Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 06/11] klp-build: Require CONFIG_DEBUG_INFO Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 07/11] objtool/klp: Correlate symbols using DWARF identities Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 08/11] objtool/klp: Include symbol identities in reference checksums Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 09/11] objtool/klp: Extend twins through unchanged function references Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 10/11] objtool/klp: Check unmatched data references Longjun Luo
2026-11-04 13:31 ` [RFC PATCH v2 11/11] objtool/klp: Test symbol identity and state preservation Longjun Luo
2026-11-13  2:35 ` [RFC PATCH v2 00/11] objtool/klp: DWARF-based cross-build symbol correlation Josh Poimboeuf
2026-11-13  3:25   ` Longjun Luo
2026-11-13  3:26 ` Josh Poimboeuf [this message]
2026-11-13  3:58   ` Longjun Luo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avZ9Ku61M8z-2axF@jpoimboe \
    --to=jpoimboe@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luolongjuna@gmail.com \
    --cc=mbenes@suse.cz \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=puranjay@kernel.org \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®