From nobody Sat Feb 7 13:41:42 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 79F9529408 for ; Sun, 1 Feb 2026 07:48:32 +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=1769932113; cv=none; b=ZWtENk5TLZb6TV+0lXs/rnSgvBRYN18bIAw2kdqWMVcSbeScrNRSn/T3IK6WP2f5BZ1dHhUkXP8TWHJ6v6c0XmDHnN9NdeBdzv+kmJVUKbb1Mo+xcGmz48QBhajJHBthITQuhBNSl+q8Ei9U9CYKIvlmD+J9JaPx3dEmyKcF+Xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769932113; c=relaxed/simple; bh=qNYCj8UrNoVO1j7Yqdh06SiMbXhSKe7FZvu93HGQdtA=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=LO4O3iVkT+6UKUcrLvx3hvKyP60VPg+A7yZIoGCS1duXkamm+jifgamwhEPcapFLu/3iX7RrpN5I0rt/cuzLkmcQ7YZNsKMIOPN1CayxDxEhcE5nxWEKya98rDfpem9bdWeeyPxG376ixf0znQ987VQ6JtHLZJB9ttIpdYv5QkE= 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-66304fd62ebso13697840eaf.3 for ; Sat, 31 Jan 2026 23:48:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769932111; x=1770536911; 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=MVN7JnuZTeCz/4EVp2Mt5T1ol2RjFGz9AZLdjPTgGKA=; b=BSr1OBnnn8MZDgFZi89Dyl/iMscFOTwQKl2V/cLWZwtx1YNbnDbsxIe94ZdZ5KW6tq BQp/froAVNlMxWwissBlLeyZYI5UU8T3Ubtd6V6b6ukdlokeBTs9PEjsEmXf4sZqxPGQ FF/oPxD2aSTeEsH1RMnGX0tj7V8s2onLvzG19kXmpVROfHL+cHjcd0vEk1NL2/tsDZeO 4VPy8JYxis2GAfjupE47pyIsylF58ORPGYiI0ryLS3xr5DQukptgmp3hUcfBXU50SFVh owGEmRcZfqZrEzpCg6y8ror2w4oo0RjUNEsuYFTMSRqxzrMyuM3j6iHcepCouVL+vxJ0 v5TQ== X-Gm-Message-State: AOJu0YxiHHzHjpaZLWIK6wEdFd8CdzH5TdlqakqyPp5aDo8sCIRfJl5m XWuQjgKBuQqTEZCJ/sQMltAdaujmzX27f+SN7mfpNqJK3h1TWtvqS6n+rhS/J/OlTieFylbuIvh K5ryxMNSMaxdqvSE1S1wzNxa4pUuO4YON3NZP2/bK1s8kLhBgP0r8sNvq/GE= 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:4810:b0:663:eeb:4646 with SMTP id 006d021491bc7-6630f0317c4mr3114897eaf.16.1769932111315; Sat, 31 Jan 2026 23:48:31 -0800 (PST) Date: Sat, 31 Jan 2026 23:48:31 -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: <697f054f.050a0220.16b13.009a.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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index fdaea3422c30..679814ec1874 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -596,7 +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_inaccessible(inode->i_mapping); + mapping_set_folio_order_range(inode->i_mapping, 0, 0); /* Unmovable mappings are supposed to be marked unevictable as well. */ WARN_ON_ONCE(!mapping_unevictable(inode->i_mapping)); =20 --=20 2.43.0