I'd like to know the address range of kernel stack. For user-space process, we can use /proc/pid/maps to see the stack address range by keyword [stack], but do not know which one is kernel stack. For kernel thread, usually /proc/pid/maps is empty.
So how can I know the kernel stack address range, in user-space process and kernel thread for FreeBSD?
Edit:
It seems that kernel allocates two pages (IA-32) for each kernel thread, how could we find the address of these two pages under x86_64? (Maybe x86_64 is a little different)