/* * When accessing the stack of a non-current task that might exit, use * try_get_task_stack() instead. task_stack_page will return a pointer * that could get freed out from under you.
*/ static __always_inline void *task_stack_page(conststruct task_struct *task)
{ return task->stack;
}
#define setup_thread_stack(new,old) do { } while(0)
/* * Return the address of the last usable long on the stack. * * When the stack grows down, this is just above the thread * info struct. Going any lower will corrupt the threadinfo. * * When the stack grows up, this is the highest address. * Beyond that position, we corrupt data on the next page.
*/ staticinlineunsignedlong *end_of_stack(conststruct task_struct *p)
{ #ifdef CONFIG_STACK_GROWSUP return (unsignedlong *)((unsignedlong)task_thread_info(p) + THREAD_SIZE) - 1; #else return (unsignedlong *)(task_thread_info(p) + 1); #endif
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.