mirror of
https://github.com/dynup/kpatch
synced 2024-12-26 23:32:04 +00:00
add documentation to core kmod files
Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
parent
e856a15881
commit
8b928cc173
@ -1,3 +1,28 @@
|
||||
/*
|
||||
* kpatch-kmod/base.c
|
||||
*
|
||||
* Copyright (C) 2014 Seth Jennings <sjenning@redhat.com>
|
||||
* Copyright (C) 2013 Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
*
|
||||
* Contains the code for the core kpatch module. This module reads
|
||||
* information from the hotfix modules, find new patched functions,
|
||||
* and register those functions in the ftrace handlers the redirects
|
||||
* the old function call to the new function code.
|
||||
*
|
||||
* Each hotfix can contain one or more patched functions. This information
|
||||
* is contained in the .patches section of the hotfix module. For each
|
||||
* function patched by the module we must:
|
||||
* - Call stop_machine
|
||||
* - Ensure that no execution thread is currently in the function to be
|
||||
* patched (or has the function in the call stack)
|
||||
* - Add the new function address to the kpatch_funcs table
|
||||
*
|
||||
* After that, each call to the old function calls into kpatch_trampoline()
|
||||
* which searches for a patched version of the function in the kpatch_funcs
|
||||
* table. If a patched version is found, the return instruction pointer is
|
||||
* overwritten to return to the new function.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
|
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* kpatch.h
|
||||
*
|
||||
* Copyright (C) 2014 Seth Jennings <sjenning@redhat.com>
|
||||
* Copyright (C) 2013 Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
*
|
||||
* Contains the API for the core kpatch module used by the hotfix modules
|
||||
*/
|
||||
|
||||
#ifndef _KPATCH_H_
|
||||
#define _KPATCH_H_
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user