]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: do not overrun the start of the user stack
authorNick Alcock <nick.alcock@oracle.com>
Fri, 29 Jan 2016 14:47:03 +0000 (14:47 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Wed, 3 Feb 2016 16:36:56 +0000 (16:36 +0000)
commitfda8f00c97f148317032847639744c42217b02f3
tree1b0a9dddb16db1c4cb69b47bcbd9798b79537470
parent5a45cb38a7120e2ccfc4d0b28711081edfaa85a1
dtrace: do not overrun the start of the user stack

When scanning user stacks in dtrace_getufpstack(), we iterate from the
current stack pointer back to the start of the stack, getting the
unsigned long at each location and seeing if we can interpret it as a
pointer.

However, since the stack grows down on all platforms supported by
DTrace, the 'start' of the stack is the end of the VMA -- so we should
stop one unsigned long before the beginning, or we'll try to read off
the end (harmlessly, but still.)

Orabug: 22629102
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/dtrace_isa.c