All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Paul Durrant" <paul@xen.org>,
	"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] xen/memory: Reject out-of-range resource 'frame' values
Date: Fri, 29 Jan 2021 10:15:15 +0100	[thread overview]
Message-ID: <9879dc3b-5c00-b9d4-c74f-51177580ae7d@suse.com> (raw)
In-Reply-To: <20210128160616.17608-1-andrew.cooper3@citrix.com>

On 28.01.2021 17:06, Andrew Cooper wrote:
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -1054,7 +1054,7 @@ static long xatp_permission_check(struct domain *d, unsigned int space)
>  }
>  
>  static int acquire_grant_table(struct domain *d, unsigned int id,
> -                               unsigned long frame,
> +                               unsigned int frame,
>                                 unsigned int nr_frames,
>                                 xen_pfn_t mfn_list[])
>  {

Doesn't this want carrying forward into
gnttab_get_{shared,status}_frame() as well? Of course further
cleanup here can also be done at a later point, but it leaves
things in a somewhat inconsistent state. I'd like to leave it
up to you to commit with Paul's R-b as is, or extend the
adjustments and then also add mine.

> --- a/xen/include/asm-x86/mm.h
> +++ b/xen/include/asm-x86/mm.h
> @@ -641,7 +641,7 @@ static inline bool arch_mfn_in_directmap(unsigned long mfn)
>  }
>  
>  int arch_acquire_resource(struct domain *d, unsigned int type,
> -                          unsigned int id, unsigned long frame,
> +                          unsigned int id, unsigned int frame,
>                            unsigned int nr_frames, xen_pfn_t mfn_list[]);

Same here wrt hvm_get_ioreq_server_frame().

Jan


  parent reply	other threads:[~2021-01-29  9:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 16:06 [PATCH] xen/memory: Reject out-of-range resource 'frame' values Andrew Cooper
2021-01-28 17:13 ` Paul Durrant
2021-01-29  9:15 ` Jan Beulich [this message]
2021-01-29  9:32   ` Andrew Cooper
2021-01-29  9:40     ` Jan Beulich
2021-01-29  9:47       ` Andrew Cooper
2021-01-29 10:01         ` Jan Beulich
2021-01-29 10:04           ` Andrew Cooper
2021-01-29 10:09             ` Jan Beulich
2021-01-29 11:43 ` Julien Grall

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=9879dc3b-5c00-b9d4-c74f-51177580ae7d@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien@xen.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=paul@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.