lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <db1112fc-817a-fd71-b80c-85c2e743923c@oracle.com>
Date:   Thu, 21 Sep 2017 15:01:02 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Andrew Cooper <andrew.cooper3@...rix.com>,
        Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org
Cc:     kirill.shutemov@...ux.intel.com
Subject: Re: [Xen-devel] [PATCH] xen: support 52 bit physical addresses in pv
 guests



On 09/21/2017 12:16 PM, Andrew Cooper wrote:
> On 21/09/17 17:00, Boris Ostrovsky wrote:
>>
>>>
>>>>
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@...e.com>
>>>>> ---
>>>>>    arch/x86/include/asm/xen/page.h | 11 ++++++++++-
>>>>>    arch/x86/xen/mmu_pv.c           |  4 ++--
>>>>>    2 files changed, 12 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/arch/x86/include/asm/xen/page.h
>>>>> b/arch/x86/include/asm/xen/page.h
>>>>> index 07b6531813c4..bcb8b193c8d1 100644
>>>>> --- a/arch/x86/include/asm/xen/page.h
>>>>> +++ b/arch/x86/include/asm/xen/page.h
>>>>> @@ -26,6 +26,15 @@ typedef struct xpaddr {
>>>>>        phys_addr_t paddr;
>>>>>    } xpaddr_t;
>>>>>    +#ifdef CONFIG_X86_64
>>>>> +#define XEN_PHYSICAL_MASK    ((1UL << 52) - 1)
>>>>
>>>>
>>>> SME is not supported for PV guests but for consistency (and in case sme
>>>> bit somehow gets set)
>>>> #define XEN_PHYSICAL_MASK    __sme_clr(((1UL << 52) - 1))
>>>
>>> Hmm, really? Shouldn't we rather add something like
>>>
>>> BUG_ON(sme_active());
>>>
>>> somewhere?
>>
>> We can do that too.
> 
> Please don't do anything to cause Linux to crash if Xen is using SME 
> itself, but leaving all of the PV guest unencrypted.

sme_active() returns true if the *guest* enables it.

Also, if the guest's memory is unencrypted, doesn't this mean that mfns 
that it sees (or, rather, ptes) will not have the SME bit set?

-boris

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ