[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef49981b-b4ae-4a39-bfb2-7c2065d7bc98@redhat.com>
Date: Tue, 15 Oct 2024 16:40:47 +0200
From: David Hildenbrand <david@...hat.com>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
syzbot+7d917f67c05066cec295@...kaller.appspotmail.com,
Andrew Morton <akpm@...ux-foundation.org>, Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH v1] mm/pagewalk: fix usage of pmd_leaf()/pud_leaf()
without present check
On 15.10.24 16:32, Kirill A. Shutemov wrote:
> On Tue, Oct 15, 2024 at 01:12:36PM +0200, David Hildenbrand wrote:
>> pmd_leaf()/pud_leaf() only implies a pmd_present()/pud_present() check on
>> some architectures.
>
> Should we clarify what behaviour we actually want from arch code?
We probably should document somewhere that things like pmd_special(),
pmd_leaf() ... should only be used when we know that the PMD is present.
I wonder if we should even add ways to detect mis-use
Jann also raised that recently in a private message, that it is rather
unclear (well, and repeatedly leads to issues) when pmd_leaf() is valid
to be called.
Thanks!
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists