From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36C04143C46; Thu, 13 Jun 2024 12:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718280983; cv=none; b=UIj5ZT8priE+Ozi/10Z4uiBosun7PAp784tqx+3zAOS1D4P6d4cA31MvbRMISC9tr8HKJOofCsfX+H64dffDcDbtdAKWDKtI3vlPakr/MKWvg1JFKaUt3mqNpBw7lwU8kqOyC94UrR/H6OIagMt7KCmmNhvzZr5DCOu5k56bRSc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718280983; c=relaxed/simple; bh=+xFaNQrtpD045X025/aUOUDh02EvtqIbAtpGiIXrEOo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VJwOzE233e6GFb2ztnpeNbX+6q3tgOlOFrOVWr9UzlpGpgOdfYFSYFlPBSzh8NSAq2xaiDyXHzE68xKYfO0ilJxPHLwRQKFEcCi54Zamh7VOKWIIknQITxrnHKKvogen9x6h+3OdzkFPB/wRjyR7pbIy5BBRJ+Ipw9hYyWe4Ne8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BGnQj0I1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BGnQj0I1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3DA2C2BBFC; Thu, 13 Jun 2024 12:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718280983; bh=+xFaNQrtpD045X025/aUOUDh02EvtqIbAtpGiIXrEOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BGnQj0I10fFMakgc9lHxNEzdYatDp0L0ErgOL0v32dJ9JpB9mxQBTZl/TTCF196xe qBjsKEoqUkZWdy8ZmlHEnBvg+yO5XqqwhMZ2KEGDfCK1SeQkBvTCTM/lpNuuKZB3CI f+pXFtWLNDT4cDWC7sznNFY+43fai1bsPJJuSOIw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geert Uytterhoeven , John Paul Adrian Glaubitz , Sasha Levin Subject: [PATCH 5.10 069/317] sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe() Date: Thu, 13 Jun 2024 13:31:27 +0200 Message-ID: <20240613113250.219537853@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240613113247.525431100@linuxfoundation.org> References: <20240613113247.525431100@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven [ 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 Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/717d47a19689cc944fae6e981a1ad7cae1642c89.1709326528.git.geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: Sasha Levin --- arch/sh/kernel/kprobes.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/sh/kernel/kprobes.c b/arch/sh/kernel/kprobes.c index 756100b01e846..8498013732198 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; -- 2.43.0