Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2ba00b2
README: Fix spelling/capitalization
toblux Feb 7, 2024
aa3453e
README: Fix spelling
Mar 13, 2024
c92d57a
README: restructure with role-based documentation and guidelines
Nov 21, 2025
0609480
docs: add AI Coding Assistants documentation
Dec 23, 2025
2d9b314
checkpatch: check return of `git_commit_info`
tamird Dec 4, 2024
95aaf57
checkpatch: describe --min-conf-desc-length
pmhahn Mar 10, 2025
bff9d6d
checkpatch: check for comment explaining rgmii(|-rxid|-txid) PHY modes
tq-schiffern Jun 24, 2025
89d86fa
checkpatch: use utf-8 match for spell checking
AntonioBorneo Jun 16, 2025
89f473f
checkpatch: check for missing sentinels in ID arrays
computersforpeace Jul 2, 2025
ab4cf37
checkpatch: allow http links of any length in commit logs
JoePerches Aug 10, 2025
5b027ab
checkpatch: suppress strscpy warnings for userspace tools
suchit07-git Sep 23, 2025
d884834
checkpatch: detect unhandled placeholders in cover letters
onur-ozkan Sep 17, 2025
0895f91
checkpatch: add IDR to the deprecated list
00xc Oct 31, 2025
06fa3e7
checkpatch: add uninitialized pointer with __free attribute check
aheev Dec 3, 2025
c9be71f
checkpatch: Warn about context_unsafe() without comment
melver Dec 19, 2025
99318fc
checkpatch: Suggest kmalloc_obj family for sizeof allocations
kees Dec 3, 2025
c505843
checkpatch: special-case cacheline group macros
mstsirkin Jan 5, 2026
8fbcb97
checkpatch: add an invalid patch separator test
JoePerches Jan 16, 2026
695bb36
checkpatch: Fix false DT_SPLIT_BINDING_PATCH warnings
robherring Jan 21, 2026
2233786
checkpatch: don't complain on _Generic() use
pkitszel Dec 16, 2024
d134324
Align git commit ID abbreviation guidelines and checks
geertu Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Documentation/dev-tools/checkpatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,15 @@ Comments

See: https://lore.kernel.org/lkml/20131006222342.GT19510@leaf/

**UNCOMMENTED_RGMII_MODE**
Historically, the RGMII PHY modes specified in Device Trees have been
used inconsistently, often referring to the usage of delays on the PHY
side rather than describing the board.

PHY modes "rgmii", "rgmii-rxid" and "rgmii-txid" modes require the clock
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Duplicated word "modes" in the RGMII PHY modes sentence

The phrase "PHY modes 'rgmii', 'rgmii-rxid' and 'rgmii-txid' modes" repeats "modes". Please drop the second occurrence, e.g. "PHY modes 'rgmii', 'rgmii-rxid' and 'rgmii-txid' require the clock".

Suggested change
PHY modes "rgmii", "rgmii-rxid" and "rgmii-txid" modes require the clock
PHY modes "rgmii", "rgmii-rxid" and "rgmii-txid" require the clock

signal to be delayed on the PCB; this unusual configuration should be
described in a comment. If they are not (meaning that the delay is realized
internally in the MAC or PHY), "rgmii-id" is the correct PHY mode.

Commit message
--------------
Expand Down Expand Up @@ -619,6 +628,11 @@ Commit message

See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes

**BAD_COMMIT_SEPARATOR**
The commit separator is a single line with 3 dashes.
The regex match is '^---$'
Lines that start with 3 dashes and have more content on the same line
Comment on lines +633 to +634
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Missing punctuation between two sentences in BAD_COMMIT_SEPARATOR description

"The regex match is '^---$'" runs directly into "Lines that start with 3 dashes..." without punctuation. Please add a period after the closing quote or rephrase to "The regex matches '^---$'."

Suggested implementation:

    The regex matches '^---$'.

The snippet you provided doesn't show the "The regex match is '^---$'" line or the following "Lines that start with 3 dashes..." line, so you'll need to ensure this search string matches exactly what is in your file (indentation, spacing, and quoting). If the actual text differs (for example different quotes, extra spaces, or punctuation), adjust the SEARCH string accordingly while keeping the REPLACE text as suggested.

may confuse tools that apply patches.

Comparison style
----------------
Expand Down Expand Up @@ -1006,6 +1020,29 @@ Functions and Variables

return bar;

**UNINITIALIZED_PTR_WITH_FREE**
Pointers with __free attribute should be declared at the place of use
Comment on lines +1023 to +1024
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Missing article before "__free attribute"

For correct grammar, use: "Pointers with the __free attribute should be declared at the place of use..."

Suggested change
**UNINITIALIZED_PTR_WITH_FREE**
Pointers with __free attribute should be declared at the place of use
**UNINITIALIZED_PTR_WITH_FREE**
Pointers with the __free attribute should be declared at the place of use

and initialized (see include/linux/cleanup.h). In this case
declarations at the top of the function rule can be relaxed. Not doing
so may lead to undefined behavior as the memory assigned (garbage,
in case not initialized) to the pointer is freed automatically when
the pointer goes out of scope.

Also see: https://lore.kernel.org/lkml/58fd478f408a34b578ee8d949c5c4b4da4d4f41d.camel@HansenPartnership.com/

Example::

type var __free(free_func);
... // var not used, but, in future someone might add a return here
var = malloc(var_size);
...

should be initialized as::

...
type var __free(free_func) = malloc(var_size);
...


Permissions
-----------
Expand Down
59 changes: 59 additions & 0 deletions Documentation/process/coding-assistants.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.. SPDX-License-Identifier: GPL-2.0

.. _coding_assistants:

AI Coding Assistants
++++++++++++++++++++

This document provides guidance for AI tools and developers using AI
assistance when contributing to the Linux kernel.

AI tools helping with Linux kernel development should follow the standard
kernel development process:

* Documentation/process/development-process.rst
* Documentation/process/coding-style.rst
* Documentation/process/submitting-patches.rst

Licensing and Legal Requirements
================================

All contributions must comply with the kernel's licensing requirements:

* All code must be compatible with GPL-2.0-only
* Use appropriate SPDX license identifiers
* See Documentation/process/license-rules.rst for details

Signed-off-by and Developer Certificate of Origin
=================================================

AI agents MUST NOT add Signed-off-by tags. Only humans can legally
certify the Developer Certificate of Origin (DCO). The human submitter
is responsible for:

* Reviewing all AI-generated code
* Ensuring compliance with licensing requirements
* Adding their own Signed-off-by tag to certify the DCO
* Taking full responsibility for the contribution

Attribution
===========

When AI tools contribute to kernel development, proper attribution
helps track the evolving role of AI in the development process.
Contributions should include an Assisted-by tag in the following format::

Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]

Comment on lines +42 to +47
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented Assisted-by: format/example does not include a Name <email> identity. In this tree, scripts/checkpatch.pl treats any *-by: tag as a signature and will error out with “Unrecognized email address” when the text after the tag is not parseable as an email identity (see scripts/checkpatch.pl around the signature-style checks). Please adjust the documented format to include a valid email identity (or use a different tag name that doesn’t match *-by: / update checkpatch to explicitly accept the intended format).

Copilot uses AI. Check for mistakes.
Where:

* ``AGENT_NAME`` is the name of the AI tool or framework
* ``MODEL_VERSION`` is the specific model version used
* ``[TOOL1] [TOOL2]`` are optional specialized analysis tools used
Comment on lines +46 to +52
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Assisted-by: format line uses [TOOL1] [TOOL2] (square brackets), but the example omits brackets. If the brackets are meant to indicate optional items (not literal characters), consider switching to a placeholder style that can’t be mistaken for part of the actual tag value and keep the format line and example consistent for tooling that will parse it.

Suggested change
Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]
Where:
* ``AGENT_NAME`` is the name of the AI tool or framework
* ``MODEL_VERSION`` is the specific model version used
* ``[TOOL1] [TOOL2]`` are optional specialized analysis tools used
Assisted-by: AGENT_NAME:MODEL_VERSION <TOOL1> <TOOL2> ...
Where:
* ``AGENT_NAME`` is the name of the AI tool or framework
* ``MODEL_VERSION`` is the specific model version used
* ``<TOOL1> <TOOL2> ...`` are optional specialized analysis tools used

Copilot uses AI. Check for mistakes.
(e.g., coccinelle, sparse, smatch, clang-tidy)

Basic development tools (git, gcc, make, editors) should not be listed.

Example::

Assisted-by: Claude:claude-3-opus coccinelle sparse
1 change: 1 addition & 0 deletions Documentation/process/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Other guides to the community that are of interest to most developers are:
maintainers
researcher-guidelines
contribution-maturity-model
coding-assistants

These are some overall technical guides that have been put here for now for
lack of a better place.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/process/maintainer-tip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Ordering of commit tags
To have a uniform view of the commit tags, the tip maintainers use the
following tag ordering scheme:

- Fixes: 12char-SHA1 ("sub/sys: Original subject line")
- Fixes: 12+char-SHA1 ("sub/sys: Original subject line")

A Fixes tag should be added even for changes which do not need to be
backported to stable kernels, i.e. when addressing a recently introduced
Expand Down
8 changes: 4 additions & 4 deletions Documentation/process/submitting-patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ also track such tags and take certain actions. Private bug trackers and
invalid URLs are forbidden.

If your patch fixes a bug in a specific commit, e.g. you found an issue using
``git bisect``, please use the 'Fixes:' tag with the first 12 characters of
the SHA-1 ID, and the one line summary. Do not split the tag across multiple
lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
parsing scripts. For example::
``git bisect``, please use the 'Fixes:' tag with at least the first 12
characters of the SHA-1 ID, and the one line summary. Do not split the tag
across multiple lines, tags are exempt from the "wrap at 75 columns" rule in
order to simplify parsing scripts. For example::

Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")

Expand Down
172 changes: 161 additions & 11 deletions README
Original file line number Diff line number Diff line change
@@ -1,18 +1,168 @@
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
The Linux kernel is the core of any Linux operating system. It manages hardware,
system resources, and provides the fundamental services for all other software.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
Quick Start
-----------

https://www.kernel.org/doc/html/latest/
* Report a bug: See Documentation/admin-guide/reporting-issues.rst
* Get the latest kernel: https://kernel.org
* Build the kernel: See Documentation/admin-guide/quickly-build-trimmed-linux.rst
* Join the community: https://lore.kernel.org/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
Essential Documentation
-----------------------

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
All users should be familiar with:

* Building requirements: Documentation/process/changes.rst
* Code of Conduct: Documentation/process/code-of-conduct.rst
* License: See COPYING

Documentation can be built with make htmldocs or viewed online at:
https://www.kernel.org/doc/html/latest/


Who Are You?
============

Find your role below:

* New Kernel Developer - Getting started with kernel development
* Academic Researcher - Studying kernel internals and architecture
* Security Expert - Hardening and vulnerability analysis
* Backport/Maintenance Engineer - Maintaining stable kernels
* System Administrator - Configuring and troubleshooting
* Maintainer - Leading subsystems and reviewing patches
* Hardware Vendor - Writing drivers for new hardware
* Distribution Maintainer - Packaging kernels for distros
* AI Coding Assistant - LLMs and AI-powered development tools


For Specific Users
==================

New Kernel Developer
--------------------

Welcome! Start your kernel development journey here:

* Getting Started: Documentation/process/development-process.rst
* Your First Patch: Documentation/process/submitting-patches.rst
* Coding Style: Documentation/process/coding-style.rst
* Build System: Documentation/kbuild/index.rst
* Development Tools: Documentation/dev-tools/index.rst
* Kernel Hacking Guide: Documentation/kernel-hacking/hacking.rst
* Core APIs: Documentation/core-api/index.rst

Academic Researcher
-------------------

Explore the kernel's architecture and internals:

* Researcher Guidelines: Documentation/process/researcher-guidelines.rst
* Memory Management: Documentation/mm/index.rst
* Scheduler: Documentation/scheduler/index.rst
* Networking Stack: Documentation/networking/index.rst
* Filesystems: Documentation/filesystems/index.rst
* RCU (Read-Copy Update): Documentation/RCU/index.rst
* Locking Primitives: Documentation/locking/index.rst
* Power Management: Documentation/power/index.rst

Security Expert
---------------

Security documentation and hardening guides:

* Security Documentation: Documentation/security/index.rst
* LSM Development: Documentation/security/lsm-development.rst
* Self Protection: Documentation/security/self-protection.rst
* Reporting Vulnerabilities: Documentation/process/security-bugs.rst
* CVE Procedures: Documentation/process/cve.rst
* Embargoed Hardware Issues: Documentation/process/embargoed-hardware-issues.rst
* Security Features: Documentation/userspace-api/seccomp_filter.rst

Backport/Maintenance Engineer
-----------------------------

Maintain and stabilize kernel versions:

* Stable Kernel Rules: Documentation/process/stable-kernel-rules.rst
* Backporting Guide: Documentation/process/backporting.rst
* Applying Patches: Documentation/process/applying-patches.rst
* Subsystem Profile: Documentation/maintainer/maintainer-entry-profile.rst
* Git for Maintainers: Documentation/maintainer/configure-git.rst

System Administrator
--------------------

Configure, tune, and troubleshoot Linux systems:

* Admin Guide: Documentation/admin-guide/index.rst
* Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst
* Sysctl Tuning: Documentation/admin-guide/sysctl/index.rst
* Tracing/Debugging: Documentation/trace/index.rst
* Performance Security: Documentation/admin-guide/perf-security.rst
* Hardware Monitoring: Documentation/hwmon/index.rst

Maintainer
----------

Lead kernel subsystems and manage contributions:

* Maintainer Handbook: Documentation/maintainer/index.rst
* Pull Requests: Documentation/maintainer/pull-requests.rst
* Managing Patches: Documentation/maintainer/modifying-patches.rst
* Rebasing and Merging: Documentation/maintainer/rebasing-and-merging.rst
* Development Process: Documentation/process/maintainer-handbooks.rst
* Maintainer Entry Profile: Documentation/maintainer/maintainer-entry-profile.rst
* Git Configuration: Documentation/maintainer/configure-git.rst

Hardware Vendor
---------------

Write drivers and support new hardware:

* Driver API Guide: Documentation/driver-api/index.rst
* Driver Model: Documentation/driver-api/driver-model/driver.rst
* Device Drivers: Documentation/driver-api/infrastructure.rst
* Bus Types: Documentation/driver-api/driver-model/bus.rst
* Device Tree Bindings: Documentation/devicetree/bindings/
* Power Management: Documentation/driver-api/pm/index.rst
* DMA API: Documentation/core-api/dma-api.rst

Distribution Maintainer
-----------------------

Package and distribute the kernel:

* Stable Kernel Rules: Documentation/process/stable-kernel-rules.rst
* ABI Documentation: Documentation/ABI/README
* Kernel Configuration: Documentation/kbuild/kconfig.rst
* Module Signing: Documentation/admin-guide/module-signing.rst
* Kernel Parameters: Documentation/admin-guide/kernel-parameters.rst
* Tainted Kernels: Documentation/admin-guide/tainted-kernels.rst

AI Coding Assistant
-------------------

CRITICAL: If you are an LLM or AI-powered coding assistant, you MUST read and
follow the AI coding assistants documentation before contributing to the Linux
kernel:

* Documentation/process/coding-assistants.rst

This documentation contains essential requirements about licensing, attribution,
and the Developer Certificate of Origin that all AI tools must comply with.


Communication and Support
=========================

* Mailing Lists: https://lore.kernel.org/
* IRC: #kernelnewbies on irc.oftc.net
* Bugzilla: https://bugzilla.kernel.org/
* MAINTAINERS file: Lists subsystem maintainers and mailing lists
* Email Clients: Documentation/process/email-clients.rst
Loading
Loading