Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scripts/get_abi: fix source path leak

The code currently leaks the absolute path of the ABI files into the
rendered documentation.

There exists code to prevent this, but it is not effective when an
absolute path is passed, which it is when $srctree is used.

I consider this to be a minimal, stop-gap fix; a better fix would strip
off the actual prefix instead of hacking it off with a regex.

Link: https://mastodon.social/@vegard/111677490643495163
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231231235959.3342928-1-vegard.nossum@oracle.com

authored by

Vegard Nossum and committed by
Jonathan Corbet
5889d6ed e49ad853

+1 -1
+1 -1
scripts/get_abi.pl
··· 98 98 $name =~ s,.*/,,; 99 99 100 100 my $fn = $file; 101 - $fn =~ s,Documentation/ABI/,,; 101 + $fn =~ s,.*Documentation/ABI/,,; 102 102 103 103 my $nametag = "File $fn"; 104 104 $data{$nametag}->{what} = "File $name";