All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>,
	Chuck Ebbert <cebbert.lkml@gmail.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler
Date: Fri, 4 Sep 2015 08:40:49 +0100	[thread overview]
Message-ID: <20150904074049.GM29283@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1509031232340.15006@nanos>

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.

V2 of the patch managed ~ 5000 iterations overnight without hitting
the problem, so looks like it's a good fix.

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

  parent reply	other threads:[~2015-09-04  7:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31  2:37 Chuck Ebbert
2015-09-01  6:20 ` Richard W.M. Jones
2015-09-02  9:11   ` Thomas Gleixner
2015-09-02 19:05     ` Richard W.M. Jones
2015-09-03  7:53       ` Richard W.M. Jones
2015-09-03  8:50     ` Borislav Petkov
2015-09-03 10:41       ` Thomas Gleixner
2015-09-03 12:43         ` Josh Boyer
2015-09-03 13:01           ` Thomas Gleixner
2015-09-03 15:48         ` Richard W.M. Jones
2015-09-03 19:30         ` [tip:x86/urgent] x86/alternatives: Make optimize_nops() interrupt safe and synced tip-bot for Thomas Gleixner
2015-09-04  7:40         ` Richard W.M. Jones [this message]
2015-09-04 12:02         ` [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler Borislav Petkov
2015-09-04 13:37           ` Thomas Gleixner
2015-09-05 15:25             ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150904074049.GM29283@redhat.com \
    --to=rjones@redhat.com \
    --cc=bp@alien8.de \
    --cc=cebbert.lkml@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --subject='Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.