All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Pekka Enberg <penberg@kernel.org>
Cc: kvm@vger.kernel.org, Asias He <asias.hejun@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Sasha Levin <levinsasha928@gmail.com>
Subject: Re: [PATCH] kvm tools: Make 'vm sandbox' more user-friendly
Date: Thu, 8 Mar 2012 01:50:09 +0400	[thread overview]
Message-ID: <20120307215009.GE6215@moon> (raw)
In-Reply-To: <1331146439-21710-1-git-send-email-penberg@kernel.org>

On Wed, Mar 07, 2012 at 08:53:59PM +0200, Pekka Enberg wrote:
> This patch changes 'vm sandbox' to automatically prefix a program path with
> "/host" in the guest side making this, for example, work as expected:
> 
>   $ ./vm sandbox -- ~/trinity/trinity --mode=random --dangerous
> 
> Cc: Asias He <asias.hejun@gmail.com>
> Cc: Cyrill Gorcunov <gorcunov@openvz.org>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>
> ---
>  tools/kvm/builtin-run.c |   29 ++++++++++++++++++++++++++---
>  1 files changed, 26 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
> index 6acc490..ce76b69 100644
> --- a/tools/kvm/builtin-run.c
> +++ b/tools/kvm/builtin-run.c
> @@ -847,9 +847,26 @@ static void kvm_write_sandbox_cmd_exactly(int fd, const char *arg)
>  	}
>  }
>  
> +static void resolve_program(const char *src, char *dst, size_t len)
> +{
> +	struct stat st;
> +
> +	stat(src, &st);

Hi Pekka, looks cool! I suspect we might need to add
a check if stat call has not been failed, on top of this
patch course ;)

	Cyrill

      reply	other threads:[~2012-03-07 21:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 18:53 [PATCH] kvm tools: Make 'vm sandbox' more user-friendly Pekka Enberg
2012-03-07 21:50 ` Cyrill Gorcunov [this message]

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=20120307215009.GE6215@moon \
    --to=gorcunov@openvz.org \
    --cc=asias.hejun@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@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.