Skip to content

Commit

Permalink
Don't block SIGSEGV at more places.
Browse files Browse the repository at this point in the history
This is used internally by qemu to detect writing to pages
containing code, it must not be disabled even when the guest
disables these.
  • Loading branch information
susematz committed Aug 16, 2013
1 parent 63eb8d3 commit f1542ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion linux-user/signal.c
Expand Up @@ -1259,7 +1259,7 @@ static int target_restore_sigframe(CPUARMState *env,
uint32_t magic, size;

target_to_host_sigset(&set, &sf->uc.tuc_sigmask);
sigprocmask(SIG_SETMASK, &set, NULL);
do_sigprocmask(SIG_SETMASK, &set, NULL);

for (i = 0; i < 31; i++) {
err |= __get_user(env->xregs[i], &sf->uc.tuc_mcontext.regs[i]);
Expand Down Expand Up @@ -5798,6 +5798,7 @@ void process_pending_signals(CPUArchState *cpu_env)
sigaddset(&set, target_to_host_signal(sig));

/* block signals in the handler using Linux */
sigdelset(&set, SIGSEGV);
sigprocmask(SIG_BLOCK, &set, &old_set);
/* save the previous blocked signal state to restore it at the
end of the signal execution (see do_sigreturn) */
Expand Down

0 comments on commit f1542ae

Please sign in to comment.