Skip to contentSkip to conversation

checkpatch: Validate committer sign-off

PATCH In review Bjorn Andersson 5 participants 7 messages Jul 24 – Jul 28

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch: Validate committer sign-off

checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

git format-patch provides the author and patch content, but not the committer. Extend the existing git log extraction to record the committer identity.

Extract the author sign-off comparison logic into a shared helper, and use it to apply the same heuristics to the final Signed-off-by trailer and committer.

Emit COMMITTER_SIGN_OFF_MISMATCH when the final trailer does not match the committer.

Assisted-by OpenCode:GPT-5.5
---
 Documentation/dev-tools/checkpatch.rst |   5 ++
 scripts/checkpatch.pl                  | 112 ++++++++++++++++++++++-----------
 2 files changed, 82 insertions(+), 35 deletions(-)
Documentation/dev-tools/checkpatch.rst +5 -0
index 6139a08c34cd..7726c3863bcc 100644
@@ -562,6 +562,11 @@ Commit message
       - The email subaddresses do not match.
       - The email comments do not match.
 
+  **COMMITTER_SIGN_OFF_MISMATCH**
+    When checking a Git commit, the final Signed-off-by: line does not match
+    the commit's committer.  The person committing a patch should add their
+    own Signed-off-by: line last.
+
   **MISSING_SIGN_OFF**
     The patch is missing a Signed-off-by line.  A signed-off-by
     line should be added according to Developer's certificate of
scripts/checkpatch.pl +77 -35

155 lines not on this page · raw message

---
base-commit: 290aaf24a551d5a0dce037e3fab30820f9113a10
change-id: 20260723-checkpatch-committer-sob-10fcbd636d43

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>
maintainer
#1 lore raw
Quoted 5 lines · Bjorn Andersson

```
checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

I don't actually see that need as an issue for checkpatch.

checkpatch is for patches, not things that are already committed.

If something like this is added, it should _only_ be used when --git is on the command line.

#2 lore raw
Quoted 11 lines · Joe Perches
Quoted 5 lines · Bjorn Andersson

```
checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

I don't actually see that need as an issue for checkpatch.

checkpatch is for patches, not things that are already committed.

Fair, this is only applicable for people managing/receiving/collecting patches - be it maintainers or people gathering patches and then resend them...

I didn't dig deeper, but my LLM found 32 cases in the last 90 days where linux-next maintainers points out missing committer sobs, so it seems like making this check more conveniently accessible would help more than me.

Quoted 2 lines

If something like this is added, it should _only_ be used when --git is on the command line.

The 3rd hunk (that extracts commiter, sha1 and subject) only runs "if $(git)", and hence $committer (from $git_committers{$filename}) will be '', as such signoff_match_status($1, $committer) will not be evaluated, and the check will be skipped.

Regards,
Bjorn

#3 lore raw
Quoted 22 lines · Bjorn Andersson
Quoted 11 lines · Joe Perches
Quoted 5 lines · Bjorn Andersson

```
checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

I don't actually see that need as an issue for checkpatch.

checkpatch is for patches, not things that are already committed.

Fair, this is only applicable for people managing/receiving/collecting patches - be it maintainers or people gathering patches and then resend them...

I didn't dig deeper, but my LLM found 32 cases in the last 90 days where linux-next maintainers points out missing committer sobs, so it seems like making this check more conveniently accessible would help more than me.

Quoted 7 lines
Quoted 2 lines

If something like this is added, it should _only_ be used when --git is on the command line.

The 3rd hunk (that extracts commiter, sha1 and subject) only runs "if $(git)", and hence $committer (from $git_committers{$filename}) will be '', as such signoff_match_status($1, $committer) will not be evaluated, and the check will be skipped.

The issue Bjorn is trying to solve is real and as he pointed out - every second day maintainers fail to commit properly (srsly... still!). Some of us implemented git commit hooks [1][2], but many still don't care enough, even though installing such commit hook is basically 30 seconds.

Four reports from Mark yesterday:
https://lore.kernel.org/linux-next/?q=signed

Therefore adding verify_signedoff features to checkpatch.pl might be useful - maybe some maintainer workflows will improve. Or maybe having it in tree will help them. I don't have any other idea how to encourage other people to solve it long term - my talk in 2023 did not fix it, Steven's and Mark's emails fix only commits but not the root cause, me mentioning the git hook convinces one maintainer per 6 months to adopt it.

Maybe checkpatch would help people to get it right...

[1] slides from https://lpc.events/event/17/contributions/1498/
[2] verify_signedoff which I recently moved to soc-tools repo:
https://web.git.kernel.org/pub/scm/linux/kernel/git/soc/soc-tools.git/tree/verify_signedoff.sh

Best regards,
Krzysztof

maintainer
#4 lore raw
Quoted 1 line · Krzysztof Kozlowski

On 27/07/2026 19:59, Bjorn Andersson wrote:

[]

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

[]

Quoted 4 lines

The issue Bjorn is trying to solve is real and as he pointed out - every second day maintainers fail to commit properly (srsly... still!). Some of us implemented git commit hooks [1][2], but many still don't care enough, even though installing such commit hook is basically 30 seconds.

[]

Quoted 1 line

Maybe checkpatch would help people to get it right...

Alright, I'll look at this proposal more thoroughly.

Acked-by on v1 1/1
#5 lore raw
In reply to Bjorn Andersson
Quoted 13 lines · Bjorn Andersson

checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

git format-patch provides the author and patch content, but not the committer. Extend the existing git log extraction to record the committer identity.

Extract the author sign-off comparison logic into a shared helper, and use it to apply the same heuristics to the final Signed-off-by trailer and committer.

Quoted 6 lines

Emit COMMITTER_SIGN_OFF_MISMATCH when the final trailer does not match the committer.

Assisted-by OpenCode:GPT-5.5

---

I too would like to see this applied. The alternative is to get emails from linux-next maintainers after a bad commit is already published, which requires rebasing of maintainers' trees.

Thanks,
Bartosz

#6 lore raw
Quoted 10 lines · Bartosz Golaszewski

On Fri, 24 Jul 2026 20:56:00 +0200, Bjorn Andersson

Quoted 4 lines

checkpatch validates the Signed-off-by trailers against the patch's author, but misses the opportunity to also validate the committer when run with --git. Maintainers therefor need third-party scripts for the final Signed-off-by check.

I too would like to see this applied. The alternative is to get emails from linux-next maintainers after a bad commit is already published, which requires rebasing of maintainers' trees.

FWIW the substantial majority of signoff problems I see are due to rebases in multi-maintainer trees, that's partly due to a few frequent fliers.