Skip to contentSkip to conversation

Revert "riscv: mm: accelerate pagefault when badaccess"

PATCH Applied Palmer Dabbelt 4 participants 4 messages May 30, 2024 – May 31, 2024 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "riscv: mm: accelerate pagefault when badaccess"

From: Palmer Dabbelt <[email protected]>

I accidentally picked up an earlier version of this patch, which had already landed via mm. The patch I picked up contains a bug, which I kept as I thought it was a fix. So let's just revert it.

This reverts commit 4c6c0020427a4547845a83f7e4d6085e16c3e24f.

Fixes 4c6c0020427a ("riscv: mm: accelerate pagefault when badaccess")
---
 arch/riscv/mm/fault.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/mm/fault.c +2 -2
index b3fcf7d67efb..5224f3733802 100644
@@ -293,8 +293,8 @@ void handle_page_fault(struct pt_regs *regs)
 	if (unlikely(access_error(cause, vma))) {
 		vma_end_read(vma);
 		count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
-		tsk->thread.bad_cause = SEGV_ACCERR;
-		bad_area_nosemaphore(regs, code, addr);
+		tsk->thread.bad_cause = cause;
+		bad_area_nosemaphore(regs, SEGV_ACCERR, addr);
 		return;
 	}
 
Signature · 1 line
2.45.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Palmer Dabbelt

From: Palmer Dabbelt <[email protected]>

I accidentally picked up an earlier version of this patch, which had already landed via mm. The patch I picked up contains a bug, which I kept as I thought it was a fix. So let's just revert it.

This reverts commit 4c6c0020427a4547845a83f7e4d6085e16c3e24f.

Yes, this one is the wrong v1.

Quoted 22 lines
Fixes 4c6c0020427a ("riscv: mm: accelerate pagefault when badaccess")
---
  arch/riscv/mm/fault.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/mm/fault.c +2 -2
index b3fcf7d67efb..5224f3733802 100644
@@ -293,8 +293,8 @@ void handle_page_fault(struct pt_regs *regs)
  	if (unlikely(access_error(cause, vma))) {
  		vma_end_read(vma);
  		count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
-		tsk->thread.bad_cause = SEGV_ACCERR;
-		bad_area_nosemaphore(regs, code, addr);
+		tsk->thread.bad_cause = cause;
+		bad_area_nosemaphore(regs, SEGV_ACCERR, addr);
  		return;
  	}
 
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Palmer Dabbelt
Quoted 19 lines · Palmer Dabbelt

From: Palmer Dabbelt <[email protected]>

I accidentally picked up an earlier version of this patch, which had already landed via mm. The patch I picked up contains a bug, which I kept as I thought it was a fix. So let's just revert it.

This reverts commit 4c6c0020427a4547845a83f7e4d6085e16c3e24f.

Fixes 4c6c0020427a ("riscv: mm: accelerate pagefault when badaccess")
---
  arch/riscv/mm/fault.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/mm/fault.c +0 -0
index b3fcf7d67efb..5224f3733802 100644

arch/riscv/mm/fault.c void handle_page_fault(struct pt_regs *regs) · line 300

Quoted 10 lines
arch/riscv/mm/fault.c +2 -2
@@ -293,8 +293,8 @@ void handle_page_fault(struct pt_regs *regs)
  	if (unlikely(access_error(cause, vma))) {
  		vma_end_read(vma);
  		count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
-		tsk->thread.bad_cause = SEGV_ACCERR;
-		bad_area_nosemaphore(regs, code, addr);
+		tsk->thread.bad_cause = cause;
+		bad_area_nosemaphore(regs, SEGV_ACCERR, addr);
  		return;
  	}
 
#3 lore raw
In reply to Palmer Dabbelt
This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <[email protected]>:

Hello:

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

Quoted 9 lines · On Thu, 30 May 2024 09:44:51 -0700 you wrote:

From: Palmer Dabbelt <[email protected]>

I accidentally picked up an earlier version of this patch, which had already landed via mm. The patch I picked up contains a bug, which I kept as I thought it was a fix. So let's just revert it.

This reverts commit 4c6c0020427a4547845a83f7e4d6085e16c3e24f.

[...]

Here is the summary with links:
- Revert "riscv: mm: accelerate pagefault when badaccess"

    https://git.kernel.org/riscv/c/7932b172ac7e

You are awesome, thank you!

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