summaryrefslogtreecommitdiffstats
path: root/scripts/leaking_addresses.pl
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-11-07 19:01:59 -0500
committerTobin C. Harding <me@tobin.cc>2017-11-13 17:29:27 -0500
commit7e5758f7f74a591b52c6e8a8cfe82e6288ddced0 (patch)
treefdd58558df1622b9322379ac42d9aa3fc57a86f8 /scripts/leaking_addresses.pl
parentbebc6082da0a9f5d47a1ea2edc099bf671058bd4 (diff)
leaking_addresses: use tabs instead of spaces
Current code uses spaces instead of tabs in places. Use tabs instead of spaces. Signed-off-by: Tobin C. Harding <me@tobin.cc>
Diffstat (limited to 'scripts/leaking_addresses.pl')
-rwxr-xr-xscripts/leaking_addresses.pl54
1 files changed, 27 insertions, 27 deletions
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
index 2977371b2956..b64efcecbb5e 100755
--- a/scripts/leaking_addresses.pl
+++ b/scripts/leaking_addresses.pl
@@ -170,46 +170,46 @@ sub push_to_global
170 170
171sub is_false_positive 171sub is_false_positive
172{ 172{
173 my ($match) = @_; 173 my ($match) = @_;
174
175 if ($match =~ '\b(0x)?(f|F){16}\b' or
176 $match =~ '\b(0x)?0{16}\b') {
177 return 1;
178 }
174 179
175 if ($match =~ '\b(0x)?(f|F){16}\b' or
176 $match =~ '\b(0x)?0{16}\b') {
177 return 1;
178 }
179 180
180 # vsyscall memory region, we should probably check against a range here. 181 if ($match =~ '\bf{10}600000\b' or# vsyscall memory region, we should probably check against a range here.
181 if ($match =~ '\bf{10}600000\b' or 182 $match =~ '\bf{10}601000\b') {
182 $match =~ '\bf{10}601000\b') { 183 return 1;
183 return 1; 184 }
184 }
185 185
186 return 0; 186 return 0;
187} 187}
188 188
189# True if argument potentially contains a kernel address. 189# True if argument potentially contains a kernel address.
190sub may_leak_address 190sub may_leak_address
191{ 191{
192 my ($line) = @_; 192 my ($line) = @_;
193 my $address = '\b(0x)?ffff[[:xdigit:]]{12}\b'; 193 my $address = '\b(0x)?ffff[[:xdigit:]]{12}\b';
194 194
195 # Signal masks. 195 # Signal masks.
196 if ($line =~ '^SigBlk:' or 196 if ($line =~ '^SigBlk:' or
197 $line =~ '^SigCgt:') { 197 $line =~ '^SigCgt:') {
198 return 0; 198 return 0;
199 } 199 }
200 200
201 if ($line =~ '\bKEY=[[:xdigit:]]{14} [[:xdigit:]]{16} [[:xdigit:]]{16}\b' or 201 if ($line =~ '\bKEY=[[:xdigit:]]{14} [[:xdigit:]]{16} [[:xdigit:]]{16}\b' or
202 $line =~ '\b[[:xdigit:]]{14} [[:xdigit:]]{16} [[:xdigit:]]{16}\b') { 202 $line =~ '\b[[:xdigit:]]{14} [[:xdigit:]]{16} [[:xdigit:]]{16}\b') {
203 return 0; 203 return 0;
204 } 204 }
205 205
206 while (/($address)/g) { 206 while (/($address)/g) {
207 if (!is_false_positive($1)) { 207 if (!is_false_positive($1)) {
208 return 1; 208 return 1;
209 } 209 }
210 } 210 }
211 211
212 return 0; 212 return 0;
213} 213}
214 214
215sub parse_dmesg 215sub parse_dmesg