Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4501194pxf; Tue, 23 Mar 2021 12:08:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKpV7DaA6giLqYnmCcHQgXYI7vwIueRcd7hEqPb0rrOT4cjWqgR+gjOCndDIQBHSi6GKfO X-Received: by 2002:a17:906:3849:: with SMTP id w9mr6379553ejc.7.1616526498824; Tue, 23 Mar 2021 12:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616526498; cv=none; d=google.com; s=arc-20160816; b=B975n4NMqUy5rBVDO+pKnWimD/pUERYRVdvcEttUaqVrIYq/Fjv9Ugdsw9R2NdG6oD D4Mxhm6kQkRZugbJ1B4RnEqlJZaDeefPcD+/iKozGMaPsUsgbQfNsEeQWsg8MFlhZGkt TMB9/MaJ32n0O97oNuouxMYpyQ1tYeo0NG12viDJpz7bYN/2Gt/oIVsjTqs2iUOiTPQe /KudgAmOb4tTOZfoghxp//g8uHAYDg/kVgu02WaC7Nw0KmILmBq/CQClK97uYRCFrDfU b6oJmV/Pvy8eEYwwaACGGrPfnhI7XjxGsE7hmiJtQVD4RWwXZre9eJzdebyrNUFPB2t1 KocA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+mUZlbk1SNQRFx7xp0cfnuUvAGRRzYVPPJtMCElqBig=; b=RN4SZeUgzQJnS8nbWrC2TVASeHz8k8NLj17nh0jH++ezZjDaduDSgXKU3A3vRlD5pY BxwaJcDMaQKnkhoGlopTy1Cfkg4N/Y294QP6AU6c3vVo8tPzIiZVWzGtxXgPjrrgANNs JFD+s2LWSWUJ07NjEgx6+UHBPf4rKJPAG24+ZjC9x1o3k/jnjWK2scyZnW3gBCgfO90f cCCNdyng1ONULsxEj/XBZHeFOLpVUdcyR3zSeruhv2zKiM1A2FEKpA4ilivVr0CoWoLd IKu4UW7TvF2hM8GR1DUFY6Q4FFJt1zUwcoPJIx5GNwAchxZ5VpkEko5toJXyNp5c2VRM GFPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mTr0sTAz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc38si6905433ejc.362.2021.03.23.12.07.54; Tue, 23 Mar 2021 12:08:18 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=mTr0sTAz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233110AbhCWTFo (ORCPT + 99 others); Tue, 23 Mar 2021 15:05:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:58910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232374AbhCWTFY (ORCPT ); Tue, 23 Mar 2021 15:05:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AA89761574; Tue, 23 Mar 2021 19:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616526324; bh=Uhy2P2EqVs/4M/q2S01XoB6cn9gDfHkYiGACVvIbusE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mTr0sTAzSkrSLcwhAjnKCCQaPQzzLFBQUMFxKJQAb40E4SfN8+nKjBv5257LzLA0t M4lBUIWn7DgAHg1i49Lt8Of9rIURHKjGIhMdiJRNRGLtLPFGy+5d1pTCv84OFY5cGl cpeJ6aDsWwGlrok8NX6LjcrsFVjtt76f+p5D453Q= Date: Tue, 23 Mar 2021 20:05:21 +0100 From: Greg Kroah-Hartman To: Nick Desaulniers Cc: Sasha Levin , clang-built-linux , LKML , "# 3.4.x" Subject: Re: [PATCH] scripts: stable: add script to validate backports Message-ID: References: <20210316213136.1866983-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 23, 2021 at 11:52:26AM -0700, Nick Desaulniers wrote: > On Tue, Mar 23, 2021 at 6:56 AM Greg Kroah-Hartman > wrote: > > > > On Tue, Mar 16, 2021 at 02:31:33PM -0700, Nick Desaulniers wrote: > > > A common recurring mistake made when backporting patches to stable is > > > forgetting to check for additional commits tagged with `Fixes:`. This > > > script validates that local commits have a `commit upstream.` > > > line in their commit message, and whether any additional `Fixes:` shas > > > exist in the `master` branch but were not included. It can not know > > > about fixes yet to be discovered, or fixes sent to the mailing list but > > > not yet in mainline. > > > > > > To save time, it avoids checking all of `master`, stopping early once > > > we've reached the commit time of the earliest backport. It takes 0.5s to > > > validate 2 patches to linux-5.4.y when master is v5.12-rc3 and 5s to > > > validate 27 patches to linux-4.19.y. It does not recheck dependencies of > > > found fixes; the user is expected to run this script to a fixed point. > > > It depnds on pygit2 python library for working with git, which can be > > > installed via: > > > $ pip3 install pygit2 > > > > > > It's expected to be run from a stable tree with commits applied. For > > > example, consider 3cce9d44321e which is a fix for f77ac2e378be. Let's > > > say I cherry picked f77ac2e378be into linux-5.4.y but forgot > > > 3cce9d44321e (true story). If I ran: > > > > > > $ ./scripts/stable/check_backports.py > > > Checking 1 local commits for additional Fixes: in master > > > Please consider backporting 3cce9d44321e as a fix for f77ac2e378be > > > > While interesting, I don't use a git tree for the stable queue, so this > > doesn't really fit into my workflow, sorry. > > Well, what is your workflow? Look at the stable-queue.git tree. It's a set of quilt-managed patches on top of a solid base (i.e. the last released kernel version.). The only time git gets involved is when we do a -rc release or when we do a "real" release, and then we use 'git quiltimport' on the whole stack. Here's a script that I use (much too slow, I know), for checking this type of thing and I try to remember to run it before every cycle of -rc releases: https://github.com/gregkh/commit_tree/blob/master/find_fixes_in_queue It's a hack, and picks up more things than is really needed, but I would rather it error on that side than the other. thanks, greg k-h