Date: Wed, 23 Jul 2014 09:20:16 GMT 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 Message-ID: <201407230920.s6N9KGiw043981@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <oliver.pntr@gmail.com> 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 <oliver.pntr at gmail.com> - * 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 <x86/_selfpatch.h> - -#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 <oliver.pntr at gmail.com> + * 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 <x86/selfpatch-machdep.h> + +#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 <machine/_selfpatch.h> +#include <machine/selfpatch-machdep.h> 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 <oliver.pntr at gmail.com> - * 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 <oliver.pntr at gmail.com> + * 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__ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407230920.s6N9KGiw043981>