From patchwork Thu Nov 7 17:26:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jon Medhurst (Tixy)" X-Patchwork-Id: 3153901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A4860BEEB2 for ; Thu, 7 Nov 2013 17:26:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80FA520119 for ; Thu, 7 Nov 2013 17:26:42 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48B60200E6 for ; Thu, 7 Nov 2013 17:26:41 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VeTLn-0004gm-U1; Thu, 07 Nov 2013 17:26:36 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VeTLl-0005w9-KH; Thu, 07 Nov 2013 17:26:33 +0000 Received: from smarthost01c.mail.zen.net.uk ([212.23.1.5]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VeTLi-0005v1-Bi for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2013 17:26:31 +0000 Received: from [82.69.122.217] (helo=[192.168.2.110]) by smarthost01c.mail.zen.net.uk with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1VeTLL-0002r0-0W; Thu, 07 Nov 2013 17:26:07 +0000 Message-ID: <1383845166.3401.77.camel@linaro1.home> Subject: Re: [PATCH v2 09/13] ARM: Disable jprobe selftests in thumb kernels From: "Jon Medhurst (Tixy)" To: David Long Date: Thu, 07 Nov 2013 17:26:06 +0000 In-Reply-To: <1381871068-27660-10-git-send-email-dave.long@linaro.org> References: <1381871068-27660-1-git-send-email-dave.long@linaro.org> <1381871068-27660-10-git-send-email-dave.long@linaro.org> X-Mailer: Evolution 3.4.4-3 Mime-Version: 1.0 X-Originating-smarthost01c-IP: [82.69.122.217] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131107_122630_507802_B3CB3F73 X-CRM114-Status: GOOD ( 13.75 ) X-Spam-Score: -1.2 (-) Cc: Dave Martin , Srikar Dronamraju , linux-kernel@vger.kernel.org, Oleg Nesterov , Rabin Vincent , Ingo Molnar , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2013-10-15 at 17:04 -0400, David Long wrote: > From: "David A. Long" > > jprobe kernel selftests are not supported for thumb kernels. Conditionally > disable them in the kernel kprobes-test module. I don't think it's fair to say they aren't supported, it's just that the implementation of jprobes and/or symbol lookup has bugs on Thumb kernels which the test code is finding, see http://lists.infradead.org/pipermail/linux-arm-kernel/2011-August/063026.html Note, the current code works OK if the function being probed is in a loadable module (which is why I didn't spot the problem when doing the original Thumb kprobes work). Now I admit that having the tests always bombing out because of this hinders testing of kprobes, but simply disabling the test is just burying this long standing problem even more. So what do people think about something like the change below, to let other tests get run but make the overall test still fail...? --- a/arch/arm/kernel/kprobes-test.c +++ b/arch/arm/kernel/kprobes-test.c @@ -221,6 +221,7 @@ static int pre_handler_called; static int post_handler_called; static int jprobe_func_called; static int kretprobe_handler_called; +static int tests_failed; #define FUNC_ARG1 0x12345678 #define FUNC_ARG2 0xabcdef @@ -457,6 +458,13 @@ static int run_api_tests(long (*func)(long, long)) 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"); + tests_failed = ret; + ret = 0; + } +#endif if (ret < 0) return ret; @@ -1667,6 +1675,8 @@ static int __init run_all_tests(void) out: if (ret == 0) + ret = tests_failed; + if (ret == 0) pr_info("Finished kprobe tests OK\n"); else pr_err("kprobe tests failed\n");