All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] Prevent trace call into unloaded module text
Date: Wed, 26 Nov 2008 19:46:19 +0800	[thread overview]
Message-ID: <20081126114619.GA15568@localhost> (raw)
In-Reply-To: <492D3063.3030906@redhat.com>

On Wed, Nov 26, 2008 at 01:17:55PM +0200, Avi Kivity wrote:
> Wu Fengguang wrote:
> > Add marker_synchronize_unregister() before module unloading.
> > This prevents possible trace calls into unloaded module text.
> >
> > Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
> > ---
> > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> > index a87f45e..64f38b3 100644
> > --- a/virt/kvm/kvm_main.c
> > +++ b/virt/kvm/kvm_main.c
> > @@ -2102,5 +2102,6 @@ void kvm_exit(void)
> >  	kvm_arch_exit();
> >  	kvm_exit_debug();
> >  	__free_page(bad_page);
> > +	marker_synchronize_unregister();
> >  }
> >  EXPORT_SYMBOL_GPL(kvm_exit);
> >   
> 
> What about kvm-intel.ko and kvm-amd.ko?  They also contain markers.

vmx_exit and svm_exit() all calls into kvm_exit(), so they have been
handled in a common way.

> (and, why doesn't module unload do this automatically?)

Maybe most modules don't need it for now?

Thanks,
Fengguang

  reply	other threads:[~2008-11-26 11:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 14:04 [PATCH] Prevent trace call into unloaded module text Wu Fengguang
2008-11-26 11:17 ` Avi Kivity
2008-11-26 11:46   ` Wu Fengguang [this message]
2008-11-26 11:59     ` Wu Fengguang
2008-11-27 13:32       ` Avi Kivity

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=20081126114619.GA15568@localhost \
    --to=fengguang.wu@intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.