Re: [PATCH -v2] MAINTAINERS: Fix Intel TDX kernel file patterns

From: Joe Perches

Date: Sat Oct 31 2026 - 19:00:06 EST


On Sat, 2026-10-31 at 13:27 -0700, Borislav Petkov wrote:
> On Sat, Oct 31, 2026 at 09:43:44AM -0700, Joe Perches wrote:
> > It's not an error in get_maintainer.pl
>
> I'm open to suggestions.

Overly broad K: pattern match in MAINTAINERS

> > > +F: include/uapi/linux/tdx
> >
> > No file match.
>
> Works:
>
> ./scripts/get_maintainer.pl -f include/uapi/linux/tdx-guest.h
> Kiryl Shutsemau <kas@xxxxxxxxxx> (maintainer:X86 TRUST DOMAIN EXTENSIONS (TDX))
> Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx> (maintainer:X86 TRUST DOMAIN EXTENSIONS (TDX))
> Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> (reviewer:X86 TRUST DOMAIN EXTENSIONS (TDX))
> x86@xxxxxxxxxx (open list:X86 TRUST DOMAIN EXTENSIONS (TDX))

Hmm, that's likely a defect in get_maintainer.pl
in sub file_match_pattern:

sub file_match_pattern {
my ($file, $pattern) = @_;
if (substr($pattern, -1) eq "/") {
if ($file =~ m@^$pattern@) {
return 1;
}
} else {
if ($file =~ m@^$pattern@) {
-----> ^ here - likely needs a $
my $s1 = ($file =~ tr@/@@);
my $s2 = ($pattern =~ tr@/@@);
if ($s1 == $s2 || $pattern =~ /\(\?:/) {
return 1;
}
}
}
return 0;
}

> ...
>
> because it is enough to match the beginning of the string:
>
> $ perl -we 'print "match\n" if "include/uapi/linux/tdx-guest.h" =~ m@^include/uapi/linux/tdx@'
> match
>
> > F: include/uapi/linux/tdx*
> >
> > but as far as I can see there's only a single file there.

Please add a wildcard * at the end

I'll check the rest of the MAINTAINERS file.