On 6 June 2014 10:46, <riku.voi...@linaro.org> wrote: > From: Riku Voipio <riku.voi...@linaro.org> > > make most implementations of restore_sigcontext void and > remove checking it's return value from functions calling > restore_sigcontext. > > The exception is the X86 version of the function that is > too different from others to deal in this way. > > Signed-off-by: Riku Voipio <riku.voi...@linaro.org> > --- > linux-user/signal.c | 65 > +++++++++++++---------------------------------------- > 1 file changed, 16 insertions(+), 49 deletions(-) > > diff --git a/linux-user/signal.c b/linux-user/signal.c > index 421bd48..7b828bf 100644 > --- a/linux-user/signal.c > +++ b/linux-user/signal.c > @@ -1546,12 +1546,6 @@ static const abi_ulong retcodes[4] = { > SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN > }; > > - > -static inline int valid_user_regs(CPUARMState *regs) > -{ > - return 1; > -}
I don't think we should remove this function -- there are a number of checks we should be making here for correct behaviour to ensure that the guest hasn't passed us a bogus CPSR. Compare the kernel's version of this function: http://lxr.linux.no/#linux+v3.14.5/arch/arm/include/asm/ptrace.h#L46 We basically want all those checks (except we can drop the ones related to 26-bit CPUs and M-profile). We don't need to implement them in this series but we shouldn't remove the function and code path which are the right places to add them later. thanks -- PMM