xtensa: add support for call0 ABI in userspace
Provide a Kconfig choice to select whether only the default ABI, only call0 ABI or both are supported. The default for XEA2 is windowed, but it may change for XEA3. Call0 only runs userspace with PS.WOE disabled. Supporting both windowed and call0 ABIs is tricky, as there's no indication in the ELF binaries which ABI they use. So it is done by probing: each process is started with PS.WOE disabled, but the handler of an illegal instruction exception taken with PS.WOE retries faulting instruction after enabling PS.WOE. It must happen before any signal is delivered to the process, otherwise it may be delivered incorrectly. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
@@ -44,6 +44,11 @@ void xtensa_backtrace_user(struct pt_regs *regs, unsigned int depth,
|
||||
if (pc == 0 || pc >= TASK_SIZE || ufn(&frame, data))
|
||||
return;
|
||||
|
||||
if (IS_ENABLED(CONFIG_USER_ABI_CALL0_ONLY) ||
|
||||
(IS_ENABLED(CONFIG_USER_ABI_CALL0_PROBE) &&
|
||||
!(regs->ps & PS_WOE_MASK)))
|
||||
return;
|
||||
|
||||
/* Two steps:
|
||||
*
|
||||
* 1. Look through the register window for the
|
||||
|
Reference in New Issue
Block a user