Fix backtrace_list()'s wild read
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 28 Nov 2016 16:26:22 +0000 (11:26 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commit33b1dd1bbcd3f36385286ec098978a1c15223dc1
tree9668f1a06868325655f66c8e1cd691fea8ea4d1c
parent20694dda54b5b38f35f869a296ad6ebf21bc21fa
Fix backtrace_list()'s wild read

FP could point to the top of the stack if its value is 0.  We shouldn't
read above the stack.

Previously, this was benign, but with the upcoming guard pages for kernel
stacks, the wild read goes into another kstack's guard page.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/kdebug.c