[lib][backtrace] Fix crash on corrupt ret_addr

If a stack frame of a kernel thread contains a user-space return address
dump_function would crash trying to get a pointer to the trusty_app.
This can happen if the kernel stack overflows and we reset the stack
pointer to handle the exception.

Bug: 165825378
Change-Id: I37600902e7bfd27a4f02d11c8f9461a6161e4cb9
1 file changed