Skip to contentSkip to conversation

arch/arm/mm: fix major fault accounting when retrying under per-VMA lock

PATCH Applied Suren Baghdasaryan 3 participants 4 messages Jan 23, 2024 – Mar 25, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/arm/mm: fix major fault accounting when retrying under per-VMA lock

The change [1] missed ARM architecture when fixing major fault accounting for page fault retry under per-VMA lock. Add missing code to fix ARM architecture fault accounting.

[1] 46e714c729c8 ("arch/mm/fault: fix major fault accounting when retrying under per-VMA lock")

Fixes 12214eba1992 ("mm: handle read faults under the VMA lock")
---
 arch/arm/mm/fault.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mm/fault.c +2 -0
index e96fb40b9cc3..07565b593ed6 100644
@@ -298,6 +298,8 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 		goto done;
 	}
 	count_vm_vma_lock_event(VMA_LOCK_RETRY);
+	if (fault & VM_FAULT_MAJOR)
+		flags |= FAULT_FLAG_TRIED;
 
 	/* Quick path to respond to signals */
 	if (fault_signal_pending(fault, regs)) {
Signature · 1 line
2.43.0.429.g432eaa2c6b-goog
#1 lore raw
Quoted 7 lines · On Mon, 22 Jan 2024 22:43:05 -0800 Suren Baghdasaryan <[email protected]> wrote:

The change [1] missed ARM architecture when fixing major fault accounting for page fault retry under per-VMA lock. Add missing code to fix ARM architecture fault accounting.

[1] 46e714c729c8 ("arch/mm/fault: fix major fault accounting when retrying under per-VMA lock")

Fixes 12214eba1992 ("mm: handle read faults under the VMA lock")

What are the userspace-visible runtime effects of this change?

Is a cc:stable backport desirable?

Quoted 2 lines
#2 lore raw
Quoted 7 lines · Andrew Morton
Quoted 4 lines · On Mon, 22 Jan 2024 22:43:05 -0800 Suren Baghdasaryan <[email protected]> wrote:

The change [1] missed ARM architecture when fixing major fault accounting for page fault retry under per-VMA lock. Add missing code to fix ARM architecture fault accounting.

Quoted 5 lines
Quoted 3 lines

[1] 46e714c729c8 ("arch/mm/fault: fix major fault accounting when retrying under per-VMA lock")

Fixes 12214eba1992 ("mm: handle read faults under the VMA lock")

What are the userspace-visible runtime effects of this change?

The user-visible effects is that it restores correct major fault accounting that was broken after [2] was merged in 6.7 kernel. The more detailed description is in [3] and this patch simply adds the same fix to ARM architecture which I missed in [3]. I can re-send the patch with the full description from [3] if needed.

Quoted 2 lines

Is a cc:stable backport desirable?

Yes, I guess since [2] was merged in 6.7, cc-ing stable would be desirable. Please let me know if you want me to re-send the patch with full description and CC'ing stable.

[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/

Quoted 3 lines
Quoted 3 lines
#3 lore raw
In reply to Suren Baghdasaryan
This patch was applied to riscv/linux.git (fixes) by Andrew Morton <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (fixes)
by Andrew Morton <[email protected]>:

Quoted 9 lines · On Mon, 22 Jan 2024 22:43:05 -0800 you wrote:

The change [1] missed ARM architecture when fixing major fault accounting for page fault retry under per-VMA lock. Add missing code to fix ARM architecture fault accounting.

[1] 46e714c729c8 ("arch/mm/fault: fix major fault accounting when retrying under per-VMA lock")

Fixes 12214eba1992 ("mm: handle read faults under the VMA lock")

[...]

Here is the summary with links:
- [1/1] arch/arm/mm: fix major fault accounting when retrying under per-VMA lock

    https://git.kernel.org/riscv/c/e870920bbe68

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html