All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 2/4] x86: add address validity check to guest_map_l1e()
Date: Thu, 10 Oct 2013 14:57:51 +0100	[thread overview]
Message-ID: <5256B25F.2070507@citrix.com> (raw)
In-Reply-To: <5256CDA402000078000FA3E6@nat28.tlf.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 1013 bytes --]

On 10/10/13 14:54, Jan Beulich wrote:
> Just like for guest_get_eff_l1e() this prevents accessing as page
> tables (and with the wrong memory attribute) internal data inside Xen
> happening to be mapped with 1Gb pages.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper@citrix.com>
>
> --- a/xen/include/asm-x86/paging.h
> +++ b/xen/include/asm-x86/paging.h
> @@ -360,7 +360,8 @@ guest_map_l1e(struct vcpu *v, unsigned l
>          return paging_get_hostmode(v)->guest_map_l1e(v, addr, gl1mfn);
>  
>      /* Find this l1e and its enclosing l1mfn in the linear map */
> -    if ( __copy_from_user(&l2e, 
> +    if ( !__addr_ok(addr) ||
> +         __copy_from_user(&l2e,
>                            &__linear_l2_table[l2_linear_offset(addr)],
>                            sizeof(l2_pgentry_t)) != 0 )
>          return NULL;
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


[-- Attachment #1.2: Type: text/html, Size: 1899 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2013-10-10 13:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 13:49 [PATCH 0/4] x86: XSA-67 follow-up Jan Beulich
2013-10-10 13:53 ` [PATCH 1/4] x86: correct LDT checks Jan Beulich
2013-10-10 13:54 ` [PATCH 2/4] x86: add address validity check to guest_map_l1e() Jan Beulich
2013-10-10 13:57   ` Andrew Cooper [this message]
2013-10-10 13:54 ` [PATCH 3/4] x86: use {rd, wr}{fs, gs}base when available Jan Beulich
2013-10-10 14:15   ` Andrew Cooper
2013-10-10 13:55 ` [PATCH 4/4] x86: check for canonical address before doing page walks Jan Beulich
2013-10-10 14:01   ` Andrew Cooper
2013-10-10 14:10     ` Jan Beulich
2013-10-10 14:17       ` Andrew Cooper
2013-10-10 15:13 ` [PATCH 0/4] x86: XSA-67 follow-up Keir Fraser

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=5256B25F.2070507@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@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.