From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 09:20:18 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 9A5512D0 for ; Wed, 23 Jul 2014 09:20:18 +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 856A22492 for ; Wed, 23 Jul 2014 09:20:18 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6N9KIFR045112 for ; Wed, 23 Jul 2014 09:20:18 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6N9KGiw043981 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 09:20:16 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 09:20:16 GMT Message-Id: <201407230920.s6N9KGiw043981@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: r271267 - in soc2014/op/freebsd-base/sys: amd64/include sys x86/include 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: Wed, 23 Jul 2014 09:20:18 -0000 Author: op Date: Wed Jul 23 09:20:16 2014 New Revision: 271267 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271267 Log: KSP: refactor, renamed */_selfpatch.h to selfpatch-machdep.h Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Added: soc2014/op/freebsd-base/sys/amd64/include/selfpatch-machdep.h soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Modified: soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h soc2014/op/freebsd-base/sys/sys/selfpatch.h soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h Modified: soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h Wed Jul 23 08:00:34 2014 (r271266) +++ soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h Wed Jul 23 09:20:16 2014 (r271267) @@ -1,34 +0,0 @@ -/*- - * Copyright (c) 2014, by Oliver Pinter - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef __AMD64_SELFPATH_H__ -#define __AMD64_SELFPATH_H__ - -#include - -#endif /* __AMD64_SELFPATH_H__ */ Added: soc2014/op/freebsd-base/sys/amd64/include/selfpatch-machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/sys/amd64/include/selfpatch-machdep.h Wed Jul 23 09:20:16 2014 (r271267) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2014, by Oliver Pinter + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __AMD64_SELFPATH_MACHDEP_H__ +#define __AMD64_SELFPATH_MACHDEP_H__ + +#include + +#endif /* __AMD64_SELFPATH_MACHDEP_H__ */ Modified: soc2014/op/freebsd-base/sys/sys/selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/sys/selfpatch.h Wed Jul 23 08:00:34 2014 (r271266) +++ soc2014/op/freebsd-base/sys/sys/selfpatch.h Wed Jul 23 09:20:16 2014 (r271267) @@ -32,7 +32,7 @@ #define KSP_SELFTEST 0 #define KSP_FEATURE_SELFTEST 1 -#include +#include struct linker_file_t; Modified: soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h Wed Jul 23 08:00:34 2014 (r271266) +++ soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h Wed Jul 23 09:20:16 2014 (r271267) @@ -1,46 +0,0 @@ -/*- - * Copyright (c) 2014, by Oliver Pinter - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef __X86_SELFPATH_H__ -#define __X86_SELFPATH_H__ - -#define KSP_CPU_FEATURE 1 -#define KSP_CPU_FEATURE2 2 -#define KSP_AMD_FEATURE 3 -#define KSP_AMD_FEATURE2 4 -#define KSP_VIA_FEATURE_RNG 5 -#define KSP_VIA_FEATURE_XCRYPT 6 -#define KSP_CPU_STDEXT_FEATURE 7 - -struct lf_selfpatch; - -extern char *md_selfpatch_nop_table[]; - -bool lf_selfpatch_patch_needed(struct lf_selfpatch *p); - -#endif /* __X86_SELFPATH_H__ */ Added: soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Wed Jul 23 09:20:16 2014 (r271267) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2014, by Oliver Pinter + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __X86_SELFPATH_MACHDEP_H__ +#define __X86_SELFPATH_MACHDEP_H__ + +#define KSP_CPU_FEATURE 1 +#define KSP_CPU_FEATURE2 2 +#define KSP_AMD_FEATURE 3 +#define KSP_AMD_FEATURE2 4 +#define KSP_VIA_FEATURE_RNG 5 +#define KSP_VIA_FEATURE_XCRYPT 6 +#define KSP_CPU_STDEXT_FEATURE 7 + +struct lf_selfpatch; + +extern char *md_selfpatch_nop_table[]; + +bool lf_selfpatch_patch_needed(struct lf_selfpatch *p); + +#endif /* __X86_SELFPATH_MACHDEP_H__ */