All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: reject trailers that credit an AI agent
@ 2026-09-03 10:04 Paolo Bonzini
  2026-09-03 10:14 ` Daniel P. Berrangé
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Paolo Bonzini @ 2026-09-03 10:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P. Berrangé

The QEMU community has broad consent to not accept assisted-by and similar
trailers, and much less fake co-authored-bys, independent of any AI policy.
Implement this in checkpatch.pl already, so that there is another way for
contributors to discover the AI policy.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/checkpatch.pl | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 03f35e75012..90cb40dfe1f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1811,6 +1811,18 @@ sub process {
 			}
 		}
 
+# Reject trailers that credit an AI agent.
+		if ($realfile =~ /^$/ &&
+		    ($line =~ /🤖/ ||
+		     $line =~ /^\s*(?:Assisted|Generated)-by:/i ||
+		     ($line =~ /^\s*Co-authored-by:\s*(.*?)\s*$/i &&
+		      $1 =~ /\bcopilot\b | \bchatgpt\b | \bcodex\b | \bcursor\b | \[bot\] |
+			     \bllama\b | \bgemini\b.*(?:pro|flash|ultra|google\.com) |
+			     \bclaude\b.*(?:opus|sonnet|fable|haiku|anthropic\.com)/xi))) {
+			ERROR("QEMU does not allow using AI for contributions, " .
+				"see docs/devel/code-provenance.rst\n" . $herecurr);
+		}
+
 # Check SPDX-License-Identifier references a permitted license
 		if (($rawline =~ m,SPDX-License-Identifier: (.*?)(\*/)?\s*$,) &&
 			$rawline !~ /^-/) {
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-09-03 13:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 10:04 [PATCH] checkpatch: reject trailers that credit an AI agent Paolo Bonzini
2026-09-03 10:14 ` Daniel P. Berrangé
2026-09-03 10:19   ` Paolo Bonzini
2026-09-03 10:25     ` Daniel P. Berrangé
2026-09-03 10:29       ` Paolo Bonzini
2026-09-03 11:57 ` Marc-André Lureau
2026-09-03 12:15 ` Philippe Mathieu-Daudé
2026-09-03 12:35   ` Marc-André Lureau
2026-09-03 13:30   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.