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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4iPLU5apAsMq2gqh-8hsWdGdkYodirnr5dwaRJ_qEP-SA@mail.gmail.com>
Date:   Thu, 2 Nov 2017 19:25:14 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     Haozhong Zhang <haozhong.zhang@...el.com>
Cc:     KVM list <kvm@...r.kernel.org>, X86 ML <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>, rkrcmar@...hat.com,
        Xiao Guangrong <xiaoguangrong.eric@...il.com>,
        "Cuevas Escareno, Ivan D" <ivan.d.cuevas.escareno@...el.com>,
        "Kumar, Karthik" <karthik.kumar@...el.com>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Olif Chapman <olif.chapman@...cle.com>
Subject: Re: [PATCH v3 2/3] KVM: add converters between pfn_t and kvm_pfn_t

On Thu, Nov 2, 2017 at 6:16 PM, Haozhong Zhang <haozhong.zhang@...el.com> wrote:
> Signed-off-by: Haozhong Zhang <haozhong.zhang@...el.com>
> ---
>  include/linux/kvm_host.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 6882538eda32..759fe498c89e 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -67,6 +67,9 @@
>  #define KVM_PFN_ERR_HWPOISON   (KVM_PFN_ERR_MASK + 1)
>  #define KVM_PFN_ERR_RO_FAULT   (KVM_PFN_ERR_MASK + 2)
>
> +#define kvm_pfn_to_pfn(x) ((pfn_t){ .val = (x)})
> +#define pfn_to_kvm_pfn(x) ((kvm_pfn_t)((x).val))

Shouldn't this mask off the kvm_pfn_t and  pfn_t specific bits when
converting between the two?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ