From owner-svn-soc-all@FreeBSD.ORG Fri Jul 18 08:48:56 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1001F1B6 for ; Fri, 18 Jul 2014 08:48:56 +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 F19F92AA8 for ; Fri, 18 Jul 2014 08:48:55 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6I8mtur098195 for ; Fri, 18 Jul 2014 08:48:55 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6I8mtAE098179 for svn-soc-all@FreeBSD.org; Fri, 18 Jul 2014 08:48:55 GMT (envelope-from op@FreeBSD.org) Date: Fri, 18 Jul 2014 08:48:55 GMT Message-Id: <201407180848.s6I8mtAE098179@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: r271065 - soc2014/op/freebsd-base/sys/amd64/amd64 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 08:48:56 -0000 Author: op Date: Fri Jul 18 08:48:55 2014 New Revision: 271065 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271065 Log: KSP: hook in kernel patching at hammer_time Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c Modified: soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c Fri Jul 18 08:48:44 2014 (r271064) +++ soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c Fri Jul 18 08:48:55 2014 (r271065) @@ -81,6 +81,7 @@ #include #include #include +#include #include #ifdef SMP #include @@ -1998,6 +1999,9 @@ initializecpu(); /* Initialize CPU registers */ initializecpucache(); + /* selfmodify kernel text, when needed */ + lf_selfpatch(linker_kernel_file); + /* doublefault stack space, runs on ist1 */ common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)];