i386: let signal handlers set the resume flag
PATCH 1/1 i386: let signal handlers set the resume flag
Allow signal handlers to set the RF bit in EFLAGS. This lets a simple debugger using SIGTRAP skip one instruction after returning from a signal.
Signed-off-by Chuck Ebbert <[email protected]>
arch/i386/kernel/signal.c +2 -1
@@ -123,7 +123,8 @@ restore_sigcontext(struct pt_regs *regs, err |=__get_user (tmp, &sc->seg); \loadsegment (seg,tmp); } -#define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | X86_EFLAGS_DF | \ +#define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_RF | \ + X86_EFLAGS_OF | X86_EFLAGS_DF | \ X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \ X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF)
Signature · 2 lines
Chuck "Equations are the Devil's sentences." --Stephen Colbert