From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D6422606A31A for ; Wed, 2 Dec 2026 01:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=EEuW10Cb Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B06610E1A9; Wed, 2 Dec 2026 01:18:04 +0000 (UTC) Received: from mta0.migadu.com (out-137.mta0.migadu.com [91.218.175.137]) by gabe.freedesktop.org (Postfix) with ESMTPS id 06EF310E45B for ; Wed, 2 Dec 2026 01:17:57 +0000 (UTC) X-Envelope-To: dri-devel@lists.freedesktop.org DKIM-Signature: a=rsa-sha256; bh=m0MGKxbCgSPcQeCEBTTwvyfhiWvMmQdzmgKHso2RcLs=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796174276; v=1; x=1796779076; b=EEuW10Cb16YzrY8ZxTUcRsgoM2Ddi2pZuyCKhgqNT31A/fk7DGMW4qhgA06lLamZnSlV1zcS Kul6es8OY72hj/toLdskx4l9kBnrlIuCCbCg/fiMvJuQVAbKHJQWRWh1/MpZheO6SjEB00HL0gL 9dAEczVVhicYKRJv9TPXjFC4= X-Envelope-To: dri-devel@lists.freedesktop.org Received: by smtp.migadu.com with ESMTPS id 53c95682dc5e24f6; Wed, 02 Dec 2026 01:17:55 +0000 X-Mizu-Trace-ID: 53c95682dc5e24f6 X-Migadu-Flow: FLOW_OUT From: Qiliang Yuan To: sashiko-reviews@lists.linux.dev Cc: Qiliang Yuan , dri-devel@lists.freedesktop.org, media-ci@linuxtv.org Subject: Re: [PATCH v3 2/3] udmabuf: map huge page backed ranges with PMDs Date: Tue, 1 Dec 2026 20:17:49 -0500 Message-ID: <20261202011749.691421-1-qiliang.yuan@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20261201-feat-udmabuf-huge-pfnmap-v3-0-144cc7a48f09@linux.dev> <20261201-feat-udmabuf-huge-pfnmap-v3-2-144cc7a48f09@linux.dev> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-6.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no 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 On Tue, 01 Dec 2026 17:34:31 +0000, sashiko-bot@kernel.org wrote: > [Severity: High] > Can udmabuf_vm_huge_fault() and udmabuf_vm_fault() race on the same PMD > entry when the prerequisite "mm: fix races between huge and non-huge > faults in PFN mappings" series is not present in the tree? [...] Only without that series, as the commit message says: the patch depends on it, and it fixes exactly these three cases in walk_to_pmd(), insert_pfn() and insert_pmd(). It is in mm-core (core-7.5.misc) and linux-next. > [Severity: Medium] > Does pmd_addr_end(vmf->address, vma->vm_end) fail to clamp end to a > single page table on architectures with folded PMDs? [...] > Calculating the upper bound explicitly from (vmf->address & PMD_MASK) + > PMD_SIZE (as folio_pte_range() does in mm/memory.c) would clamp the range > on folded-PMD kernels as well. Right, with a folded PMD pmd_addr_end() returns vma->vm_end and the pre-fault runs to the end of the VMA, as before this patch. Nothing maps a PMD there, so it is not a correctness issue, but the range is not limited as the commit message says. I'll compute the bound from (vmf->address & PMD_MASK) + PMD_SIZE in v4. Thanks, Qiliang