From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>,
syzbot <syzbot+e0de2333cbf95ea473e8@syzkaller.appspotmail.com>
Cc: bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
jarkko@kernel.org, jmattson@google.com, joro@8bytes.org,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sgx@vger.kernel.org, mingo@redhat.com,
syzkaller-bugs@googlegroups.com, tglx@linutronix.de,
vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Ben Gardon <bgardon@google.com>
Subject: Re: [syzbot] WARNING: kmalloc bug in memslot_rmap_alloc
Date: Wed, 8 Sep 2021 07:36:02 +0200 [thread overview]
Message-ID: <2e6b9e6d-30b4-6cb4-1eb7-c626e5d2adb3@redhat.com> (raw)
In-Reply-To: <YTehmR1+G34uOHh3@google.com>
On 07/09/21 19:30, Sean Christopherson wrote:
> The allocation in question is for KVM's "rmap" to translate a guest pfn to a host
> virtual address. The size of the rmap in question is an unsigned long per 4kb page
> in a memslot, i.e. on x86-64, 8 bytes per 4096 bytes of guest memory in a memslot.
> With INT_MAX=0x7fffffff, KVM will trip the WARN and fail rmap allocations for
> memslots >= 1tb, and Google already has VMs that create 1.5tb memslots (12tb of
> total guest memory spread across 8 virtual NUMA nodes).
We can just use vmalloc. The warning was only added on kvmalloc, and
vmalloc suits the KVM rmap just fine.
The maximum that Red Hat has tested, as far as I know, is about 4TiB
(and it was back when there was no support for virtual NUMA nodes in
QEMU, so it was all in a single memslot).
Paolo
prev parent reply other threads:[~2021-09-08 5:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-05 20:22 syzbot
2021-09-07 17:30 ` Sean Christopherson
2021-09-07 18:05 ` Ben Gardon
2021-09-08 5:36 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2e6b9e6d-30b4-6cb4-1eb7-c626e5d2adb3@redhat.com \
--to=pbonzini@redhat.com \
--cc=bgardon@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jarkko@kernel.org \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=syzbot+e0de2333cbf95ea473e8@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®