Re: [PATCH V3 2/2] arm64/mm: Reject memory removal that splits a kernel leaf mapping

From: David Hildenbrand (Arm)

Date: Wed Mar 04 2026 - 04:00:33 EST


On 3/4/26 09:53, Anshuman Khandual wrote:
>
>
> On 03/03/26 2:30 PM, David Hildenbrand (Arm) wrote:
>>>
>>> Probably nothing is broken now I guess but the original memory hot remove
>>> patch should have taken care of this scenario. Although don't have strong
>>> opinions either way. We could drop both "Fixes" and "Closes" tags here if
>>> that is preferred.
>>>
>>
>> We tend to only tag actual fixes. If we consider this a possible fix, we
>> should ask ourselves whether this would be stable material.
>
> Ryan had earlier asked for the Cc: stable to be dropped
> as this was not an actual fix. But seems like we should
> drop these Fixes/Closes tags as well.

If there are no know problems (no bugs), then I would just use

Link: instead of Closes:

And the Suggested-by:.

>
>>
>> ...
>>
>>>
>>> We might not in reality but in order to be sure just an additional protection.
>>
>> I'm rather wondering if this would indicate a real bug somewhere else
>> that we would silently swallow.
>>
>> Anyhow, no real preference from my side, just something I considered weird.
>>
>> [...]
>>
>>
>> Just to clarify:
>>
>> What I meant here is: with CONFIG_SPARSEMEM but without
>> CONFIG_SPARSEMEM_VMEMMAP.
>
> Alright but does the commit message or pfn_to_page() code
> block here needs a comment about this ? OR it is apparent
> enough ?

You could add a

BUILD_BUG_ON(!IS_ENABLED(CONFIG_SPARSEMEM_VMEMMAP));

to check and document in a single statement.

--
Cheers,

David