All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qiliang Yuan <qiliang.yuan@linux.dev>
To: sashiko-reviews@lists.linux.dev
Cc: Qiliang Yuan <qiliang.yuan@linux.dev>,
	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	[thread overview]
Message-ID: <20261202011749.691421-1-qiliang.yuan@linux.dev> (raw)
In-Reply-To: <sashiko-outbox-243856@kernel.org>

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

  reply	other threads:[~2026-12-02  1:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 17:16 [PATCH v3 0/3] udmabuf: speed up mmap() of huge page backed buffers Qiliang Yuan
2026-12-01 17:16 ` [PATCH v3 1/3] dma-buf: align large mappings to PMD boundaries Qiliang Yuan
2026-12-01 17:16 ` [PATCH v3 2/3] udmabuf: map huge page backed ranges with PMDs Qiliang Yuan
2026-12-01 17:34   ` sashiko-bot
2026-12-02  1:17     ` Qiliang Yuan [this message]
2026-12-01 17:16 ` [PATCH v3 3/3] selftests/udmabuf: test mapping a huge page backed udmabuf Qiliang Yuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202011749.691421-1-qiliang.yuan@linux.dev \
    --to=qiliang.yuan@linux.dev \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=media-ci@linuxtv.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.