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]
Date:   Wed, 10 Feb 2021 16:50:35 -0800
From:   Ben Gardon <bgardon@...gle.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>, kvm <kvm@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Yanan Wang <wangyanan55@...wei.com>,
        Andrew Jones <drjones@...hat.com>,
        Peter Xu <peterx@...hat.com>,
        Aaron Lewis <aaronlewis@...gle.com>
Subject: Re: [PATCH 01/15] KVM: selftests: Explicitly state indicies for
 vm_guest_mode_params array

On Wed, Feb 10, 2021 at 3:06 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> Explicitly state the indices when populating vm_guest_mode_params to
> make it marginally easier to visualize what's going on.
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>

Reviewed-by: Ben Gardon <bgardon@...gle.com>

> ---
>  tools/testing/selftests/kvm/lib/kvm_util.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
> index d787cb802b4a..960f4c5129ff 100644
> --- a/tools/testing/selftests/kvm/lib/kvm_util.c
> +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
> @@ -154,13 +154,13 @@ _Static_assert(sizeof(vm_guest_mode_string)/sizeof(char *) == NUM_VM_MODES,
>                "Missing new mode strings?");
>
>  const struct vm_guest_mode_params vm_guest_mode_params[] = {
> -       { 52, 48,  0x1000, 12 },
> -       { 52, 48, 0x10000, 16 },
> -       { 48, 48,  0x1000, 12 },
> -       { 48, 48, 0x10000, 16 },
> -       { 40, 48,  0x1000, 12 },
> -       { 40, 48, 0x10000, 16 },
> -       {  0,  0,  0x1000, 12 },
> +       [VM_MODE_P52V48_4K]     = { 52, 48,  0x1000, 12 },
> +       [VM_MODE_P52V48_64K]    = { 52, 48, 0x10000, 16 },
> +       [VM_MODE_P48V48_4K]     = { 48, 48,  0x1000, 12 },
> +       [VM_MODE_P48V48_64K]    = { 48, 48, 0x10000, 16 },
> +       [VM_MODE_P40V48_4K]     = { 40, 48,  0x1000, 12 },
> +       [VM_MODE_P40V48_64K]    = { 40, 48, 0x10000, 16 },
> +       [VM_MODE_PXXV48_4K]     = {  0,  0,  0x1000, 12 },
>  };
>  _Static_assert(sizeof(vm_guest_mode_params)/sizeof(struct vm_guest_mode_params) == NUM_VM_MODES,
>                "Missing new mode params?");
> --
> 2.30.0.478.g8a0d178c01-goog
>

Powered by blists - more mailing lists