From owner-svn-soc-all@FreeBSD.ORG Thu Aug 14 11:46:09 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 205B6E9A for ; Thu, 14 Aug 2014 11:46:09 +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 0D91429F4 for ; Thu, 14 Aug 2014 11:46:09 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7EBk8WV013453 for ; Thu, 14 Aug 2014 11:46:08 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id s7EBk8XY013441 for svn-soc-all@FreeBSD.org; Thu, 14 Aug 2014 11:46:08 GMT (envelope-from op@FreeBSD.org) Date: Thu, 14 Aug 2014 11:46:08 GMT Message-Id: <201408141146.s7EBk8XY013441@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: r272399 - 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-1 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: Thu, 14 Aug 2014 11:46:09 -0000 Author: op Date: Thu Aug 14 11:46:08 2014 New Revision: 272399 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272399 Log: KSP: added more debug output 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 Thu Aug 14 11:46:00 2014 (r272398) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Thu Aug 14 11:46:08 2014 (r272399) @@ -319,6 +319,9 @@ rem = p->patchable_size - p->patch_size; patchable = p->patchable + p->patch_size; + DBG("rem: %d\n", rem); + DBG("nop9: %d\n", rem / KSP_MAX_NOPLEN); + for (i = rem / KSP_MAX_NOPLEN; i > 0; i -= KSP_MAX_NOPLEN) { memcpy(patchable, selfpatch_nop_table[KSP_MAX_NOPLEN], @@ -327,6 +330,7 @@ } rem %= KSP_MAX_NOPLEN; + DBG("rem: %d -> nop%d\n", rem, rem); memcpy(patchable, selfpatch_nop_table[rem], rem); }