# From: Bodo Stroesser # # In s390, fpregs are not reset in signal handlers. # Thus we may stop stub_segv_handler on s390 with a breakpoint instruction # instead of calling getpid, kill and sigreturn. # To make this run, we must not mask any signals in stub_segv_handler. # # So I added conditional execution of set_handler in userspace_tramp # depending on ARCH_STUB_NO_SIGRETURN. If this macro isn't defined, # the code remains unchanged, else no signals for sa_mask are defined # and SA_NODEFER is added to flags. # # Using the change, we also no longer need to care about correct stack # pointer for sigreturn, which would cause some nasty code on s390. # # Signed-off-by: Bodo Stroesser Index: linux-2.6.17/arch/um/os-Linux/skas/process.c =================================================================== --- linux-2.6.17.orig/arch/um/os-Linux/skas/process.c 2007-11-19 11:18:49.000000000 -0500 +++ linux-2.6.17/arch/um/os-Linux/skas/process.c 2007-11-19 11:21:35.000000000 -0500 @@ -221,11 +221,13 @@ static int userspace_tramp(void *stack) set_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE); sigemptyset(&sa.sa_mask); +#ifndef ARCH_STUB_NO_SIGRETURN sigaddset(&sa.sa_mask, SIGIO); sigaddset(&sa.sa_mask, SIGWINCH); sigaddset(&sa.sa_mask, SIGVTALRM); sigaddset(&sa.sa_mask, SIGUSR1); sa.sa_flags = SA_ONSTACK; +#endif sa.sa_handler = (void *) v; sa.sa_restorer = NULL; if (sigaction(SIGSEGV, &sa, NULL) < 0)