• Haavard Skinnemoen's avatar
    [AVR32] show_trace: Only walk valid stack addresses · 3338368e
    Haavard Skinnemoen authored
    Terminate the frame pointer walk if (a) the address is outside the
    task's kernel stack or (b) if the frame pointer isn't monotonically
    increasing. Without this fix, show_trace() may enter an infinite
    loop, walking through random data anywhere in memory.
    
    Since any address within the kernel stack is guaranteed to be valid,
    we may eliminate the __get_user() calls as well.
    Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
    3338368e
traps.c 9.14 KB