Skip to contentSkip to conversation

checkpatch: add support for Assisted-by tag

PATCH In review Andrew Jones 5 participants 9 messages Jun 22 – Jul 6

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

PATCH 1/1 checkpatch: add support for Assisted-by tag

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

---
 scripts/checkpatch.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)
scripts/checkpatch.pl +10 -0
index e858261c95a8..653bec1f6ea5 100755
@@ -626,6 +626,7 @@ our $signature_tags = qr{(?xi:
 	Reviewed-by:|
 	Reported-by:|
 	Suggested-by:|
+	Assisted-by:|
 	To:|
 	Cc:
 )};
@@ -3073,6 +3074,15 @@ sub process {
 				}
 			}
 
+			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
+			if ($sign_off =~ /^Assisted-by:/i) {
+				if ($email !~ /^\S+:\S+/) {
+					WARN("BAD_SIGN_OFF",
+					     "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
+				}
+				next;
+			}
+
 			my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
 			my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
 			if ($suggested_email eq "") {
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

Paolo

Quoted 37 lines
---
 scripts/checkpatch.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)
scripts/checkpatch.pl +10 -1
index e858261c95a8..653bec1f6ea5 100755
@@ -626,6 +626,7 @@ our $signature_tags = qr{(?xi:
        Reviewed-by:|
        Reported-by:|
        Suggested-by:|
+       Assisted-by:|
        To:|
        Cc:
 )};
@@ -3073,6 +3074,15 @@ sub process {
                                }
                        }
 
+                       # Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
+                       if ($sign_off =~ /^Assisted-by:/i) {
+                               if ($email !~ /^\S+:\S+/) {
+                                       WARN("BAD_SIGN_OFF",
+                                            "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
+                               }
+                               next;
+                       }
+
                        my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
                        my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
                        if ($suggested_email eq "") {
--

2.43.0

#2 lore raw
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

Thanks,
drew

#3 lore raw
Quoted 24 lines · Andrew Jones
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

Quoted 3 lines

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

I tend to agree with Paolo in that I don't see the value added by these tags -- except the free advertising --. Besides what provides $AGENT_NAME:$MODEL_VERSION is likely irrelevant without the prompt used. And even if we try to reproduce we would get a slightly different result :) Then by the time the patch is committed the information is almost obsolete.

Anyway my 2 cents.

Regards,

Phil.

#4 lore raw
Quoted 29 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Andrew Jones
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

Quoted 3 lines

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

Quoted 7 lines

I tend to agree with Paolo in that I don't see the value added by these tags -- except the free advertising --. Besides what provides $AGENT_NAME:$MODEL_VERSION is likely irrelevant without the prompt used. And even if we try to reproduce we would get a slightly different result :) Then by the time the patch is committed the information is almost obsolete.

kvm-unit-tests does sit on the boundary of being Linux-like and QEMU-adjacent. So I can see why the QEMU position[1] might be considered over the Linux position here. OTOH, I'd rather not complicate kvm-unit-tests development. I'm also personally not that against the tags providing free advertising. The tags also provide stats in the long run which may be used to compute risk factors and/or evaluate quality of particular LLM designs which can lead to LLM improvements.

[1] https://patchew.org/QEMU/[email protected]/

Thanks,
drew

#5 lore raw
Quoted 38 lines · Andrew Jones
Quoted 29 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Andrew Jones
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

Quoted 3 lines

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

Quoted 7 lines

I tend to agree with Paolo in that I don't see the value added by these tags -- except the free advertising --. Besides what provides $AGENT_NAME:$MODEL_VERSION is likely irrelevant without the prompt used. And even if we try to reproduce we would get a slightly different result :) Then by the time the patch is committed the information is almost obsolete.

Quoted 8 lines

kvm-unit-tests does sit on the boundary of being Linux-like and QEMU-adjacent. So I can see why the QEMU position[1] might be considered over the Linux position here. OTOH, I'd rather not complicate kvm-unit-tests development. I'm also personally not that against the tags providing free advertising. The tags also provide stats in the long run which may be used to compute risk factors and/or evaluate quality of particular LLM designs which can lead to LLM improvements.

FWIW, I think we should follow the kernel here. k-u-t has always used the coding style, header files, scripts, etc. from the kernel, so IMHO we should not diverge here.
And I agree with Andrew that the tags could be useful in the long run, e.g. if there is ever a problem with a certain AI model, it's easier for us to find out which commits we might want to have another closer look at.

Thomas

#6 lore raw
Quoted 47 lines · Thomas Huth
Quoted 38 lines · Andrew Jones
Quoted 29 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Andrew Jones
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

Quoted 3 lines

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

Quoted 7 lines

I tend to agree with Paolo in that I don't see the value added by these tags -- except the free advertising --. Besides what provides $AGENT_NAME:$MODEL_VERSION is likely irrelevant without the prompt used. And even if we try to reproduce we would get a slightly different result :) Then by the time the patch is committed the information is almost obsolete.

Quoted 8 lines

kvm-unit-tests does sit on the boundary of being Linux-like and QEMU-adjacent. So I can see why the QEMU position[1] might be considered over the Linux position here. OTOH, I'd rather not complicate kvm-unit-tests development. I'm also personally not that against the tags providing free advertising. The tags also provide stats in the long run which may be used to compute risk factors and/or evaluate quality of particular LLM designs which can lead to LLM improvements.

Quoted 7 lines

FWIW, I think we should follow the kernel here. k-u-t has always used the coding style, header files, scripts, etc. from the kernel, so IMHO we should not diverge here.
And I agree with Andrew that the tags could be useful in the long run, e.g. if there is ever a problem with a certain AI model, it's easier for us to find out which commits we might want to have another closer look at.

I pushed the commit.

Thanks,
drew

#7 lore raw
Quoted 32 lines · Andrew Jones
Quoted 31 lines · Thomas Huth
Quoted 30 lines · Andrew Jones
Quoted 29 lines · Philippe Mathieu-Daudé
Quoted 27 lines · Andrew Jones
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

I tend to agree with Paolo in that I don't see the value added by these tags -- except the free advertising --. Besides what provides $AGENT_NAME:$MODEL_VERSION is likely irrelevant without the prompt used. And even if we try to reproduce we would get a slightly different result :) Then by the time the patch is committed the information is almost obsolete.

+1

Quoted 16 lines
Quoted 8 lines
Quoted 8 lines

kvm-unit-tests does sit on the boundary of being Linux-like and QEMU-adjacent. So I can see why the QEMU position[1] might be considered over the Linux position here. OTOH, I'd rather not complicate kvm-unit-tests development. I'm also personally not that against the tags providing free advertising. The tags also provide stats in the long run which may be used to compute risk factors and/or evaluate quality of particular LLM designs which can lead to LLM improvements.

Quoted 7 lines

FWIW, I think we should follow the kernel here. k-u-t has always used the coding style, header files, scripts, etc. from the kernel, so IMHO we should not diverge here.
And I agree with Andrew that the tags could be useful in the long run, e.g. if there is ever a problem with a certain AI model, it's easier for us to find out which commits we might want to have another closer look at.

Quoted 1 line

I pushed the commit.

Heh, maybe jumped the gun a bit? FWIW, I agree with Paolo and others, specifying the exact name+model is little more than advertising.

https://lore.kernel.org/all/[email protected]

#8 lore raw
Quoted 58 lines · Sean Christopherson
Quoted 32 lines · Andrew Jones
Quoted 31 lines · Thomas Huth
Quoted 30 lines · Andrew Jones
Quoted 29 lines · Philippe Mathieu-Daudé
Quoted 27 lines · Andrew Jones
Quoted 9 lines · Paolo Bonzini
Quoted 7 lines · Andrew Jones

Import Linux commit d1db4118489f ("checkpatch: add support for Assisted-by tag").

(I should have used AI for this, since it'd be fun to include that tag on this tag-enabling patch, but sometimes I still do my own homework!)

Quoted 6 lines

Personally, I don't see the point in providing free advertising to AI companies, so if I had to choose I would do "WARN(...) if ($sign_off =~ /^Assisted-by:/i)". It's more important to know what AI was used *for*, than what AI was used period.

But I won't complain if people want this patch.

The process is now well established over in Linux kernel land and we encourage kvm-unit-tests contributors to follow Linux processes. The motivation for this patch is because I just queued an ARM patch which used the Linux process and it failed checkpatch. I'd rather checkpatch succeed than to have to tell people to remove/modify the tags they're used to using with the kernel.

We can encourage contributors to also add sentences stating how AI assisted when an AI assistance tag is provided in order to capture the "AI used for what" part.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

I tend to agree with Paolo in that I don't see the value added by these tags -- except the free advertising --. Besides what provides $AGENT_NAME:$MODEL_VERSION is likely irrelevant without the prompt used. And even if we try to reproduce we would get a slightly different result :) Then by the time the patch is committed the information is almost obsolete.

+1

Quoted 16 lines
Quoted 15 lines
Quoted 8 lines

kvm-unit-tests does sit on the boundary of being Linux-like and QEMU-adjacent. So I can see why the QEMU position[1] might be considered over the Linux position here. OTOH, I'd rather not complicate kvm-unit-tests development. I'm also personally not that against the tags providing free advertising. The tags also provide stats in the long run which may be used to compute risk factors and/or evaluate quality of particular LLM designs which can lead to LLM improvements.

FWIW, I think we should follow the kernel here. k-u-t has always used the coding style, header files, scripts, etc. from the kernel, so IMHO we should not diverge here.
And I agree with Andrew that the tags could be useful in the long run, e.g. if there is ever a problem with a certain AI model, it's easier for us to find out which commits we might want to have another closer look at.

Quoted 6 lines
Quoted 1 line

I pushed the commit.

Heh, maybe jumped the gun a bit? FWIW, I agree with Paolo and others, specifying the exact name+model is little more than advertising.

https://lore.kernel.org/all/[email protected]

Thanks for the link. I'll catch up on the thread and track it. If Linux decides to go another direction then I'm happy to follow it with corresponding checkpatch patches.

Thanks,
drew