[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1rNm0E6/I5y6K2a@google.com>
Date: Thu, 27 Oct 2022 18:27:39 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: David Matlack <dmatlack@...gle.com>
Cc: "Wang, Wei W" <wei.w.wang@...el.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"vipinsh@...gle.com" <vipinsh@...gle.com>,
"ajones@...tanamicro.com" <ajones@...tanamicro.com>,
"eric.auger@...hat.com" <eric.auger@...hat.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 00/18] KVM selftests code consolidation and cleanup
On Thu, Oct 27, 2022, David Matlack wrote:
> On Thu, Oct 27, 2022 at 8:44 AM Sean Christopherson <seanjc@...gle.com> wrote:
> > I like the idea in theory, but that'd be a daunting task to set up, and quite the
> > maintenance nightmare. There are probably thousands of file => scope mappings
> > throughout the kernel, with any number of exceptions and arbitrary rules.
>
> I was thinking about proposing this in checkpatch.pl, or in some
> KVM-specific check script. It seems like the following rule: If a
> commit only modifies files in tools/testing/selftests/kvm/*, then
> requires the shortlog match the regex "KVM: selftests: .*". That would
> handle the vast majority of cases without affecting other subsystems.
>
> Sean are you more concerned that if we start validating shortlogs in
> checkpatch.pl then eventually it will get too out of hand? (i.e. not
> so concerned with this specific case, but the general problem?)
Ya, the general problem. Hardcoding anything KVM specific in checkpatch.pl isn't
going to fly. The checkpatch maintainers most definitely don't want to take on
the burden of maintaining subsystem rules. Letting one subsystem add custom rules
effectively opens the flood gates to all subsystems adding custom rules. And from
a KVM perspective, I don't want to have to get an Acked-by from a checkpatch
maintiainer just to tweak a KVM rule.
The only somewhat feasible approach I can think of would be to provide a generic
"language" for shortlog scope rules, and have checkpatch look for a well-known
file in relevant directories, e.g. add arch/x86/kvm/SCOPES or whatever. But even
that is a non-trivial problem to solve, as it means coming up with a "language"
that has a reasonable chance of working for many subsystems without generating too
many false positives.
It's definitely doable, and likely not actually a maintenance nightmare (I wrote
that thinking of modifying a common rules file). But it's still fairly daunting
as getting buy-in on something that affects the kernel at large tends to be easier
said then done. Then again, I'm probably being pessimistic due to my sub-par
regex+scripting skills :-)
Powered by blists - more mailing lists