/usr/src/kernels/4.18.0-553.121.1.el8_10.x86_64/scripts
NameSizeModeActions
basic/-0755rm
clang-tools/-0755rm
coccinelle/-0755rm
dtc/-0755rm
gcc-plugins/-0755rm
gdb/-0755rm
genksyms/-0755rm
kconfig/-0755rm
ksymoops/-0755rm
mod/-0755rm
package/-0755rm
selinux/-0755rm
adjust_autoksyms.sh30100755editdlrm
asn1_compiler280080755editdlrm
asn1_compiler.c363910644editdlrm
bin2c70240755editdlrm
bin2c.c7430644editdlrm
bloat-o-meter33130755editdlrm
bootgraph.pl64260755editdlrm
bpf_doc.py255150755editdlrm
cc-can-link.sh1660755editdlrm
checkincludes.pl19840755editdlrm
checkkconfigsymbols.py158950755editdlrm
checkpatch.pl1971860755editdlrm
checkstack.pl53030755editdlrm
checksyscalls.sh70940755editdlrm
checkversion.pl19380755editdlrm
check_00index.sh13330755editdlrm
check_extable.sh50490755editdlrm
clang-version.sh6350755editdlrm
cleanfile35380755editdlrm
cleanpatch51780755editdlrm
coccicheck74070755editdlrm
config46350755editdlrm
conmakehash116160755editdlrm
conmakehash.c61280644editdlrm
const_structs.checkpatch9640644editdlrm
decodecode25250755editdlrm
decode_stacktrace.sh38340755editdlrm
depmod.sh11190755editdlrm
diffconfig38210755editdlrm
documentation-file-ref-check35480755editdlrm
export_report.pl46540755editdlrm
extract-cert116160755editdlrm
extract-cert.c35410644editdlrm
extract-ikconfig17340755editdlrm
extract-module-sig.pl37420755editdlrm
extract-sys-certs.pl38320755editdlrm
extract-vmlinux17250755editdlrm
extract_xc3028.pl456650755editdlrm
faddr2line63030755editdlrm
file-size.sh860755editdlrm
find-unused-docs.sh13100755editdlrm
gcc-goto.sh5300755editdlrm
gcc-ld7110755editdlrm
gcc-plugin.sh10900755editdlrm
gcc-version.sh8570755editdlrm
gcc-x86_32-has-stack-protector.sh1730755editdlrm
gcc-x86_64-has-stack-protector.sh1980755editdlrm
gen_initramfs_list.sh82240755editdlrm
get_dvb_firmware258240755editdlrm
get_maintainer.pl673690755editdlrm
gfp-translate17520755editdlrm
headerdep.pl35820755editdlrm
headers.sh5120755editdlrm
headers_check.pl38150755editdlrm
headers_install.sh13970755editdlrm
insert-sys-cert.c90840644editdlrm
kallsyms199920755editdlrm
kallsyms.c185800644editdlrm
Kbuild.include154680644editdlrm
Kconfig.include11730644editdlrm
kernel-doc625600755editdlrm
ld-version.sh2690755editdlrm
leaking_addresses.pl131600755editdlrm
Lindent5020755editdlrm
link-vmlinux.sh91760755editdlrm
Makefile17410644editdlrm
Makefile.asm-generic11930644editdlrm
Makefile.build197070644editdlrm
Makefile.clean28830644editdlrm
Makefile.dtbinst11160644editdlrm
Makefile.extrawarn27700644editdlrm
Makefile.gcc-plugins18610644editdlrm
Makefile.headersinst40790644editdlrm
Makefile.host65200644editdlrm
Makefile.kasan16790644editdlrm
Makefile.kcov3190644editdlrm
Makefile.kcsan1180644editdlrm
Makefile.lib155350644editdlrm
Makefile.modbuiltin17170644editdlrm
Makefile.modinst11490644editdlrm
Makefile.modpost54300644editdlrm
Makefile.modsign8970644editdlrm
Makefile.ubsan9510644editdlrm
makelst8080755editdlrm
markup_oops.pl82730755editdlrm
mkcompile_h26280755editdlrm
mkmakefile12180755editdlrm
mksysmap13590755editdlrm
mkuboot.sh4140755editdlrm
module-common.lds9010644editdlrm
modules.order00644editdlrm
namespace.pl133580755editdlrm
objdiff29170755editdlrm
parse-maintainers.pl46460755editdlrm
patch-kernel101850755editdlrm
pnmtologo157200755editdlrm
pnmtologo.c121970644editdlrm
profile2linkerlist.pl4100755editdlrm
prune-kernel7080755editdlrm
recordmcount240080755editdlrm
recordmcount.c170620644editdlrm
recordmcount.h167720644editdlrm
recordmcount.pl187090755editdlrm
setlocalversion40130755editdlrm
show_delta30760755editdlrm
sign-file157680755editdlrm
sign-file.c99940644editdlrm
sortextable157120755editdlrm
sortextable.c104110644editdlrm
sortextable.h56140644editdlrm
spelling.txt256110644editdlrm
sphinx-pre-install143780755editdlrm
split-man.pl6000755editdlrm
stackdelta18830755editdlrm
stackusage7940755editdlrm
subarch.include6410644editdlrm
tags.sh97890755editdlrm
test_fortify.sh22810644editdlrm
unifdef361920755editdlrm
unifdef.c356370644editdlrm
ver_linux27470755editdlrm
xen-hypercalls.sh3860644editdlrm
xz_wrap.sh5620755editdlrm
Edit: /usr/src/kernels/4.18.0-553.121.1.el8_10.x86_64/scripts/headers_check.pl (3815B)
#!/usr/bin/perl # SPDX-License-Identifier: GPL-2.0 # # headers_check.pl execute a number of trivial consistency checks # # Usage: headers_check.pl dir arch [files...] # dir: dir to look for included files # arch: architecture # files: list of files to check # # The script reads the supplied files line by line and: # # 1) for each include statement it checks if the # included file actually exists. # Only include files located in asm* and linux* are checked. # The rest are assumed to be system include files. # # 2) It is checked that prototypes does not use "extern" # # 3) Check for leaked CONFIG_ symbols use warnings; use strict; use File::Basename; my ($dir, $arch, @files) = @ARGV; my $ret = 0; my $line; my $lineno = 0; my $filename; foreach my $file (@files) { $filename = $file; open(my $fh, '<', $filename) or die "$filename: $!\n"; $lineno = 0; while ($line = <$fh>) { $lineno++; &check_include(); &check_asm_types(); &check_sizetypes(); &check_declarations(); # Dropped for now. Too much noise &check_config(); } close $fh; } exit $ret; sub check_include { if ($line =~ m/^\s*#\s*include\s+<((asm|linux).*)>/) { my $inc = $1; my $found; $found = stat($dir . "/" . $inc); if (!$found) { $inc =~ s#asm/#asm-$arch/#; $found = stat($dir . "/" . $inc); } if (!$found) { printf STDERR "$filename:$lineno: included file '$inc' is not exported\n"; $ret = 1; } } } sub check_declarations { # soundcard.h is what it is if ($line =~ m/^void seqbuf_dump\(void\);/) { return; } # drm headers are being C++ friendly if ($line =~ m/^extern "C"/) { return; } if ($line =~ m/^(\s*extern|unsigned|char|short|int|long|void)\b/) { printf STDERR "$filename:$lineno: " . "userspace cannot reference function or " . "variable defined in the kernel\n"; } } sub check_config { if ($line =~ m/[^a-zA-Z0-9_]+CONFIG_([a-zA-Z0-9_]+)[^a-zA-Z0-9_]/) { printf STDERR "$filename:$lineno: leaks CONFIG_$1 to userspace where it is not valid\n"; } } my $linux_asm_types; sub check_asm_types { if ($filename =~ /types.h|int-l64.h|int-ll64.h/o) { return; } if ($lineno == 1) { $linux_asm_types = 0; } elsif ($linux_asm_types >= 1) { return; } if ($line =~ m/^\s*#\s*include\s+/) { $linux_asm_types = 1; printf STDERR "$filename:$lineno: " . "include of is preferred over \n" # Warn until headers are all fixed #$ret = 1; } } my $linux_types; my %import_stack = (); sub check_include_typesh { my $path = $_[0]; my $import_path; my $fh; my @file_paths = ($path, $dir . "/" . $path, dirname($filename) . "/" . $path); for my $possible ( @file_paths ) { if (not $import_stack{$possible} and open($fh, '<', $possible)) { $import_path = $possible; $import_stack{$import_path} = 1; last; } } if (eof $fh) { return; } my $line; while ($line = <$fh>) { if ($line =~ m/^\s*#\s*include\s+/) { $linux_types = 1; last; } if (my $included = ($line =~ /^\s*#\s*include\s+[<"](\S+)[>"]/)[0]) { check_include_typesh($included); } } close $fh; delete $import_stack{$import_path}; } sub check_sizetypes { if ($filename =~ /types.h|int-l64.h|int-ll64.h/o) { return; } if ($lineno == 1) { $linux_types = 0; } elsif ($linux_types >= 1) { return; } if ($line =~ m/^\s*#\s*include\s+/) { $linux_types = 1; return; } if (my $included = ($line =~ /^\s*#\s*include\s+[<"](\S+)[>"]/)[0]) { check_include_typesh($included); } if ($line =~ m/__[us](8|16|32|64)\b/) { printf STDERR "$filename:$lineno: " . "found __[us]{8,16,32,64} type " . "without #include \n"; $linux_types = 2; # Warn until headers are all fixed #$ret = 1; } }