Re: [PATCH 0/2] dax: Fix Device DAX range allocation validation

From: Muchun Song

Date: Sat Sep 19 2026 - 01:04:41 EST




> On Sep 19, 2026, at 01:02, Dave Jiang <dave.jiang@xxxxxxxxx> wrote:
>
>
>
> On 9/15/26 2:56 AM, Muchun Song wrote:
>> While working on the HugeTLB Vmemmap Optimization (HVO) generalization,
>> Sashiko reported that memmap_init_zone_device() could be asked to
>> initialize struct pages with a large-page order for a physical range
>> that was not naturally aligned to that order.
>>
>> Following the Device DAX call path confirmed that the condition was
>> reachable. Device DAX range validation checks the range size, but not
>> its start address. An unaligned range can therefore reach
>> memmap_init_zone_device() after the device binds, and a subsequent write
>> to a userspace mapping may trigger a kernel panic. With the help of an
>> LLM, I was able to reproduce the failure.
>>
>> The automatic resize path has a related problem. It can split an aligned
>> size request across arbitrary free gaps, consume an unaligned fragment,
>> and leave the resize partially applied when a later allocation fails.
>>
>> This series validates both the start and size of every Device DAX range
>> and makes automatic resize account only for usable aligned space. It
>> also fixes the mapping sysfs attribute to propagate validation failures
>> instead of reporting success without allocating the requested range.
>>
>> Muchun Song (2):
>> dax/bus: fix Device DAX range alignment validation
>> dax/bus: fix mapping attribute error reporting
>>
>> drivers/dax/bus.c | 144 +++++++++++++++++++++++++++++++++++-----------
>> 1 file changed, 109 insertions(+), 35 deletions(-)
>>
>>
>> base-commit: 1a1de54f7369cd2b5bac0f265910e60ad3a6b4c3
>
> This commit does not exist in Linus's tree. Can you please base the series on top of the latest 7.3-rc tag so sashiko can look over it? Thanks!

Hi,

The series is based on linux-next 20260914, and drivers/dax/bus.c is identical
between that branch and the latest 7.3-rc. Sashiko has also already reviewed it
here: [1].

Therefore, I didn't quite catch your point. Are you expecting Sashiko to conduct
another round of review based on the 7.3-rc code? (Are you concerned about issues
introduced by the additional commits in linux-next compared to 7.3-rc?)

[1] https://sashiko.dev/#/patchset/20260915095621.3744167-1-songmuchun%40bytedance.com

Thanks,
Muchun