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: <Y5gTFPxUTXDsQb5p@google.com>
Date:   Tue, 13 Dec 2022 05:52:20 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Yu Zhang <yu.c.zhang@...ux.intel.com>
Cc:     pbonzini@...hat.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: X86: Use the common definition - 'GPA_INVALID' for
 X86

On Fri, Dec 09, 2022, Yu Zhang wrote:
> KVM already has a 'GPA_INVALID' defined as (~(gpa_t)0) in
> kvm_types.h, and it is used by ARM and X86 xen code. We do
> not need a replicated 'INVALID_GPA' for X86 specifically.
> Just replace it with the common one.
> 
> Tested by rebuilding KVM.
> 
> No functional change intended.
> 
> Signed-off-by: Yu Zhang <yu.c.zhang@...ux.intel.com>
> ---
>  arch/x86/include/asm/kvm_host.h |  2 -
>  arch/x86/kvm/hyperv.c           |  2 +-
>  arch/x86/kvm/mmu/paging_tmpl.h  |  6 +--
>  arch/x86/kvm/svm/nested.c       |  4 +-
>  arch/x86/kvm/svm/svm.c          |  4 +-
>  arch/x86/kvm/vmx/nested.c       | 66 ++++++++++++++++-----------------
>  arch/x86/kvm/vmx/sgx.c          |  2 +-
>  arch/x86/kvm/vmx/vmx.c          |  6 +--
>  arch/x86/kvm/x86.c              | 18 ++++-----
>  9 files changed, 54 insertions(+), 56 deletions(-)

What if we rename GPA_INVALID to INVALID_GPA and modify _those_ users?  I have
a slight preference for INVALID_GPA, and we also have INVALID_PAGE.  It'll also
yield a smaller diff.

EVMPTR_INVALID is the counter argument, but that's more of an error code than a
semi-arbitrary value, e.g. there's also EVMPTR_MAP_PENDING.

$ git grep GPA_INVALID | wc -l
17
$ git grep INVALID_GPA | wc -l
55

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ