Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.122 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796174278; b=2eC+uJ8RVKHZ7J+WPxHxGn1gDIuw1LWPdRPh5x4q/wmQcGLakoe0PfkbMbEJH/t2D1fG 2WeKcWu+D2lDUd3ELB9bjD1/uKYO3D3LHRCJNf6MBEHu3THRjmC6+xLDc5ct5wl+GuG+N cRN3f19ZDDDONGCg75Sey9zT4+39kuSxkDQro25vfNos/jUDe3hFuz7iBpHu/x7D8Grx+ 40e1NG5zjo0P70a/FZWAmrI0W7FBM+E9XbtOVq6UB+izfUxsW8QTXCrZgktqHR2KYNmqZ tvae1zbcsDI83Hgz/BsXqvOKuzo3mIAY8X/Wt5+FOI8UbXrbf6XLvO7mFoqVwTGfWHA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796174278; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=m0MGKxbCgSPcQeCEBTTwvyfhiWvMmQdzmgKHso2RcLs=; b=wYdF3o6MB5oIBWansGwFS4lTyRdC2uTSNpqvYnGsvZg8mkf74FVMK7s6GVXDzyeqli58 bJ6+ddidD58wLg+3qlcnPbalFAxytLA+jQuTMUprs8+876XH/OG2H1JkIMVXsxZi2zNJO 78U//K3NpScWykcmVKJG2ktL7H/720mn7d4wruk0dJQ4W1U8fRsqpNjT8x2zpnhRGVsdZ V9TBpWBZjNnvNNoE5/C14xhZE+2tjhTPFH/f0zzhxb82QqHTHj6sbyaj6qhkNYbJMmB3Y +XdLCiSpQLYU3h9tq8cIvBQ7o2pk1dCQR6bR/c3VB4TzbXzZpLe0s0t4kmnZ4onu+XA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=EEuW10Cb; arc=none smtp.remote-ip=95.215.58.122 Received: from mta1.migadu.com (out-122.mta1.migadu.com [95.215.58.122]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6FAF606A32E for ; Wed, 2 Dec 2026 01:17:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E6FAF606A32E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=EEuW10Cb X-Envelope-To: sashiko-reviews@lists.linux.dev 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: sashiko-reviews@lists.linux.dev 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-Mailing-List: sashiko-reviews@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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