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
| ||
|
Message-ID: <163c7948-f41d-986d-871b-9689995ba282@redhat.com> Date: Fri, 15 Oct 2021 19:48:05 +0200 From: Paolo Bonzini <pbonzini@...hat.com> To: Sean Christopherson <seanjc@...gle.com> Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, syzbot+e0de2333cbf95ea473e8@...kaller.appspotmail.com Subject: Re: [PATCH] KVM: replace large kvmalloc allocation with vmalloc On 15/10/21 19:28, Sean Christopherson wrote: >> for (i = 0; i < KVM_PAGE_TRACK_MAX; i++) { >> slot->arch.gfn_track[i] = >> - kvcalloc(npages, sizeof(*slot->arch.gfn_track[i]), >> - GFP_KERNEL_ACCOUNT); >> + vcalloc(npages, sizeof(*slot->arch.gfn_track[i])); > This loses the memcg accounting, which is somewhat important for the theoretical > 4MiB allocations:-) True, and in fact 4 MiB is not so theoretical. > Maybe split out the introduction of vcalloc() to a separate patch (or two) and > introduce additional helpers to allow passing in gfp_t to e.g. __vzalloc()? Yes, this is what actually slowed me down this week.This is the bare minimum that I can send to Linus right now to avoid the WARN. I have patches to clean all of this up, but they will have to go throw Andrew Morton; he will decide whether to throw them in 5.15 or go through stable, but anyway 5.16.1 or .2 should have the accounting back at most. Paolo
Powered by blists - more mailing lists