hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/scripts/leaking_addresses.pl
....@@ -1,7 +1,7 @@
11 #!/usr/bin/env perl
2
+# SPDX-License-Identifier: GPL-2.0-only
23 #
34 # (c) 2017 Tobin C. Harding <me@tobin.cc>
4
-# Licensed under the terms of the GNU GPL License version 2
55 #
66 # leaking_addresses.pl: Scan the kernel for potential leaking addresses.
77 # - Scans dmesg output.
....@@ -97,7 +97,7 @@
9797 --32-bit Scan 32-bit kernel.
9898 --page-offset-32-bit=o Page offset (for 32-bit kernel 0xABCD1234).
9999 -d, --debug Display debugging output.
100
- -h, --help, --version Display this help and exit.
100
+ -h, --help Display this help and exit.
101101
102102 Scans the running kernel for potential leaking addresses.
103103
....@@ -108,7 +108,6 @@
108108 GetOptions(
109109 'd|debug' => \$debug,
110110 'h|help' => \$help,
111
- 'version' => \$help,
112111 'o|output-raw=s' => \$output_raw,
113112 'i|input-raw=s' => \$input_raw,
114113 'suppress-dmesg' => \$suppress_dmesg,
....@@ -231,7 +230,7 @@
231230 my $tmp_file = "/tmp/tmpkconf";
232231
233232 if (system("gunzip < /proc/config.gz > $tmp_file")) {
234
- dprint "$0: system(gunzip < /proc/config.gz) failed\n";
233
+ dprint("system(gunzip < /proc/config.gz) failed\n");
235234 return "";
236235 } else {
237236 @config_files = ($tmp_file);
....@@ -243,7 +242,7 @@
243242 }
244243
245244 foreach my $file (@config_files) {
246
- dprint("parsing config file: %s\n", $file);
245
+ dprint("parsing config file: $file\n");
247246 $value = option_from_file($option, $file);
248247 if ($value ne "") {
249248 last;
....@@ -503,7 +502,7 @@
503502 next;
504503 }
505504
506
- dprint "parsing: $path\n";
505
+ dprint("parsing: $path\n");
507506 timed_parse_file($path);
508507 }
509508 }