On 7/14/26 19:58, Yeoreum Yun wrote:
> On Tue, Jul 14, 2026 at 07:29:38PM +0200, David Hildenbrand (Arm) wrote:
>> On 7/14/26 18:51, Yeoreum Yun wrote:
>>>
>>> Furthermore, the effective_prot() need to require to identify whether
>>> it's the first pgtable to prevent the inheriting from dummy value.
>>> So I think it seems to make a ptdump_pt_level_first() like:
>>>
>>> diff --git a/mm/ptdump.c b/mm/ptdump.c
>>> index 973020000096c..2ec5700e4be5e 100644
>>> --- a/mm/ptdump.c
>>> +++ b/mm/ptdump.c
>>> @@ -190,6 +190,23 @@ void ptdump_walk_pgd(struct ptdump_state *st, struct
>>> mm_struct *mm, pgd_t *pgd)
>>> st->note_page_flush(st);
>>> }
>>>
>>> +bool pdtump_pt_level_first(struct mm_struct *mm, int level)
>>> +{
>>> + if (!mm || level > CONFIG_PGTABLE_LEVELS)
>>> + return false;
>>
>> Do we actually ever get !mm ?
>
> Yes. for the case of s390 use mm anyway for folded check.
That's not what I meant, let me clarify.
I think in ptdump_walk_pgd() it is guaranteed that mm != NULL, so I am wondering
why you are handling mm == NULL.
--
Cheers,
David