Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
kernel-livepatch-SLE15-SP5-RT_Update_0
livepatch_main.c
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File livepatch_main.c of Package kernel-livepatch-SLE15-SP5-RT_Update_0
/* * livepatch_main.c - kernel live patch main infrastructure * * Copyright (c) 2014 SUSE * Author: Miroslav Benes <mbenes@suse.cz> * * 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, see <http://www.gnu.org/licenses/>. */ #include <linux/livepatch.h> #include <linux/module.h> #include <linux/types.h> #include "uname_patch/livepatch_uname.h" /* Auto expanded KLP_PATCHES_INCLUDES: */ static struct klp_object objs[] = { /* Auto expanded KLP_PATCHES_OBJS: */ { .name = NULL, .funcs = (struct klp_func[]) { { .old_name = __stringify(KLP_SYSCALL_SYM(newuname)), .new_func = KLP_SYSCALL_SYM(klp_newuname), }, #ifdef KLP_ARCH_HAS_SYSCALL_COMPAT_STUBS { .old_name = __stringify(KLP_SYSCALL_COMPAT_STUB_SYM(newuname)), .new_func = KLP_SYSCALL_COMPAT_STUB_SYM(klp_newuname), }, #endif { } } }, { } }; static struct klp_patch patch = { .mod = THIS_MODULE, .objs = objs, .replace = true, }; static int __init klp_patch_init(void) { int retval; pr_info("livepatch: initializing\n"); retval = klp_patch_uname_init(); if (retval) return retval; /* Auto expanded KLP_PATCHES_INIT_CALLS: */ retval = klp_enable_patch(&patch); if (!retval) return retval; /* Auto expanded KLP_PATCHES_INIT_ERR_HANDLERS: */ return retval; } static void __exit klp_patch_cleanup(void) { pr_info("livepatch: removed\n"); /* Auto expanded KLP_PATCHES_CLEANUP_CALLS: */ } module_init(klp_patch_init); module_exit(klp_patch_cleanup); MODULE_LICENSE("GPL"); MODULE_INFO(livepatch, "Y"); MODULE_INFO(klpgitrev, "752547443ea367c42340a59ae8f65c86f3568554");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor