[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 3 Mar 2013 11:43:21 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Andi Kleen <andi@...stfloor.org>,
Oleg Nesterov <oleg@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Vince Weaver <vincent.weaver@...ne.edu>
Subject: Re: [PATCH 2/5] signal x86: Clear RF EFLAGS bit for signal handler
On Fri, Mar 01, 2013 at 10:57:50AM -0800, H. Peter Anvin wrote:
> On 03/01/2013 10:11 AM, Jiri Olsa wrote:
> > Clearing RF EFLAGS bit for signal handler. The reason is,
> > that this flag is set by debug exception code to prevent
> > the recursive exception entry.
> >
> > Leaving it set for signal handler might prevent debug
> > exception of the signal handler itself.
> >
> > diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
> > index b6fe116..e273571 100644
> > --- a/arch/x86/kernel/signal.c
> > +++ b/arch/x86/kernel/signal.c
> > @@ -726,6 +726,13 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
> > regs->flags &= ~X86_EFLAGS_DF;
> >
> > /*
> > + * Clear RF when entering the signal handler, because
> > + * it might disable possible debug exception from the
> > + * signal handler.
> > + */
> > + regs->flags &= ~X86_EFLAGS_RF;
> > +
> > + /*
> > * Clear TF when entering the signal handler, but
> > * notify any tracer that was single-stepping it.
> > * The tracer may want to single-step inside the
> >
>
> Makes sense. However, can you combine all the flags-clearing into one
> statement while you are at it?
sure, will send v2
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists