Is there any way to determine whether a buffer received as a void* pointer comes from the stack or has been allocated with any other mechansim (vmalloc, kmalloc, …)?
In other words, is there any API or trick, similar to is_vmalloc_addr, to know if the buffer comes from the stack?
See
object_is_on_stack()at include/linux/sched.h. Hope this helps.