> From: Jan Beulich <jbeul...@suse.com>
> Sent: Monday, April 17, 2023 11:41 AM
> To: Andrew Cooper <andrew.coop...@citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>; Ross Lagerwall 
> <ross.lagerw...@citrix.com>; Xen-devel <xen-devel@lists.xenproject.org>
> Subject: Re: [PATCH] xen/livepatch: Fix secure_payload() in non-debug builds 
>  
> On 17.04.2023 11:58, Andrew Cooper wrote:
> > The ro_pages + rw_pages + text_pages != payload->pages check is not 
> > something
> > which is reasonable to skip at runtime.  Rewrite it to not be an ASSERT().
> 
> Isn't this merely a sanity check? IOW isn't returning -EINVAL in this case
> misleading, as to calling "invalid input" what really is an internal error
> in Xen? But anyway, I guess I'll leave this to the maintainers.
> 

Yes, it looks like it is just a sanity check of the payload->pages
calculation in move_payload(). Since it is not dependent on the
payload, I think ASSERT() is correct.

Ross

Reply via email to