diff --git a/kmod/core/core.c b/kmod/core/core.c index 5c91b11fb..e9281e3d0 100644 --- a/kmod/core/core.c +++ b/kmod/core/core.c @@ -2,7 +2,23 @@ * Copyright (C) 2014 Seth Jennings * Copyright (C) 2013 Josh Poimboeuf * - * Contains the code for the core kpatch module. This module reads + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + */ + +/* Contains the code for the core kpatch module. This module reads * information from the patch modules, find new patched functions, * and register those functions in the ftrace handlers the redirects * the old function call to the new function code. diff --git a/kmod/core/kpatch.h b/kmod/core/kpatch.h index 15e0f3e2f..1380d252e 100644 --- a/kmod/core/kpatch.h +++ b/kmod/core/kpatch.h @@ -4,6 +4,21 @@ * Copyright (C) 2014 Seth Jennings * Copyright (C) 2013 Josh Poimboeuf * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + * * Contains the API for the core kpatch module used by the patch modules */ diff --git a/kmod/core/trampoline.S b/kmod/core/trampoline.S index 3312417d2..cdbd9de15 100644 --- a/kmod/core/trampoline.S +++ b/kmod/core/trampoline.S @@ -1,3 +1,24 @@ +/* + * kpatch trampoline + * + * Copyright (C) 2013 Josh Poimboeuf + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + */ + #include #include diff --git a/kmod/patch/kpatch-patch-hook.c b/kmod/patch/kpatch-patch-hook.c index f0589341d..2ab654ebe 100644 --- a/kmod/patch/kpatch-patch-hook.c +++ b/kmod/patch/kpatch-patch-hook.c @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2013 Josh Poimboeuf + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + */ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include diff --git a/kpatch-build/add-patches-section.c b/kpatch-build/add-patches-section.c index 6e6c53a10..45c6e07c0 100644 --- a/kpatch-build/add-patches-section.c +++ b/kpatch-build/add-patches-section.c @@ -1,8 +1,25 @@ /* - * tools/add-patches-section.c + * add-patches-section.c * * Copyright (C) 2014 Seth Jennings * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + */ + +/* * This tool takes an elf object, the output of create-diff-object * and the base vmlinux as arguments and adds two new sections * to the elf object; .patches and .rela.patches. diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 2dc883dc6..25bdadf7e 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -1,9 +1,26 @@ /* - * tools/create-diff-object.c + * create-diff-object.c * * Copyright (C) 2014 Seth Jennings * Copyright (C) 2013 Josh Poimboeuf * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + */ + +/* * This file contains the heart of the ELF object differencing engine. * * The tool takes two ELF objects from two versions of the same source diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index e3b5065fe..6ba6b0727 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -1,6 +1,24 @@ #!/bin/bash - +# # kpatch build script +# +# Copyright (C) 2014 Seth Jennings +# Copyright (C) 2013,2014 Josh Poimboeuf +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, +# 02110-1301, USA. # This script takes a patch based on the version of the kernel # currently running and creates a kernel module that will diff --git a/kpatch-build/link-vmlinux-syms.c b/kpatch-build/link-vmlinux-syms.c index 8e8f2a944..0ae30fa81 100644 --- a/kpatch-build/link-vmlinux-syms.c +++ b/kpatch-build/link-vmlinux-syms.c @@ -1,9 +1,26 @@ /* - * tools/link-vmlinux-syms.c + * link-vmlinux-syms.c * - * Copyright (C) Seth Jennings + * Copyright (C) 2014 Seth Jennings * - * This tools takes the nearly complete hotfix kernel module and + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, + * 02110-1301, USA. + */ + +/* + * This tool takes the nearly complete hotfix kernel module and * the base vmlinux. It hardcodes the addresses of any global symbols * that are referenced by the output object but are not exported by * vmlinux into the symbol table of the kernel module. diff --git a/kpatch/kpatch b/kpatch/kpatch index 319d4da06..bab12a20e 100755 --- a/kpatch/kpatch +++ b/kpatch/kpatch @@ -1,4 +1,24 @@ #!/bin/bash +# +# kpatch hot patch module management script +# +# Copyright (C) 2014 Seth Jennings +# Copyright (C) 2014 Josh Poimboeuf +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, +# 02110-1301, USA. # This is the primary kpatch user script that manages building, applying, and # displaying information about kernel patch modules installed on the system.