[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250305102159.96420-1-dev.jain@arm.com>
Date: Wed, 5 Mar 2025 15:51:59 +0530
From: Dev Jain <dev.jain@....com>
To: david@...hat.com,
willy@...radead.org,
ziy@...dia.com,
hughd@...gle.com,
ryan.roberts@....com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: [QUESTION] Plain dereference and READ_ONCE() in fault handler
In __handle_mm_fault(),
1. Why is there a barrier() for the PUD logic?
2. For the PMD logic, in the if block, we use *vmf.pmd, and in the else block
we use pmdp_get_lockless(); what if someone changes the pmd just when we
have begun processing the conditions in the if block, fail in the if block
and then the else block operates on a different pmd value. Shouldn't we cache
the value of the pmd and operate on a single consistent value until we take the
lock and then finally check using pxd_same() and friends?
Thanks,
Dev
Powered by blists - more mailing lists