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 E1A3917E90E; Mon, 27 May 2024 19:06:44 +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=1716836805; cv=none; b=nzwqnKeL/Dv9Y03YLBkbqYeiyzRDKZDXoI1KDvJL6uyevtg24gFdxH6eWqx9r7c5IuV+FQ1WUX6+xzN2j0gQuvST7Agn34MbkEuHLT3zVhtPzzNxRYGc+8VZL97rwkFRbosLdYjUVvJihh418UegGz8nwmbUMYbqbmeHFdzzW+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716836805; c=relaxed/simple; bh=D6D1r6wvOJLo4dVt6pO2RMlUbAf9vVd1tWxj570sPa4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G2M+2uvFe00jIgV3Q+d93pAVaulCjWDY5yJiBfKLA87HdSgnxATC6yhodZrCmTp6FU9EL6CaNkAG5qLHvs7Uuge/eLg6iLOB04TeqQjRED7JsB56fpELoaAo4+yW5ki8VVWGx8Aq1Xonuo5n+1QKqG1xsQ7p2ZeMcg9xNkfZB84= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XZreqxzA; 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="XZreqxzA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 285BBC2BBFC; Mon, 27 May 2024 19:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716836804; bh=D6D1r6wvOJLo4dVt6pO2RMlUbAf9vVd1tWxj570sPa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XZreqxzAQU6/D1ORJRVU6Wk/nfGQNH4W7vNQVB5vFaLy69iH7AK2RI+85kCeyOx7F 2SJYIRydjwzxuSQBhRPN+C6gBuXJbAZ7e24Ms+vCBeN5AD9AtFN25Ak0W12VR36KzS NM/wZ34bJkLToDU8rAdCB83eZK6ajtPoSG8QUVFg= 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 6.9 195/427] sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe() Date: Mon, 27 May 2024 20:54:02 +0200 Message-ID: <20240527185620.439155460@linuxfoundation.org> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240527185601.713589927@linuxfoundation.org> References: <20240527185601.713589927@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 6.9-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 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; -- 2.43.0