linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [QUESTION] Plain dereference and READ_ONCE() in fault handler
@ 2025-03-05 10:21 Dev Jain
  2025-03-05 10:46 ` David Hildenbrand
  0 siblings, 1 reply; 5+ messages in thread
From: Dev Jain @ 2025-03-05 10:21 UTC (permalink / raw)
  To: david, willy, ziy, hughd, ryan.roberts, linux-kernel, linux-mm

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-05 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-05 10:21 [QUESTION] Plain dereference and READ_ONCE() in fault handler Dev Jain
2025-03-05 10:46 ` David Hildenbrand
2025-03-05 14:12   ` Matthew Wilcox
2025-03-05 15:02   ` Dev Jain
2025-03-05 19:59     ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox