Patch "riscv: kprobes: Use patch_text_nosync() for insn slots" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    riscv: kprobes: Use patch_text_nosync() for insn slots

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     riscv-kprobes-use-patch_text_nosync-for-insn-slots.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b175a39ae1bfac4728251cde3d5a8299283abb6f
Author: Samuel Holland <samuel.holland@xxxxxxxxxx>
Date:   Wed Mar 27 09:04:42 2024 -0700

    riscv: kprobes: Use patch_text_nosync() for insn slots
    
    [ Upstream commit b1756750a397f36ddc857989d31887c3f5081fb0 ]
    
    These instructions are not yet visible to the rest of the system,
    so there is no need to do the whole stop_machine() dance.
    
    Reviewed-by: Björn Töpel <bjorn@xxxxxxxxxxxx>
    Signed-off-by: Samuel Holland <samuel.holland@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240327160520.791322-4-samuel.holland@xxxxxxxxxx
    Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/kernel/probes/kprobes.c b/arch/riscv/kernel/probes/kprobes.c
index 2f08c14a933d..fecbbcf40ac3 100644
--- a/arch/riscv/kernel/probes/kprobes.c
+++ b/arch/riscv/kernel/probes/kprobes.c
@@ -28,9 +28,8 @@ static void __kprobes arch_prepare_ss_slot(struct kprobe *p)
 
 	p->ainsn.api.restore = (unsigned long)p->addr + offset;
 
-	patch_text(p->ainsn.api.insn, &p->opcode, 1);
-	patch_text((void *)((unsigned long)(p->ainsn.api.insn) + offset),
-		   &insn, 1);
+	patch_text_nosync(p->ainsn.api.insn, &p->opcode, 1);
+	patch_text_nosync(p->ainsn.api.insn + offset, &insn, 1);
 }
 
 static void __kprobes arch_prepare_simulate(struct kprobe *p)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux