Patch "sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()" has been added to the 6.8-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

    sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()

to the 6.8-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:
     sh-kprobes-merge-arch_copy_kprobe-into-arch_prepare_.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 84d054f4c1b340d2dade25672f31c61d0f2abb7b
Author: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Date:   Fri Mar 1 22:02:30 2024 +0100

    sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe()
    
    [ Upstream commit 1422ae080b66134fe192082d9b721ab7bd93fcc5 ]
    
    arch/sh/kernel/kprobes.c:52:16: warning: no previous prototype for 'arch_copy_kprobe' [-Wmissing-prototypes]
    
    Although SH kprobes support was only merged in v2.6.28, it missed the
    earlier removal of the arch_copy_kprobe() callback in v2.6.15.
    
    Based on the powerpc part of commit 49a2a1b83ba6fa40 ("[PATCH] kprobes:
    changed from using spinlock to mutex").
    
    Fixes: d39f5450146ff39f ("sh: Add kprobes support.")
    Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Reviewed-by: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/717d47a19689cc944fae6e981a1ad7cae1642c89.1709326528.git.geert+renesas@xxxxxxxxx
    Signed-off-by: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c
index aed1ea8e2c2f0..74051b8ddf3e7 100644
--- a/arch/sh/kernel/kprobes.c
+++ b/arch/sh/kernel/kprobes.c
@@ -44,17 +44,12 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
 	if (OPCODE_RTE(opcode))
 		return -EFAULT;	/* Bad breakpoint */
 
+	memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
 	p->opcode = opcode;
 
 	return 0;
 }
 
-void __kprobes arch_copy_kprobe(struct kprobe *p)
-{
-	memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
-	p->opcode = *p->addr;
-}
-
 void __kprobes arch_arm_kprobe(struct kprobe *p)
 {
 	*p->addr = BREAKPOINT_INSTRUCTION;




[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