* [PATCH] x86: properly fail mmuext ops when get_page_from_gfn() fails
@ 2012-12-06 12:59 Jan Beulich
2012-12-06 15:55 ` Keir Fraser
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2012-12-06 12:59 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
I noticed this inconsistency while analyzing the code for XSA-32.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2776,7 +2776,7 @@ long do_mmuext_op(
page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
if ( unlikely(!page) )
{
- rc = -EINVAL;
+ okay = 0;
break;
}
@@ -2836,6 +2836,7 @@ long do_mmuext_op(
page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
if ( unlikely(!page) )
{
+ okay = 0;
MEM_LOG("Mfn %lx bad domain", op.arg1.mfn);
break;
}
[-- Attachment #2: x86-mmuext-errors.patch --]
[-- Type: text/plain, Size: 818 bytes --]
x86: properly fail mmuext ops when get_page_from_gfn() fails
I noticed this inconsistency while analyzing the code for XSA-32.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2776,7 +2776,7 @@ long do_mmuext_op(
page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
if ( unlikely(!page) )
{
- rc = -EINVAL;
+ okay = 0;
break;
}
@@ -2836,6 +2836,7 @@ long do_mmuext_op(
page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
if ( unlikely(!page) )
{
+ okay = 0;
MEM_LOG("Mfn %lx bad domain", op.arg1.mfn);
break;
}
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: properly fail mmuext ops when get_page_from_gfn() fails
2012-12-06 12:59 [PATCH] x86: properly fail mmuext ops when get_page_from_gfn() fails Jan Beulich
@ 2012-12-06 15:55 ` Keir Fraser
0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2012-12-06 15:55 UTC (permalink / raw)
To: Jan Beulich, xen-devel
On 06/12/2012 12:59, "Jan Beulich" <JBeulich@suse.com> wrote:
> I noticed this inconsistency while analyzing the code for XSA-32.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -2776,7 +2776,7 @@ long do_mmuext_op(
> page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
> if ( unlikely(!page) )
> {
> - rc = -EINVAL;
> + okay = 0;
> break;
> }
>
> @@ -2836,6 +2836,7 @@ long do_mmuext_op(
> page = get_page_from_gfn(pg_owner, op.arg1.mfn, NULL, P2M_ALLOC);
> if ( unlikely(!page) )
> {
> + okay = 0;
> MEM_LOG("Mfn %lx bad domain", op.arg1.mfn);
> break;
> }
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-06 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 12:59 [PATCH] x86: properly fail mmuext ops when get_page_from_gfn() fails Jan Beulich
2012-12-06 15:55 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).