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:   Mon, 3 Apr 2023 15:50:53 -0700
From:   Vipin Sharma <vipinsh@...gle.com>
To:     David Matlack <dmatlack@...gle.com>
Cc:     seanjc@...gle.com, pbonzini@...hat.com, bgardon@...gle.com,
        jmattson@...gle.com, mizhang@...gle.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Patch v4 16/18] KVM: x86/mmu: Allocate numa aware page tables
 during page fault

On Tue, Mar 28, 2023 at 5:21 PM David Matlack <dmatlack@...gle.com> wrote:
>
> On Mon, Mar 06, 2023 at 02:41:25PM -0800, Vipin Sharma wrote:
> > +                     r = mmu_topup_sp_memory_cache(&vcpu->arch.mmu_shadow_page_cache[nid],
> > +                                                   PT64_ROOT_MAX_LEVEL);
>
> This ignores the return value of mmu_topup_sp_memory_cache() for all but
> the last node.
>

Yeah, I will change it to exit the function on the first error.

> >  static int mmu_memory_cache_try_empty(struct kvm_mmu_memory_cache *cache,
>
> nit: s/cache/caches/
>

Okay.

> > -                                   struct mutex *cache_lock)
> > +                                   int cache_count, struct mutex *cache_lock)
>
> nit: s/cache_count/nr_caches/

Okay.

>
> >  {
> > -     int freed = 0;
> > +     int freed = 0, nid;
>
> nit: s/nid/i/
>
> (nothing in this function knows about NUMA so "nid" is an odd name here)

Okay.

> > +static inline bool kvm_numa_aware_page_table_enabled(struct kvm *kvm)
> > +{
> > +     return kvm->arch.numa_aware_page_table;
>
> No need for this helper function. Accessing the variable directly makes
> lines shorter, does not introduce any code duplication, and reduces
> abstraction.
>

Okay.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ