From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40A672EBBB2 for ; Mon, 10 Nov 2025 07:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762760597; cv=none; b=fBdU/6z00gc7UgnbUJ8c30Pt11xTB4PpCt9nB3steoQaw5/h0o/9d7Q/CV+eaowICi0evHcJzq3/O/uZ1JOkxtOhUjaUBDwJtRxb4tCrtPI3AMVGARb2pDQbv9Ig9vujcavg40KhKFR2JzgxIf1c8mt4TAhHMmkVvb4cNnPwY84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762760597; c=relaxed/simple; bh=iRgxF74pSDllyNceSk0Y+nYVhfISX9nrHx4DljVu3F4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=S3uOukilDgLNv1sxj3UMffze39XrhmEjnpqfboG5qBoD3+4jZFhXL5XK+I1TmsTRMRqZdUkug80i+MoykUTD543GJLM6ayAeLqYrQTt0iBV8rtVyRwMfuz8ZJOatZ2p16VVaBFmcIgjme4PjI0x7Lga69norB2ncB+SRfAODlLE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=h4yBVQ1T; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=LZ6Jjbht; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=h4yBVQ1T; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=LZ6Jjbht; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="h4yBVQ1T"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="LZ6Jjbht"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="h4yBVQ1T"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="LZ6Jjbht" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AA86F21F14; Mon, 10 Nov 2025 07:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1762760586; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=giuqhuuqG+QnIVQ3YzEAFITvKwa3juCrRFuQXKXglaw=; b=h4yBVQ1TjH6jhUl7+T3ruZyl5SlonDEmVqAqlY5SLAnkorPaavyUsPFX2YgBE3Ln7pHLCv htuzCQ7zpaGVJG4S/2qITMtYJoFJZxQqwtuu07xBEF3iKWXg8xYYYC7xhWvZ3jdLInqMyB D4cNKW/rkmDthhD9jdM0cpGoqdHGbrc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1762760586; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=giuqhuuqG+QnIVQ3YzEAFITvKwa3juCrRFuQXKXglaw=; b=LZ6JjbhtkkAB8N5khVX9YS5y/fLTjIAzbizJyyFCEP/b9TpMIB1IuMsMsoICNmCaOxf1L+ YmovjV9kZktu2yCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1762760586; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=giuqhuuqG+QnIVQ3YzEAFITvKwa3juCrRFuQXKXglaw=; b=h4yBVQ1TjH6jhUl7+T3ruZyl5SlonDEmVqAqlY5SLAnkorPaavyUsPFX2YgBE3Ln7pHLCv htuzCQ7zpaGVJG4S/2qITMtYJoFJZxQqwtuu07xBEF3iKWXg8xYYYC7xhWvZ3jdLInqMyB D4cNKW/rkmDthhD9jdM0cpGoqdHGbrc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1762760586; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=giuqhuuqG+QnIVQ3YzEAFITvKwa3juCrRFuQXKXglaw=; b=LZ6JjbhtkkAB8N5khVX9YS5y/fLTjIAzbizJyyFCEP/b9TpMIB1IuMsMsoICNmCaOxf1L+ YmovjV9kZktu2yCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 821B613B85; Mon, 10 Nov 2025 07:43:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id nvFwH4qXEWmgAQAAD6G6ig (envelope-from ); Mon, 10 Nov 2025 07:43:06 +0000 Message-ID: <653b4187-ec4f-4f5d-ae76-d37f46070cb4@suse.cz> Date: Mon, 10 Nov 2025 08:43:06 +0100 Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [v2] Documentation: Provide guidelines for tool-generated content To: Dave Hansen , linux-kernel@vger.kernel.org, "workflows@vger.kernel.org" , "ksummit@lists.linux.dev" Cc: Steven Rostedt , Dan Williams , Theodore Ts'o , Sasha Levin , Jonathan Corbet , Kees Cook , Greg Kroah-Hartman , Miguel Ojeda , Shuah Khan References: <20251105231514.3167738-1-dave.hansen@linux.intel.com> Content-Language: en-US From: Vlastimil Babka Autocrypt: addr=vbabka@suse.cz; keydata= xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB 87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+ 9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4 8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc LM4S7mT25NE5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QORSWTLRg== In-Reply-To: <20251105231514.3167738-1-dave.hansen@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWELVE(0.00)[13]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:mid,imap1.dmz-prg2.suse.org:helo,intel.com:email] X-Spam-Flag: NO X-Spam-Score: -4.30 +Cc ksummit (where the discussions about this topic happened recently) and workflows (probably the closest list we have for such things in general) because nobody reads lkml today and this seems to have been going under the radar until mentioned at lwn yesterday On 11/6/25 00:15, Dave Hansen wrote: > In the last few years, the capabilities of coding tools have exploded. > As those capabilities have expanded, contributors and maintainers have > more and more questions about how and when to apply those > capabilities. > > The shiny new AI tools (chatbots, coding assistants and more) are > impressive. Add new Documentation to guide contributors on how to > best use kernel development tools, new and old. > > Note, though, there are fundamentally no new or unique rules in this > new document. It clarifies expectations that the kernel community has > had for many years. For example, researchers are already asked to > disclose the tools they use to find issues in > Documentation/process/researcher-guidelines.rst. This new document > just reiterates existing best practices for development tooling. > > In short: Please show your work and make sure your contribution is > easy to review. > > Signed-off-by: Dave Hansen > Cc: Steven Rostedt > Cc: Dan Williams > Cc: Theodore Ts'o > Cc: Sasha Levin > Cc: Jonathan Corbet > Cc: Kees Cook > Cc: Greg Kroah-Hartman > Cc: Miguel Ojeda > Cc: Shuah Khan > > -- > > This document was a collaborative effort from all the members of > the TAB. I just reformatted it into .rst and wrote the changelog. > > Changes from v1: > * Rename to generated-content.rst and add to documentation index. > (Jon) > * Rework subject to align with the new filename > * Replace commercial names with generic ones. (Jon) > * Be consistent about punctuation at the end of bullets for whole > sentences. (Miguel) > * Formatting sprucing up and minor typos (Miguel) > --- > Documentation/process/generated-content.rst | 94 +++++++++++++++++++++ > Documentation/process/index.rst | 1 + > 2 files changed, 95 insertions(+) > create mode 100644 Documentation/process/generated-content.rst > > diff --git a/Documentation/process/generated-content.rst b/Documentation/process/generated-content.rst > new file mode 100644 > index 0000000000000..5e8ff44190932 > --- /dev/null > +++ b/Documentation/process/generated-content.rst > @@ -0,0 +1,94 @@ > +============================================ > +Kernel Guidelines for Tool Generated Content > +============================================ > + > +Purpose > +======= > + > +Kernel contributors have been using tooling to generate contributions > +for a long time. These tools are constantly becoming more capable and > +undoubtedly improve developer productivity. At the same time, reviewer > +and maintainer bandwidth is a very scarce resource. Understanding > +which portions of a contribution come from humans versus tools is > +critical to maintain those resources and keep kernel development > +healthy. > + > +The goal here is to clarify community expectations around tools. This > +lets everyone become more productive while also maintaining high > +degrees of trust between submitters and reviewers. > + > +Out of Scope > +============ > + > +These guidelines do not apply to tools that make trivial tweaks to > +preexisting content. Nor do they pertain to AI tooling that helps with > +menial tasks. Some examples: > + > + - Spelling and grammar fix ups, like rephrasing to imperative voice > + - Typing aids like identifier completion, common boilerplate or > + trivial pattern completion > + - Purely mechanical transformations like variable renaming > + - Reformatting, like running Lindent, ``clang-format`` or > + ``rust-fmt`` > + > +Even if your tool use is out of scope you should still always consider > +if it would help reviewing your contribution if the reviewer knows > +about the tool that you used. > + > +In Scope > +======== > + > +These guidelines apply when a meaningful amount of content in a kernel > +contribution was not written by a person in the Signed-off-by chain, > +but was instead created by a tool. > + > +Detection of a problem is also a part of the development process; if a > +tool was used to find a problem addressed by a change, that should be > +noted in the changelog. This not only gives credit where it is due, it > +also helps fellow developers find out about these tools. > + > +Some examples: > + - Any tool-suggested fix such as ``checkpatch.pl --fix`` > + - Coccinelle scripts > + - A chatbot generated a new function in your patch to sort list entries. > + - A .c file in the patch was originally generated by a LLM but cleaned > + up by hand. > + - The changelog was generated by handing the patch to a generative AI > + tool and asking it to write the changelog. > + - The changelog was translated from another language. > + > +If in doubt, choose transparency and assume these guidelines apply to > +your contribution. > + > +Guidelines > +========== > + > +First, read the Developer's Certificate of Origin: > +Documentation/process/submitting-patches.rst . Its rules are simple > +and have been in place for a long time. They have covered many > +tool-generated contributions. > + > +Second, when making a contribution, be transparent about the origin of > +content in cover letters and changelogs. You can be more transparent > +by adding information like this: > + > + - What tools were used? > + - The input to the tools you used, like the coccinelle source script. > + - If code was largely generated from a single or short set of > + prompts, include those prompts in the commit log. For longer > + sessions, include a summary of the prompts and the nature of > + resulting assistance. > + - Which portions of the content were affected by that tool? > + > +As with all contributions, individual maintainers have discretion to > +choose how they handle the contribution. For example, they might: > + > + - Treat it just like any other contribution > + - Reject it outright > + - Review the contribution with extra scrutiny > + - Suggest a better prompt instead of suggesting specific code changes > + - Ask for some other special steps, like asking the contributor to > + elaborate on how the tool or model was trained > + - Ask the submitter to explain in more detail about the contribution > + so that the maintainer can feel comfortable that the submitter fully > + understands how the code works. > diff --git a/Documentation/process/index.rst b/Documentation/process/index.rst > index aa12f26601949..e1a8a31389f53 100644 > --- a/Documentation/process/index.rst > +++ b/Documentation/process/index.rst > @@ -68,6 +68,7 @@ beyond). > stable-kernel-rules > management-style > researcher-guidelines > + generated-content > > Dealing with bugs > -----------------