mirror of
https://github.com/dynup/kpatch
synced 2024-12-26 07:12:03 +00:00
kmod/core: check for needed kernel config options
Yes, this is ugly. There's a much cleaner way to do this for an in-tree module, but this is the only way I know how to do it here.
This commit is contained in:
parent
bf45d8dc5e
commit
de40ff3e54
@ -19,7 +19,5 @@ clean:
|
||||
|
||||
|
||||
# kbuild rules
|
||||
ifdef CONFIG_HAVE_FENTRY
|
||||
obj-m := kpatch.o
|
||||
kpatch-y := core.o
|
||||
endif
|
||||
|
@ -44,6 +44,13 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include "kpatch.h"
|
||||
|
||||
#if !defined(CONFIG_FUNCTION_TRACER) || \
|
||||
!defined(CONFIG_HAVE_FENTRY) || \
|
||||
!defined(CONFIG_MODULES) || \
|
||||
!defined(CONFIG_SYSFS)
|
||||
#error "CONFIG_FUNCTION_TRACER, CONFIG_HAVE_FENTRY, CONFIG_MODULES, and CONFIG_SYSFS kernel config options are required"
|
||||
#endif
|
||||
|
||||
#define KPATCH_HASH_BITS 8
|
||||
static DEFINE_HASHTABLE(kpatch_func_hash, KPATCH_HASH_BITS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user