All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 3/3] xen: prevent access to HPET from Dom0
Date: Fri, 23 Jan 2015 12:46:43 +0100	[thread overview]
Message-ID: <54C234A3.1020506@citrix.com> (raw)
In-Reply-To: <54C129B20200007800058557@mail.emea.novell.com>

El 22/01/15 a les 16.47, Jan Beulich ha escrit:
>>>> On 22.01.15 at 16:19, <roger.pau@citrix.com> wrote:
>> --- a/xen/arch/x86/domain_build.c
>> +++ b/xen/arch/x86/domain_build.c
>> @@ -36,6 +36,7 @@
>>  #include <asm/bzimage.h> /* for bzimage_parse */
>>  #include <asm/io_apic.h>
>>  #include <asm/hap.h>
>> +#include <asm/hpet.h> /* for hpet_address */
> 
> Please drop the comment - with hpet_flags it's now stale
> 
>> @@ -1495,6 +1499,16 @@ int __init construct_dom0(
>>              rc |= iomem_deny_access(d, sfn, efn);
>>      }
>>  
>> +    /* Prevent access to HPET */
>> +    if ( hpet_address != 0 )
>> +    {
>> +        mfn = paddr_to_pfn(hpet_address);
>> +        if ( hpet_flags & ACPI_HPET_PAGE_PROTECT4 )
> 
> The constant isn't a binary mask, you need to also use
> ACPI_HPET_PAGE_PROTECT_MASK. I further can't see why
> you wouldn't want to also handle ACPI_HPET_PAGE_PROTECT64.

Right, for PAGE_PROTECT64 we can also block access to the adjacent 15 pages.

Roger.

      reply	other threads:[~2015-01-23 11:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 15:19 [PATCH v3 0/3] xen/pvh: prevent Dom0 from accessing reserved MMIO regions Roger Pau Monne
2015-01-22 15:19 ` [PATCH v3 1/3] xen: allow set_mmio_p2m_entry to specify access type Roger Pau Monne
2015-01-22 15:25   ` Tim Deegan
2015-01-22 15:19 ` [PATCH v3 2/3] xen/pvh: check permissions when adding MMIO regions Roger Pau Monne
2015-01-22 15:43   ` Jan Beulich
2015-01-23 11:29     ` Roger Pau Monné
2015-01-23 11:44       ` Jan Beulich
2015-01-22 20:28   ` Konrad Rzeszutek Wilk
2015-01-23 11:21     ` Jan Beulich
2015-01-23 15:04       ` Konrad Rzeszutek Wilk
2015-01-22 15:19 ` [PATCH v3 3/3] xen: prevent access to HPET from Dom0 Roger Pau Monne
2015-01-22 15:47   ` Jan Beulich
2015-01-23 11:46     ` Roger Pau Monné [this message]

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=54C234A3.1020506@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --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.