AI assistance when contributing to the Linux kernel
Key point
This summarizes the principles for licensing, signing, and attribution when AI helps with Linux kernel contributions.
Details
Even when using AI tools, Linux kernel contributions must follow the existing development process as is.
Documentation/process/development-process.rstDocumentation/process/coding-style.rstDocumentation/process/submitting-patches.rst
Licensing and legal requirements are also strict.
- All code must be compatible with GPL-2.0-only.
- The appropriate SPDX license identifier must be used.
- Details follow
Documentation/process/license-rules.rst.
Most importantly, AI agents must not add a Signed-off-by tag. The DCO (Developer Certificate of Origin) can only be legally certified by a human, and the final submitter bears the following responsibilities.
- Directly review the AI-generated code.
- Verify that it meets the licensing requirements.
- Add their own Signed-off-by.
- Take responsibility for the entire contribution.
When AI tools are used, adding an Assisted-by tag is recommended. The format is as follows.
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
Here, AGENT_NAME is the name of the AI tool or framework, and MODEL_VERSION is the model version used. Specialized tools like coccinelle, sparse, smatch, and clang-tidy can be listed, but basic development tools like git, gcc, make, and editors are not listed.
Example:
Assisted-by: Claude:claude-3-opus coccinelle sparse