Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jul 2014 16:10:38 GMT
From:      op@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r271090 - soc2014/op/freebsd-base/sys/kern
Message-ID:  <201407181610.s6IGAcE8056266@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <oliver.pntr@gmail.com>
  
  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:	"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407181610.s6IGAcE8056266>