From nobody Sat Feb 7 15:10:15 2026 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AF2D1FE451 for ; Sun, 1 Feb 2026 11:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769944102; cv=none; b=ha5d1Jg+Yt8X8FNcPaumzEaXWmVdmXxOhc6lrP9mRlkgO/G93aZRaT4vMoXT0PDAqLb62kzPB+sk8qXPMr2xeRYAYQptwrdNmNa3/nHbhCirAZqS9grlp59SfVNCT8vWu3QH+IcUVoPrSVeBTCI/J4Z36+xIHcj20gSmmmhPiS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769944102; c=relaxed/simple; bh=mkc7hOH9B2twwKTzoA6ogvA2SDUFCBAN4HIrkKPLpAc=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=RlsPsPNE/3WQgl4Tu4ovgneVdX0sg626xC+cQpiWKF8z2yW62rD9oqAhL7XWbxP3SoAoX4eX1uhWyEYViZ1D5Xjer++Y/hhjPdMv8YN8tIr5PgKH3oj435S3u5UFfy3OQkj1HIG7EHOXyux0w9cOh7qCFImAAPbvpdU5VgtjWCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-662f839d680so8519640eaf.2 for ; Sun, 01 Feb 2026 03:08:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769944100; x=1770548900; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ge40osO/07wEUcAf4vDsJoC7+EM/93GvUE6gxuDC+mY=; b=I7KbBmucFSsnNdmUDq0tQI7fTlnhCX4ab2/lzBlQGpwoDiDISvhA4LXUBI4gst3Hoe RQygV68yMckb7Zjhsbv0sfawiwMuAOXxjNm+azeVXxjzWJJAXjlD3WKROXZIeLhT7B1N E/9byI2SpwSGcYfKbkF6+3W8O+rTrho7tMFSipiezoqqphmhzeQSUlo5hDIM9POIVvbn XR7y+ddX6PX4Ztkn5IMnuisTfhYMhZ4ZqcjhkONNWRGuYjLlTo1Ga9FFZIAQshb6eocH sJDEPNjbW7wlH4j9yAUnTczcq/x5bc4zdDt6DTWavzb7jXLkikm1NPw5cvk6sgwyoAJL JRZQ== X-Gm-Message-State: AOJu0YxNRYXkogjHxTlKoJ08YQcOgYvR82Iu0hRLjcPvNy+thyguwRsM VucBjiQuh6MZH7h8ZUvZ4gwRgeYVu2XTXiBW2MROYjazUUOU2gvjcwRE0zYRA1k5vYTtwz3fXas /VpTQMbAiTqj/y+y6BV+puFa6q12LsS7o6DqpZ6gPCoAGGgp6oYDrzSf+E1s= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:4dfb:b0:663:9e7:8554 with SMTP id 006d021491bc7-6630f361607mr3797442eaf.36.1769944100063; Sun, 01 Feb 2026 03:08:20 -0800 (PST) Date: Sun, 01 Feb 2026 03:08:20 -0800 In-Reply-To: <697d115a.050a0220.1d61ec.0004.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <697f3424.a70a0220.2148d8.000c.GAE@google.com> Subject: Forwarded: [PATCH] KVM: guest_memfd: Restrict to order-0 folios until large folio support is implemented From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [PATCH] KVM: guest_memfd: Restrict to order-0 folios until large f= olio support is implemented Author: kartikey406@gmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= master The kvm_gmem_fault_user_mapping() function currently triggers a warning when it receives large folios, as indicated by the WARN_ON_ONCE() at line 416. The code comment in kvm_gmem_get_folio() clearly states "TODO: Support huge pages", indicating that large folio support is not yet implemented. Without explicitly restricting the folio order, filemap_grab_folio() may opportunistically allocate large folios when memory is available, causing the warning to trigger and the page fault to fail with VM_FAULT_SIGBUS. Fix this by explicitly setting the mapping's folio order range to (0, 0) during inode initialization in __kvm_gmem_create(), ensuring only order-0 (single-page) folios are allocated until proper large folio support is added. Reported-by: syzbot+33a04338019ac7e43a44@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3D33a04338019ac7e43a44 Signed-off-by: Deepanshu Kartikey --- virt/kvm/guest_memfd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index fdaea3422c30..4dc154b4b370 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -596,6 +596,7 @@ static int __kvm_gmem_create(struct kvm *kvm, loff_t si= ze, u64 flags) inode->i_mode |=3D S_IFREG; inode->i_size =3D size; mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER); + mapping_set_folio_order_range(inode->i_mapping, 0, 0); mapping_set_inaccessible(inode->i_mapping); /* Unmovable mappings are supposed to be marked unevictable as well. */ WARN_ON_ONCE(!mapping_unevictable(inode->i_mapping)); --=20 2.43.0