I am debugging a kernel oops (vmcore) using the crash utility on CentOS 7.9 and I have a function foo, which calls a callback, but when I disassemble foo I don't see a callq instruction that references the callback, nor do I see the assembly for the callback in the caller (suggesting it isn't inlined there).
However, the kernel stack shows that the RIP was on offset 33 of the callback function. What gives?
The last instruction for foo shows:
callq 0xffffffff91c9af10 <__stack_chk_fail>
Does this perhaps means that the callback smashed the stack and glibc replaced it with this stack_chk thingamajig?
// signature for foo
foo(some_t *some, size_t off, size_t size,
my_callback_t *func, void *private)
// callback gets called in foo like:
ret = func(args)
Update
I do also see a callq to:
__x86_indirect_thunk_rax
Which I have no idea about.. Perhaps that is somehow the call? Looking into it, it has something to do with a return trampoline, which sounds fun! XD