All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Anh Dinh <ug93tad@gmail.com>
Cc: xen-devel@lists.xen.org
Subject: Re: size of hypercall parameter
Date: Fri, 10 Oct 2014 09:29:37 +0100	[thread overview]
Message-ID: <1412929777.10650.12.camel@citrix.com> (raw)
In-Reply-To: <CAAbkU4S7J7n_k5MdarNWBYLLN8uNgQB3f3EB4Y2MbtnUz3v8iA@mail.gmail.com>

On Fri, 2014-10-10 at 08:52 +0800, Anh Dinh wrote:
> I wrote a hypercall that takes in a pointer to memory region:
> 
> 
> void do_test(char *p){
> ... // do something with the memory in the hypervisor space
> }
> 
> 
> and invoke it in both Dom0 and DomU through privcmd. 
> 
> 
> But when I pass a memory region of tens of KB (not very large), the
> system crashes and reboots. 

You haven't given us very much to go on, at least the hypervisor code
doing the accesses and the userspace code which invokes it would be
needed for anyone to point out what is wrong.

One hint though: You'll notice that no other hypercall takes a raw
pointer as you have shown above, they all use the XEN_GUEST_HANDLE_PARAM
construct and the associated accessors.

Ian.

      reply	other threads:[~2014-10-10  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10  0:52 size of hypercall parameter Anh Dinh
2014-10-10  8:29 ` Ian Campbell [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=1412929777.10650.12.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ug93tad@gmail.com \
    --cc=xen-devel@lists.xen.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.