From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757471AbdKGLWs (ORCPT ); Tue, 7 Nov 2017 06:22:48 -0500 Received: from terminus.zytor.com ([65.50.211.136]:42701 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756629AbdKGLWo (ORCPT ); Tue, 7 Nov 2017 06:22:44 -0500 Date: Tue, 7 Nov 2017 03:15:56 -0800 From: tip-bot for Masami Hiramatsu Message-ID: Cc: mingo@kernel.org, arnd@arndb.de, mhiramat@kernel.org, peterz@infradead.org, linux@armlinux.org.uk, torvalds@linux-foundation.org, wangnan0@huawei.com, broonie@kernel.org, linux-kernel@vger.kernel.org, tixy@linaro.org, tglx@linutronix.de, hpa@zytor.com, sfr@canb.auug.org.au Reply-To: arnd@arndb.de, mingo@kernel.org, mhiramat@kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, tixy@linaro.org, wangnan0@huawei.com, broonie@kernel.org, hpa@zytor.com, sfr@canb.auug.org.au, tglx@linutronix.de In-Reply-To: <150976988105.2012.13618117383683725047.stgit@devbox> References: <150976988105.2012.13618117383683725047.stgit@devbox> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/kprobes] arm/kprobes: Remove jprobe test case Git-Commit-ID: a443026a48ad7a8b1b966b00fb5d7111b81a219b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a443026a48ad7a8b1b966b00fb5d7111b81a219b Gitweb: https://git.kernel.org/tip/a443026a48ad7a8b1b966b00fb5d7111b81a219b Author: Masami Hiramatsu AuthorDate: Sat, 4 Nov 2017 13:31:21 +0900 Committer: Ingo Molnar CommitDate: Tue, 7 Nov 2017 11:25:14 +0100 arm/kprobes: Remove jprobe test case Remove the jprobes test case because jprobes is a deprecated feature. Signed-off-by: Masami Hiramatsu Cc: Arnd Bergmann Cc: Jon Medhurst Cc: Linus Torvalds Cc: Mark Brown Cc: Peter Zijlstra Cc: Russell King Cc: Stephen Rothwell Cc: Thomas Gleixner Cc: Wang Nan Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/150976988105.2012.13618117383683725047.stgit@devbox Signed-off-by: Ingo Molnar --- arch/arm/probes/kprobes/test-core.c | 57 ------------------------------------- 1 file changed, 57 deletions(-) diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c index 9c3ceba..9ed0129 100644 --- a/arch/arm/probes/kprobes/test-core.c +++ b/arch/arm/probes/kprobes/test-core.c @@ -227,7 +227,6 @@ static bool test_regs_ok; static int test_func_instance; static int pre_handler_called; static int post_handler_called; -static int jprobe_func_called; static int kretprobe_handler_called; static int tests_failed; @@ -370,50 +369,6 @@ static int test_kprobe(long (*func)(long, long)) return 0; } -static void __kprobes jprobe_func(long r0, long r1) -{ - jprobe_func_called = test_func_instance; - if (r0 == FUNC_ARG1 && r1 == FUNC_ARG2) - test_regs_ok = true; - jprobe_return(); -} - -static struct jprobe the_jprobe = { - .entry = jprobe_func, -}; - -static int test_jprobe(long (*func)(long, long)) -{ - int ret; - - the_jprobe.kp.addr = (kprobe_opcode_t *)func; - ret = register_jprobe(&the_jprobe); - if (ret < 0) { - pr_err("FAIL: register_jprobe failed with %d\n", ret); - return ret; - } - - ret = call_test_func(func, true); - - unregister_jprobe(&the_jprobe); - the_jprobe.kp.flags = 0; /* Clear disable flag to allow reuse */ - - if (!ret) - return -EINVAL; - if (jprobe_func_called != test_func_instance) { - pr_err("FAIL: jprobe handler function not called\n"); - return -EINVAL; - } - if (!call_test_func(func, false)) - return -EINVAL; - if (jprobe_func_called == test_func_instance) { - pr_err("FAIL: probe called after unregistering\n"); - return -EINVAL; - } - - return 0; -} - static int __kprobes kretprobe_handler(struct kretprobe_instance *ri, struct pt_regs *regs) { @@ -468,18 +423,6 @@ static int run_api_tests(long (*func)(long, long)) if (ret < 0) return ret; - pr_info(" jprobe\n"); - ret = test_jprobe(func); -#if defined(CONFIG_THUMB2_KERNEL) && !defined(MODULE) - if (ret == -EINVAL) { - pr_err("FAIL: Known longtime bug with jprobe on Thumb kernels\n"); - tests_failed = ret; - ret = 0; - } -#endif - if (ret < 0) - return ret; - pr_info(" kretprobe\n"); ret = test_kretprobe(func); if (ret < 0)