[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150903154816.GI29283@redhat.com>
Date: Thu, 3 Sep 2015 16:48:16 +0100
From: "Richard W.M. Jones" <rjones@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Borislav Petkov <bp@...en8.de>,
Chuck Ebbert <cebbert.lkml@...il.com>,
linux-kernel@...r.kernel.org, x86@...nel.org,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is
patching the handler
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote:
> On Thu, 3 Sep 2015, Borislav Petkov wrote:
> > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote:
> > > static void __init_or_module add_nops(void *insns, unsigned int len)
> > > {
> > > + unsigned long flags;
> > > +
> > > + local_irq_save(flags);
> > > while (len > 0) {
> >
> > I guess you want to optimize the len==0 case to not disable interrupts
> > needlessly:
> >
> > if (!len)
> > return;
> >
> > local_irq_save(flags);
> > while (len > 0)
> > ...
>
> Nah. I rather put the local_irq_save into optimize_nops(). All other
> callers of add_nops() are operating on a buffer and use text_poke
> after that. Aside of that optimize_nops() is missing a sync_core().
>
> Updated patch below.
The V2 patch has got to 900 iterations without hitting the problem.
As that is a lot more than without the patch, you can add:
Tested-by: Richard W.M. Jones <rjones@...hat.com>
I will leave it going overnight just in case.
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
--
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