All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Yacine HEBBAL <y_hebbal@esi.dz>, kvm@vger.kernel.org
Subject: Re: [Question] Switching VCPU CPL from the hypervisor ?
Date: Tue, 15 Dec 2015 17:53:12 +0100	[thread overview]
Message-ID: <56704578.8080803@redhat.com> (raw)
In-Reply-To: <loom.20151215T170603-716@post.gmane.org>



On 15/12/2015 17:20, Yacine HEBBAL wrote:
> Hi,
> I working on an application in which I control an arbitrary process to
> execute an a given code (injected code for example). I want the process I'm
> controlling to execute my code with root privilege. Is it possible to
> arbitrary switch vcpu cpl to 0 from the hypervisor level (process is in user
> mode) ? I'm aware that I can do this using some hacks and emulation or by
> controlling the process just after it enters or just before it quits kernel
> mode (but I need to wait and intercept these events). Is there a
> straightforward technique to switch vcpu cpl from the hypervisor level at
> demand ?

Would a hypercall do?  VMCALL can be executed from CPL 3.

Paolo

  reply	other threads:[~2015-12-15 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 16:20 [Question] Switching VCPU CPL from the hypervisor ? Yacine HEBBAL
2015-12-15 16:53 ` Paolo Bonzini [this message]
2015-12-15 17:12   ` Yacine HEBBAL
     [not found]   ` <CACEoar5vk6mzeWYwcDsBFVxYfcYm3fyBufwA+BM1ZvP3PL5aVw@mail.gmail.com>
2015-12-16 17:48     ` Paolo Bonzini
2015-12-17 15:58       ` Yacine HEBBAL

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=56704578.8080803@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=y_hebbal@esi.dz \
    /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.