From owner-svn-soc-all@FreeBSD.ORG Sat Aug 9 15:33:32 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 329DF1F8 for ; Sat, 9 Aug 2014 15:33:32 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 200C627E2 for ; Sat, 9 Aug 2014 15:33:32 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id s79FXVHI082629 for ; Sat, 9 Aug 2014 15:33:32 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id s79FXVvG082547 for svn-soc-all@FreeBSD.org; Sat, 9 Aug 2014 15:33:31 GMT (envelope-from op@FreeBSD.org) Date: Sat, 9 Aug 2014 15:33:31 GMT Message-Id: <201408091533.s79FXVvG082547@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r272133 - soc2014/op/freebsd-base/sys/kern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Aug 2014 15:33:32 -0000 Author: op Date: Sat Aug 9 15:33:31 2014 New Revision: 272133 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272133 Log: KSP: disable selftest + style Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Sat Aug 9 15:33:22 2014 (r272132) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Sat Aug 9 15:33:31 2014 (r272133) @@ -61,7 +61,9 @@ SYSCTL_INT(_debug, OID_AUTO, selfpatch_debug, CTLFLAG_RWTUN, &selfpatch_debug, 0, "Set various levels of selfpatch debug"); +#ifdef KSP_DEBUG __noinline void lf_selfpatch_selftest(void); +#endif bool lf_selfpatch_patch_needed(struct lf_selfpatch *p) @@ -84,15 +86,15 @@ } } - if (matched != NULL) { - if ( (*(matched->featurep) & p->feature) != 0) + if (matched != NULL) + if ((*(matched->featurep) & p->feature) != 0) return (true); - } - +#ifdef KSP_DEBUG if (p->feature_selector == KSP_SELFTEST) if ((p->feature & KSP_FEATURE_SELFTEST) != 0) return (true); +#endif return (false); } @@ -136,10 +138,12 @@ } } +#ifdef KSP_DEBUG /* * when selfpatch does not works, the system should crash */ lf_selfpatch_selftest(); +#endif return (0); } @@ -241,6 +245,7 @@ return (0); } +#ifdef KSP_DEBUG __noinline void lf_selfpatch_selftest(void) { @@ -266,4 +271,4 @@ DBG("works.\n"); } - +#endif