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: <7c023cb88c5f13e70b53ac695a7b45213c4f97a3.camel@infradead.org>
Date:   Thu, 14 Sep 2023 11:29:04 +0200
From:   David Woodhouse <dwmw2@...radead.org>
To:     Paul Durrant <paul@....org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Paul Durrant <pdurrant@...zon.com>,
        Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 5/8] KVM: pfncache: allow a cache to be activated with a
 fixed (userspace) HVA

On Thu, 2023-09-14 at 08:49 +0000, Paul Durrant wrote:
> 
>  int kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, unsigned long len)
>  {
> -       return __kvm_gpc_refresh(gpc, gpc->gpa, len);
> +       return __kvm_gpc_refresh(gpc, gpc->addr, len, gpc->addr_is_gpa);
>  }
>  EXPORT_SYMBOL_GPL(kvm_gpc_refresh);

I think I have a slight preference for leaving kvm_gpc_refresh()
working on a GPA unconditionally, thus calling __kvm_gpc_refresh() with
the final argument set to true.

Introduce another one-line wrapper kvm_gpc_refresh_hva() for the false
case. And perhaps BUG_ON() calling the 'wrong' refresh function?

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ