2014-06-17 14:51:47 +00:00
|
|
|
/*
|
|
|
|
* kpatch-patch.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Josh Poimboeuf <jpoimboe@redhat.com>
|
|
|
|
*
|
|
|
|
* 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 <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Contains the structs used for the patch module special sections
|
|
|
|
*/
|
|
|
|
|
2014-06-18 17:23:38 +00:00
|
|
|
#ifndef _KPATCH_PATCH_H_
|
|
|
|
#define _KPATCH_PATCH_H_
|
2014-06-18 14:48:51 +00:00
|
|
|
|
2014-06-17 14:51:47 +00:00
|
|
|
struct kpatch_patch_func {
|
|
|
|
unsigned long new_addr;
|
|
|
|
unsigned long new_size;
|
2014-08-14 16:23:33 +00:00
|
|
|
unsigned long old_addr;
|
2014-06-17 14:51:47 +00:00
|
|
|
unsigned long old_size;
|
2016-02-11 17:27:12 +00:00
|
|
|
unsigned long sympos;
|
2014-06-17 14:51:47 +00:00
|
|
|
char *name;
|
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kpatch_patch_dynrela {
|
|
|
|
unsigned long dest;
|
|
|
|
unsigned long src;
|
|
|
|
unsigned long type;
|
2016-02-11 17:27:12 +00:00
|
|
|
unsigned long sympos;
|
2014-06-17 14:51:47 +00:00
|
|
|
char *name;
|
|
|
|
char *objname;
|
2014-10-04 02:47:35 +00:00
|
|
|
int external;
|
2020-02-11 13:45:30 +00:00
|
|
|
long addend;
|
2014-06-17 14:51:47 +00:00
|
|
|
};
|
2014-06-18 17:23:38 +00:00
|
|
|
|
2018-01-04 19:13:19 +00:00
|
|
|
struct kpatch_pre_patch_callback {
|
|
|
|
int (*callback)(void *obj);
|
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
struct kpatch_post_patch_callback {
|
|
|
|
void (*callback)(void *obj);
|
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
struct kpatch_pre_unpatch_callback {
|
|
|
|
void (*callback)(void *obj);
|
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
struct kpatch_post_unpatch_callback {
|
|
|
|
void (*callback)(void *obj);
|
2014-06-27 17:01:39 +00:00
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
|
2014-06-18 17:23:38 +00:00
|
|
|
#endif /* _KPATCH_PATCH_H_ */
|