From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 1/3] x86: tighten page table owner checking in do_mmu_update() Date: Thu, 20 Nov 2014 10:33:46 +0000 Message-ID: <546DC38A.8010000@citrix.com> References: <546DCAB102000078000493E0@smtp.nue.novell.com> <546DCC7202000078000493F0@smtp.nue.novell.com> <546DC29A.4070301@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3565478027246392164==" Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XrP3f-0008Nd-Rl for xen-devel@lists.xenproject.org; Thu, 20 Nov 2014 10:33:51 +0000 In-Reply-To: <546DC29A.4070301@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Tim Deegan , Keir Fraser List-Id: xen-devel@lists.xenproject.org --===============3565478027246392164== Content-Type: multipart/alternative; boundary="------------040608020501000903030304" --------------040608020501000903030304 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 20/11/14 10:29, Andrew Cooper wrote: > On 20/11/14 10:11, Jan Beulich wrote: >> MMU_MACHPHYS_UPDATE, not manipulating page tables, shouldn't ignore >> a bad page table domain being specified. >> >> Also pt_owner can't be NULL when reaching the "out" label, so the >> respective check can be dropped. > > Yes it can. > > Failing > > if ( (pg_owner = get_pg_owner((uint16_t)foreigndom)) == NULL ) > { > rc = -ESRCH; > goto out; > } > > around line 3462 will cause pt_owner to be NULL at the out label. > > ~Andrew ...And I should really double check my reply before I send. Apologies for the noise. ~Andrew --------------040608020501000903030304 Content-Type: text/html; charset="windows-1252" Content-Length: 1505 Content-Transfer-Encoding: quoted-printable
On 20/11/14 10:29, Andrew Cooper wrote:
On 20/11/14 10:11, Jan Beulich wrote:
MMU_MACHPHYS_UPDATE, not manipulating page tables, shouldn't ignore
a bad page table domain being specified.

Also pt_owner can't be NULL when reaching the "out" label, so the
respective check can be dropped.

Yes it can.

Failing

=A0=A0=A0 if ( (pg_owner =3D get_pg_owner((uint16_t)foreigndom)) =3D=3D NULL )
=A0=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 rc =3D -ESRCH;
=A0=A0=A0=A0=A0=A0=A0 goto out;
=A0=A0=A0 }

around line 3462 will cause pt_owner to be NULL at the out label.

~Andrew

...And I should really double check my reply before I send.=A0 Apologies for the noise.

~Andrew
--------------040608020501000903030304-- --===============3565478027246392164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3565478027246392164==--