Commit 123e6c2
committed
Fix mmu notifiers for range-based invalidates
jira LE-3557
Rebuild_History Non-Buildable kernel-5.14.0-570.26.1.el9_6
commit-author Piotr Jaroszynski <[email protected]>
commit f7edb07
Update the __flush_tlb_range_op macro not to modify its parameters as
these are unexepcted semantics. In practice, this fixes the call to
mmu_notifier_arch_invalidate_secondary_tlbs() in
__flush_tlb_range_nosync() to use the correct range instead of an empty
range with start=end. The empty range was (un)lucky as it results in
taking the invalidate-all path that doesn't cause correctness issues,
but can certainly result in suboptimal perf.
This has been broken since commit 6bbd42e ("mmu_notifiers: call
invalidate_range() when invalidating TLBs") when the call to the
notifiers was added to __flush_tlb_range(). It predates the addition of
the __flush_tlb_range_op() macro from commit 3608390 ("arm64: tlb:
Refactor the core flush algorithm of __flush_tlb_range") that made the
bug hard to spot.
Fixes: 6bbd42e ("mmu_notifiers: call invalidate_range() when invalidating TLBs")
Signed-off-by: Piotr Jaroszynski <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: Alistair Popple <[email protected]>
Cc: Raghavendra Rao Ananta <[email protected]>
Cc: SeongJae Park <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: John Hubbard <[email protected]>
Cc: Nicolin Chen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Catalin Marinas <[email protected]>
Reviewed-by: Alistair Popple <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit f7edb07)
Signed-off-by: Jonathan Maple <[email protected]>1 parent cec3aae commit 123e6c2
1 file changed
+12
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
403 | 405 | | |
404 | | - | |
| 406 | + | |
405 | 407 | | |
406 | | - | |
407 | | - | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
412 | | - | |
413 | | - | |
| 414 | + | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
| 419 | + | |
418 | 420 | | |
419 | | - | |
| 421 | + | |
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
424 | | - | |
425 | | - | |
| 426 | + | |
| 427 | + | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
| |||
0 commit comments