From owner-svn-soc-all@FreeBSD.ORG Fri Jul 18 16:10:38 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 B4DEE1B2 for ; Fri, 18 Jul 2014 16:10:38 +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 94A9A23E1 for ; Fri, 18 Jul 2014 16:10:38 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6IGAc8X056280 for ; Fri, 18 Jul 2014 16:10:38 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6IGAcE8056266 for svn-soc-all@FreeBSD.org; Fri, 18 Jul 2014 16:10:38 GMT (envelope-from op@FreeBSD.org) Date: Fri, 18 Jul 2014 16:10:38 GMT Message-Id: <201407181610.s6IGAcE8056266@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: r271090 - 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: Fri, 18 Jul 2014 16:10:38 -0000 Author: op Date: Fri Jul 18 16:10:37 2014 New Revision: 271090 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271090 Log: KSP: disallow inlining of lf_selfpatch_selftest, and change test bytes Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/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 Fri Jul 18 16:10:15 2014 (r271089) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 18 16:10:37 2014 (r271090) @@ -60,7 +60,7 @@ SYSCTL_INT(_debug, OID_AUTO, selfpatch_debug, CTLFLAG_RWTUN, &selfpatch_debug, 0, "Set various levels of selfpatch debug"); -void lf_selfpatch_selftest(void); +__noinline void lf_selfpatch_selftest(void); bool lf_selfpatch_patch_needed(struct lf_selfpatch *p) @@ -211,12 +211,12 @@ } -void +__noinline void lf_selfpatch_selftest(void) { __asm __volatile( "1:" - " .byte 0xde,0xad,0xde,0xad ; " + " ud2; ud2; ; " "2: " " .pushsection set_selfpatch_patch_set, \"ax\" ; " "3: "