Commit 215897da authored by Jörn Engel's avatar Jörn Engel Committed by Linus Torvalds

[PATCH] checkstack false positive fix

Randy Dunlap found one case where checkstack reported a false
positive.  From objdump of efi_stub.o:
   5:   81 ea 00 00 00 c0       sub    $0xc0000000,%edx

With the old code, this was interpreted as a negative number.  The
output line was:
0xc0116f5d efi_call_phys:                               1073741824

Randy wanted a change to return the correct number, like this:
0xc0116f5d efi_call_phys:                               3221225472

adding "or I can just ignore it, like I've been doing for awhile..."

Let's help him with the most sophisticated electronic tools and have
the script actively ignore this case for him.
Signed-off-by: default avatarJörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9918041c
......@@ -97,11 +97,12 @@ while (my $line = <STDIN>) {
my $size = $1;
$size = hex($size) if ($size =~ /^0x/);
if ($size > 0x80000000) {
if ($size > 0xf0000000) {
$size = - $size;
$size += 0x80000000;
$size += 0x80000000;
}
next if ($size > 0x10000000);
next if $line !~ m/^($xs*)/;
my $addr = $1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment