Skip to content

Commit

Permalink
Fix for verifier failure in wakeuptime
Browse files Browse the repository at this point in the history
On my system, the manually unrolled stack walker fails the verifier, due
to what seems to me like an incorrect return statement. Setting bp = 0
has no effect, seems that the intent was to return 0 instead.

Not sure why others haven't hit this, but the fix contained here seems
reasonable.

Signed-off-by: Brenden Blanco <[email protected]>
  • Loading branch information
drzaeus77 authored and goldshtn committed Apr 21, 2017
1 parent 75eef2c commit 04b05d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/wakeuptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def signal_ignore(signal, frame):
if (bpf_probe_read(&ret, sizeof(ret), (void *)(*bp+8)))
return 0;
if (bpf_probe_read(bp, sizeof(*bp), (void *)*bp))
bp = 0;
return 0;
if (ret < __START_KERNEL_map)
return 0;
return ret;
Expand Down

0 comments on commit 04b05d5

Please sign in to comment.