[LPC2025] snooper: bpf_task_work_schedule() and file-based dynptr example#358
Open
[LPC2025] snooper: bpf_task_work_schedule() and file-based dynptr example#358
Conversation
WITH task_work_schedule_signal():
$ sudo ./snooper `pidof app`
Snooping on tasks for PID 5331...
Task: app_thread (PID=5331, TID=5332)
No kernel stack
User stack:
00007fbc700b90c2: random @ 0x42080+0x42
00007fbc700b8e7d: rand @ 0x41e70+0xd
00000000004012df: func_b @ 0x40129a+0x45
0000000000401283: func_a @ 0x4011f2+0x91
0000000000401476: thread_func @ 0x4013f6+0x80
00007fbc7010b39d: <no-symbol>
00007fbc7019049c: <no-symbol>
Task: app (PID=5331, TID=5331)
Kernel stack:
ffffffff813e7e49: hrtimer_nanosleep @ 0xffffffff813e7db0+0x99
ffffffff813f1c73: common_nsleep @ 0xffffffff813f1c30+0x43
ffffffff813f2e0d: __x64_sys_clock_nanosleep @ 0xffffffff813f2d50+0xbd
ffffffff8241a09a: do_syscall_64 @ 0xffffffff8241a030+0x6a
ffffffff810000b0: entry_SYSCALL_64_after_hwframe @ 0xffffffff81000065+0x4b
User stack:
00007fbc70158733: clock_nanosleep @ 0xe16d0+0x63
00007fbc70164827: nanosleep @ 0xed810+0x17
00007fbc70176f41: sleep @ 0xfff00+0x41
0000000000401622: main @ 0x40153c+0xe6
00007fbc7009ce08: <no-symbol>
00007fbc7009cecc: __libc_start_main @ 0x25e40+0x8c
0000000000401105: _start @ 0x4010e0+0x25
WITHOUT task_work_schedule_signal() CANNOT get correct stack trace after
multiple tries:
$ sudo ./snooper `pidof app`
Snooping on tasks for PID 5004...
Task: app_thread (PID=5004, TID=5005)
No kernel stack
User stack (frame pointer unwinding):
00000000004011fd: func_mux @ 0x4011f2+0xb
15c15fd673415a00: <no-symbol>
$ sudo ./snooper `pidof app`
Snooping on tasks for PID 5004...
Task: app_thread (PID=5004, TID=5005)
No kernel stack
User stack (frame pointer unwinding):
00007fcbaf2490a8: random @ 0x42080+0x28
000062cbaf248e7d: <no-symbol>
0000000000401269: func_mux @ 0x4011f2+0x77
00000000004012a6: func_a @ 0x40126e+0x38
000000000040124b: func_mux @ 0x4011f2+0x59
15c15fd673415a00: <no-symbol>
Note that 15c15fd673415a00 is NOT a valid address.
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.