Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14179692pxu; Mon, 4 Jan 2021 15:20:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRkak6zM9x58TLs2UN8z6FYaZo6ORqq90B6VDrHVdTgTn9+Zzgox3zJGi0FfkoQMQZahe1 X-Received: by 2002:a05:6402:50cf:: with SMTP id h15mr63952785edb.149.1609802443169; Mon, 04 Jan 2021 15:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609802443; cv=none; d=google.com; s=arc-20160816; b=nCtO37jc4eBFdYu/kUHb1rhFjf85vIkManDCtiGoRe4B83aOM3fUEH/c4lWun3ToCZ WH39poxDbQ9+txRlQwTB90lF3/EoR1Tz2nmjerfoeU0EVVcVOOQYoiD5qShT8lIVJKnt J4UOT5cgSyUEwGzIBsIYzzlBf8FGJVNNJVlldNHJcqOQxve4+5qllF36iSdtM3diQqR/ 4WreK8n4KcE3jSVJjJQef2KsW/Yia1JRHJqOPwqrsRG1PNodSvV7LBRxkgJmlyfdDKRm xrzJF2sxsSKuruAVx10dCvIwKFyM715ok/ZCz/50uJR3X9LE91DG6aWC/C4kjzuEFTis 06rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature:dkim-filter; bh=vr4+/CdkTwvjIbxz7/3OOQr7VIBAjm5rmXtBg8jiavA=; b=OE884Pg2xeyw/kIOqKHTSEZNZkf2fMJW7iEBBFozCPMTnRzFzASZ21ZH3BxAhsuxN1 dWgcn8qqUp4/j2vZPmezl2C/VK2Is639ZcJhBOy9yM89+vfMgIypGWynbPvBEZlAzlFE hiYEyxoNo97I/eQxejzGK4goNQc72Eq+7QZ3B4jy92Cg4qb95R4TZHCMxVCUxIcPrCLB y5q7dqyBfynM04rb+HjkvBlabjB8CmVBRGV0y42uX7dMFoq+M1wNO+QHTgf2I5YIzWEi 2ttp5qNAc257ABKBWKr+6ydnkiyCgyP/ynrteGqPci4GHQaXGUWMSC4JCWP87aVTL9UP BJqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=cq4scu1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si28450759ejz.602.2021.01.04.15.20.19; Mon, 04 Jan 2021 15:20:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=cq4scu1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbhADXTz (ORCPT + 99 others); Mon, 4 Jan 2021 18:19:55 -0500 Received: from ms.lwn.net ([45.79.88.28]:39968 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727089AbhADXTw (ORCPT ); Mon, 4 Jan 2021 18:19:52 -0500 Received: from lwn.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 2E9DD299; Mon, 4 Jan 2021 23:19:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 2E9DD299 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1609802352; bh=vr4+/CdkTwvjIbxz7/3OOQr7VIBAjm5rmXtBg8jiavA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cq4scu1DWbN+bNnjv3eReCO9RkAbn4s+Ni4OX4Shab2/15832BuWrMDQV/m02mLFF UqeV2jtIbT+bptFSM/x7auYcISciC2vwBB+AZ3tzEqYNwdWcBEIqfhI5PhOO9d803q UbxY/dLdUNWAV5f2kJPG1pBSJVtsYDw85/CrNwFBNBMFghhg/uLapuCG+X9Qj0fud2 u/ypYpAV+hOWSF6WQ4eqnVfY8Qnr7kdOOxhqx9AhpPuM+5+XvJMgBq3JqaJpLcNSDB JM03f8fK1MNeZrC6qhoN+o8UdqesaGjdk+WlWXTJuExoca5eur+ggwEvlo4VlAxE5p PVfJe6RxTss9g== Date: Mon, 4 Jan 2021 16:19:11 -0700 From: Jonathan Corbet To: Borislav Petkov Cc: x86-ml , lkml Subject: Re: [PATCH] Documentation/submitting-patches: Add blurb about backtraces in commit messages Message-ID: <20210104161911.38eb3e1e@lwn.net> In-Reply-To: <20201222130555.GA13463@zn.tnic> References: <20201217183756.GE23634@zn.tnic> <20201221095425.6da68163@lwn.net> <20201222130555.GA13463@zn.tnic> Organization: LWN.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Digging out from under the pile of mail...] > From: Borislav Petkov > Date: Tue, 22 Dec 2020 13:58:22 +0100 > > Document that backtraces in commit messages should be trimmed down to > the useful information only. > > This has been carved out from a tip subsystem handbook patchset by > Thomas Gleixner: > > https://lkml.kernel.org/r/20181107171010.421878737@linutronix.de > > and incorporates follow-on comments. > > Signed-off-by: Borislav Petkov > --- > Documentation/process/submitting-patches.rst | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst > index 5ba54120bef7..0ffb21366381 100644 > --- a/Documentation/process/submitting-patches.rst > +++ b/Documentation/process/submitting-patches.rst > @@ -679,6 +679,26 @@ generates appropriate diffstats by default.) > See more details on the proper patch format in the following > references. > > +Backtraces in commit mesages > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > + > +Backtraces help document the call chain leading to a problem. However, > +not all backtraces are helpful. For example, early boot call chains are > +unique and obvious. Copying the full dmesg output verbatim, however, > +adds distracting information like timestamps, module lists, register and > +stack dumps. > + > +Therefore, the most useful backtraces should distill the relevant > +information from the dump, which makes it easier to focus on the real > +issue. Here is an example of a well-trimmed backtrace:: > + > + unchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064) > + at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20) > + Call Trace: > + mba_wrmsr > + update_domains > + rdtgroup_mkdir > + So I have some questions, I guess... How often is a backtrace *in a commit message* really helpful at all? The value in problem reports is clear, but I'm not sure how often having a backtrace in a commit message will really help the reader understand why the patch was written. But perhaps I'm wrong? If we do want this advice in our already-too-long submitting-patches document, we should perhaps give some advice as to what is "relevant information" and what is not? Thanks, jon