From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33957606A32F for ; Thu, 3 Dec 2026 09:26:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=fxK9BRRs; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oc9j5fh9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Date: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Cc:To:Subject: From:Message-ID:MIME-Version:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=XHMPx2x4BOPZSf4uRdAUpSK3AsO/OmBiW7dV+D+nVGw=; b=fxK9BRRsgpnbA3Rd9QqnKxJIkM mYY21K7B41TwVoVTMnDGx8Uxg22lZOmtPqIBtJ4Gx3Ltv57+RdZjJfzzYnuMiBMJBdYSuAgF5YKms jmomChj8YrG8BMqkeeNOiy8xXpVfRJqIpfPWX0iLPncFTLLsC/Ik/JVSZTQG80EgdZOtEKGzTivRq mSHn8ev355r4mIGrRw5t7oJtd8420EX4ETrhUxRis0fUrAhpXIWvtFFaOJlhiUM1SxirotZ0yeuGI mGMJHeJ3jQHhbgxM49JPkOYLh+OgPukY3eWiYN9+neSz29vTUYvpnlta2Um7r+qZ/uavOwOZblMPa 6JkvT+ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ35c-0000000Dz9n-0Czr; Thu, 03 Dec 2026 09:26:56 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ35O-0000000Dz5R-3HtN for kexec@lists.infradead.org; Thu, 03 Dec 2026 09:26:42 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id D9667625C7; Thu, 3 Dec 2026 09:26:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C58001F00896; Thu, 3 Dec 2026 09:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796290001; bh=XHMPx2x4BOPZSf4uRdAUpSK3AsO/OmBiW7dV+D+nVGw=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=oc9j5fh9YEqjA9HdBpcyT/22nVwND/Vqql8MAX4M/lLDPgkCV4BrSv2m0wL/qTGoU Y6lqDmwcAqKUNxUcvKF6U2lYy+dD3NkB3gPSfe2PsCRSILTSirb66Z1727AVBGkhHw zxU7KtYQmfaoQ4x2kQCXWRgtRR/ijeCV8vJ2wCf5ZcHEgH9JNsLgU8i7//Iy6DbQMS 5+s7tusybt6Z0DhubGj5yM2Y+ddSWWn8+gtY2EWxRgFZx5MJ79hgSAxlAxCk3h+IIO /LrNuw93mohNQwcZfEF+n2zg+FLL/Pw9SvN31khwawBh/ePeJcvJCirh2nvj6XQiVS Ik8YfC0fJyJuQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [RFC PATCH 2/4] mm/vmalloc: add VM_HAS_HUGE_VMAP To: "Wen Jiang" , "Andrew Morton" , "Uladzislau Rezki" , linux-mm@kvack.org Cc: "Barry Song" , "Ryan Roberts" , "Dev Jain" , "Anshuman Khandual" , "David Hildenbrand" , "Catalin Marinas" , "Will Deacon" , "Leo Yan" , "Xueyuan Chen" , "Mike Rapoport" , "Pasha Tatashin" , "Pratyush Yadav" , "Alexander Graf" , kexec@lists.infradead.org, "Wen Jiang" In-Reply-To: <20261202091212.363755-3-jiangwenxiaomi@gmail.com> References: <20261202091212.363755-1-jiangwenxiaomi@gmail.com> <20261202091212.363755-3-jiangwenxiaomi@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 09:26:40 +0000 X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "kexec" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] kho: missing VM_HAS_HUGE_VMAP and page_order in kho_restore_vmalloc() -- commit d2fc3c17bc7bc213d515a16185a8e014dcf7b7c0 Author: Wen Jiang mm/vmalloc: add VM_HAS_HUGE_VMAP This commit introduces the VM_HAS_HUGE_VMAP flag to indicate that at least part of a vmalloc area has huge page table mappings, and updates is_vm_area_hugepages(), vrealloc(), and KHO to use it. > diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec= _handover.c > index 42c6609a1766a..c2d5823b498a3 100644 > --- a/kernel/liveupdate/kexec_handover.c > +++ b/kernel/liveupdate/kexec_handover.c > @@ -1288,7 +1288,8 @@ void kho_unpreserve_pages(struct page *page, unsign= ed long nr_pages) > EXPORT_SYMBOL_GPL(kho_unpreserve_pages); > =20 > /* vmalloc flags KHO supports */ > -#define KHO_VMALLOC_SUPPORTED_FLAGS (VM_ALLOC | VM_ALLOW_HUGE_VMAP) > +#define KHO_VMALLOC_SUPPORTED_FLAGS (VM_ALLOC | VM_ALLOW_HUGE_VMAP | \ > + VM_HAS_HUGE_VMAP) > =20 > /* KHO internal flags for vmalloc preservations */ > #define KHO_VMALLOC_ALLOC 0x0001 [Severity: Medium] Should kho_restore_vmalloc() also set VM_HAS_HUGE_VMAP and area->page_order when restoring an area with order > 0? kho_restore_vmalloc() maps the restored range with vmap_pages_range(..., PAGE_SHIFT + order), creating huge page table entries when order > 0, but never sets VM_HAS_HUGE_VMAP in area->flags or restores area->page_order. After restore, is_vm_area_hugepages() returns false and shrinking the area with vrealloc() attempts to unmap tail base pages inside a huge mapping, triggering a warning in the vunmap path and clearing the entire huge entry. Exposing and calling set_vm_area_page_order(area, order) in kho_restore_vmalloc() would restore both fields. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202091212.3637= 55-1-jiangwenxiaomi@gmail.com?part=3D2