diff options
author | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2014-10-22 14:49:26 +0400 |
---|---|---|
committer | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2014-10-22 14:49:26 +0400 |
commit | a5784e6a2d85acc7619d7555fc834abe5cb17337 (patch) | |
tree | 6d457d6ddcc1f20bcd8ed7cf8bd8ca9f3177f08d | |
parent | f23ee6ff179fee3fe6c4820ecacdc2029db28a99 (diff) | |
download | swap-modules-a5784e6a2d85acc7619d7555fc834abe5cb17337.tar.gz swap-modules-a5784e6a2d85acc7619d7555fc834abe5cb17337.tar.bz2 swap-modules-a5784e6a2d85acc7619d7555fc834abe5cb17337.zip |
[IMPROVE] remove links to build modules
Change-Id: Ibf0bdd848e3e03c9b5c1b4c9b5ec8390c8886bfd
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
-rwxr-xr-x | build.sh | 9 | ||||
-rw-r--r-- | kprobe/Kbuild | 15 | ||||
-rw-r--r-- | kprobe/arch/arm/swap-asm/memory_rwx.c (renamed from kprobe/arch/asm-arm/memory_rwx.c) | 0 | ||||
-rw-r--r-- | kprobe/arch/arm/swap-asm/memory_rwx.h (renamed from kprobe/arch/asm-arm/memory_rwx.h) | 0 | ||||
-rw-r--r-- | kprobe/arch/arm/swap-asm/swap_kprobes.c (renamed from kprobe/arch/asm-arm/swap_kprobes.c) | 0 | ||||
-rw-r--r-- | kprobe/arch/arm/swap-asm/swap_kprobes.h (renamed from kprobe/arch/asm-arm/swap_kprobes.h) | 0 | ||||
-rw-r--r-- | kprobe/arch/arm/swap-asm/trampoline_arm.S (renamed from kprobe/arch/asm-arm/trampoline_arm.S) | 0 | ||||
-rw-r--r-- | kprobe/arch/arm/swap-asm/trampoline_arm.h (renamed from kprobe/arch/asm-arm/trampoline_arm.h) | 0 | ||||
-rw-r--r-- | kprobe/arch/x86/swap-asm/swap_kprobes.c (renamed from kprobe/arch/asm-x86/swap_kprobes.c) | 0 | ||||
-rw-r--r-- | kprobe/arch/x86/swap-asm/swap_kprobes.h (renamed from kprobe/arch/asm-x86/swap_kprobes.h) | 0 | ||||
-rw-r--r-- | kprobe/swap_kprobes.c | 2 | ||||
-rw-r--r-- | kprobe/swap_kprobes.h | 2 | ||||
-rw-r--r-- | uprobe/Kbuild | 11 | ||||
-rw-r--r-- | uprobe/arch/arm/swap-asm/swap_uprobes.c (renamed from uprobe/arch/asm-arm/swap_uprobes.c) | 20 | ||||
-rw-r--r-- | uprobe/arch/arm/swap-asm/swap_uprobes.h (renamed from uprobe/arch/asm-arm/swap_uprobes.h) | 3 | ||||
-rw-r--r-- | uprobe/arch/arm/swap-asm/trampoline_thumb.S (renamed from uprobe/arch/asm-arm/trampoline_thumb.S) | 0 | ||||
-rw-r--r-- | uprobe/arch/arm/swap-asm/trampoline_thumb.h (renamed from uprobe/arch/asm-arm/trampoline_thumb.h) | 0 | ||||
-rw-r--r-- | uprobe/arch/x86/swap-asm/swap_uprobes.c (renamed from uprobe/arch/asm-x86/swap_uprobes.c) | 8 | ||||
-rw-r--r-- | uprobe/arch/x86/swap-asm/swap_uprobes.h (renamed from uprobe/arch/asm-x86/swap_uprobes.h) | 3 | ||||
-rw-r--r-- | uprobe/swap_uprobes.c | 12 | ||||
-rw-r--r-- | uprobe/swap_uprobes.h | 4 | ||||
-rw-r--r-- | us_manager/us_slot_manager.c | 3 | ||||
-rw-r--r-- | writer/swap_writer_module.c | 6 |
23 files changed, 64 insertions, 34 deletions
@@ -50,13 +50,12 @@ ksyms_module_name=swap_ksyms.ko install_dir="/opt/swap/sdk" -rm -f ${kprobe_arch_dir}/asm -ln -s asm-${link_name} ${kprobe_arch_dir}/asm -rm -f ${uprobe_arch_dir}/asm -ln -s asm-${link_name} ${uprobe_arch_dir}/asm +asm_kprobe_dir=${modules_dir}/kprobe/arch/${link_name}/ +asm_uprobe_dir=${modules_dir}/uprobe/arch/${link_name}/ make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} \ - M=${modules_dir} extra_cflags="-Werror -I${modules_dir}" modules || exit 1 + M=${modules_dir} extra_cflags="-Werror -I${modules_dir} -I${asm_kprobe_dir} \ + -I${asm_uprobe_dir}" modules || exit 1 modules=\ "${buffer_dir}/${buffer_module_name} \ diff --git a/kprobe/Kbuild b/kprobe/Kbuild index 4a71126c..640899fd 100644 --- a/kprobe/Kbuild +++ b/kprobe/Kbuild @@ -3,14 +3,15 @@ EXTRA_CFLAGS := $(extra_cflags) obj-m := swap_kprobe.o swap_kprobe-y := swap_kprobes.o \ swap_kprobes_deps.o \ - arch/asm/swap_kprobes.o \ swap_slots.o -ifeq ($(CONFIG_ARM), y) -swap_kprobe-y += arch/asm/trampoline_arm.o - +### ARM +swap_kprobe-$(CONFIG_ARM) += arch/arm/swap-asm/swap_kprobes.o \ + arch/arm/swap-asm/trampoline_arm.o ifeq ($(CONFIG_STRICT_MEMORY_RWX), y) -swap_kprobe-y += arch/asm/memory_rwx.o -endif # CONFIG_STRICT_MEMORY_RWX +swap_kprobe-$(CONFIG_ARM) += arch/arm/swap-asm/memory_rwx.o +endif #ifeq ($(CONFIG_STRICT_MEMORY_RWX), y) + -endif # CONFIG_ARM
\ No newline at end of file +### X86 +swap_kprobe-$(CONFIG_X86) += arch/x86/swap-asm/swap_kprobes.o diff --git a/kprobe/arch/asm-arm/memory_rwx.c b/kprobe/arch/arm/swap-asm/memory_rwx.c index bb751a66..bb751a66 100644 --- a/kprobe/arch/asm-arm/memory_rwx.c +++ b/kprobe/arch/arm/swap-asm/memory_rwx.c diff --git a/kprobe/arch/asm-arm/memory_rwx.h b/kprobe/arch/arm/swap-asm/memory_rwx.h index 97879bba..97879bba 100644 --- a/kprobe/arch/asm-arm/memory_rwx.h +++ b/kprobe/arch/arm/swap-asm/memory_rwx.h diff --git a/kprobe/arch/asm-arm/swap_kprobes.c b/kprobe/arch/arm/swap-asm/swap_kprobes.c index e0b989b1..e0b989b1 100644 --- a/kprobe/arch/asm-arm/swap_kprobes.c +++ b/kprobe/arch/arm/swap-asm/swap_kprobes.c diff --git a/kprobe/arch/asm-arm/swap_kprobes.h b/kprobe/arch/arm/swap-asm/swap_kprobes.h index fb23151d..fb23151d 100644 --- a/kprobe/arch/asm-arm/swap_kprobes.h +++ b/kprobe/arch/arm/swap-asm/swap_kprobes.h diff --git a/kprobe/arch/asm-arm/trampoline_arm.S b/kprobe/arch/arm/swap-asm/trampoline_arm.S index e4831773..e4831773 100644 --- a/kprobe/arch/asm-arm/trampoline_arm.S +++ b/kprobe/arch/arm/swap-asm/trampoline_arm.S diff --git a/kprobe/arch/asm-arm/trampoline_arm.h b/kprobe/arch/arm/swap-asm/trampoline_arm.h index 257aca8c..257aca8c 100644 --- a/kprobe/arch/asm-arm/trampoline_arm.h +++ b/kprobe/arch/arm/swap-asm/trampoline_arm.h diff --git a/kprobe/arch/asm-x86/swap_kprobes.c b/kprobe/arch/x86/swap-asm/swap_kprobes.c index 0e671f96..0e671f96 100644 --- a/kprobe/arch/asm-x86/swap_kprobes.c +++ b/kprobe/arch/x86/swap-asm/swap_kprobes.c diff --git a/kprobe/arch/asm-x86/swap_kprobes.h b/kprobe/arch/x86/swap-asm/swap_kprobes.h index ce6e7a10..ce6e7a10 100644 --- a/kprobe/arch/asm-x86/swap_kprobes.h +++ b/kprobe/arch/x86/swap-asm/swap_kprobes.h diff --git a/kprobe/swap_kprobes.c b/kprobe/swap_kprobes.c index b5983e4f..697b7897 100644 --- a/kprobe/swap_kprobes.c +++ b/kprobe/swap_kprobes.c @@ -42,7 +42,7 @@ #include <linux/pagemap.h> #include <ksyms/ksyms.h> -#include <kprobe/arch/asm/swap_kprobes.h> +#include <swap-asm/swap_kprobes.h> #include "swap_slots.h" #include "swap_kdebug.h" diff --git a/kprobe/swap_kprobes.h b/kprobe/swap_kprobes.h index 944bb44e..5f1ed626 100644 --- a/kprobe/swap_kprobes.h +++ b/kprobe/swap_kprobes.h @@ -43,7 +43,7 @@ #include <linux/sched.h> #include <linux/pagemap.h> -#include <kprobe/arch/asm/swap_kprobes.h> +#include <swap-asm/swap_kprobes.h> #ifdef CONFIG_ARM diff --git a/uprobe/Kbuild b/uprobe/Kbuild index 518445ce..beb9b6ae 100644 --- a/uprobe/Kbuild +++ b/uprobe/Kbuild @@ -2,5 +2,12 @@ EXTRA_CFLAGS := $(extra_cflags) KBUILD_EXTRA_SYMBOLS = $(src)/../kprobe/Module.symvers obj-m := swap_uprobe.o -swap_uprobe-y := swap_uprobes.o arch/asm/swap_uprobes.o -swap_uprobe-$(CONFIG_ARM) += arch/asm/trampoline_thumb.o +swap_uprobe-y := swap_uprobes.o + +### ARM +swap_uprobe-$(CONFIG_ARM) += arch/arm/swap-asm/swap_uprobes.o \ + arch/arm/swap-asm/trampoline_thumb.o + + +### X86 +swap_uprobe-$(CONFIG_X86) += arch/x86/swap-asm/swap_uprobes.o diff --git a/uprobe/arch/asm-arm/swap_uprobes.c b/uprobe/arch/arm/swap-asm/swap_uprobes.c index 54132724..0a3786a4 100644 --- a/uprobe/arch/asm-arm/swap_uprobes.c +++ b/uprobe/arch/arm/swap-asm/swap_uprobes.c @@ -30,18 +30,24 @@ * Arch-dependent uprobe interface implementation for ARM. */ -#include <kprobe/swap_kprobes.h> -#include <kprobe/arch/asm/swap_kprobes.h> -#include <kprobe/arch/asm/trampoline_arm.h> + +#include <linux/init.h> /* need for asm/traps.h */ +#include <linux/sched.h> /* need for asm/traps.h */ + +#include <asm/ptrace.h> /* need for asm/traps.h */ #include <asm/traps.h> -#include <uprobe/swap_uprobes.h> -#include <uprobe/arch/asm/swap_uprobes.h> + #include <kprobe/swap_slots.h> +#include <kprobe/swap_kprobes.h> #include <kprobe/swap_kprobes_deps.h> +#include <uprobe/swap_uprobes.h> + +#include <swap-asm/swap_kprobes.h> +#include <swap-asm/trampoline_arm.h> + +#include "swap_uprobes.h" #include "trampoline_thumb.h" -// FIXME: -#include <kprobe/swap_kdebug.h> /** * @def flush_insns diff --git a/uprobe/arch/asm-arm/swap_uprobes.h b/uprobe/arch/arm/swap-asm/swap_uprobes.h index 4f87e84d..826e308f 100644 --- a/uprobe/arch/asm-arm/swap_uprobes.h +++ b/uprobe/arch/arm/swap-asm/swap_uprobes.h @@ -35,6 +35,9 @@ #define _ARM_SWAP_UPROBES_H +#include <swap-asm/swap_kprobes.h> /* FIXME: for UPROBES_TRAMP_LEN */ + + struct kprobe; struct task_struct; struct uprobe; diff --git a/uprobe/arch/asm-arm/trampoline_thumb.S b/uprobe/arch/arm/swap-asm/trampoline_thumb.S index 508c4404..508c4404 100644 --- a/uprobe/arch/asm-arm/trampoline_thumb.S +++ b/uprobe/arch/arm/swap-asm/trampoline_thumb.S diff --git a/uprobe/arch/asm-arm/trampoline_thumb.h b/uprobe/arch/arm/swap-asm/trampoline_thumb.h index e406b80d..e406b80d 100644 --- a/uprobe/arch/asm-arm/trampoline_thumb.h +++ b/uprobe/arch/arm/swap-asm/trampoline_thumb.h diff --git a/uprobe/arch/asm-x86/swap_uprobes.c b/uprobe/arch/x86/swap-asm/swap_uprobes.c index 7e40594a..f4faca56 100644 --- a/uprobe/arch/asm-x86/swap_uprobes.c +++ b/uprobe/arch/x86/swap-asm/swap_uprobes.c @@ -30,10 +30,14 @@ * Arch-dependent uprobe interface implementation for x86. */ + #include <linux/kdebug.h> -#include <uprobe/swap_uprobes.h> -#include <uprobe/arch/asm/swap_uprobes.h> + #include <kprobe/swap_slots.h> +#include <uprobe/swap_uprobes.h> + +#include "swap_uprobes.h" + /** * @struct uprobe_ctlblk diff --git a/uprobe/arch/asm-x86/swap_uprobes.h b/uprobe/arch/x86/swap-asm/swap_uprobes.h index 9e1a586c..3ca6334e 100644 --- a/uprobe/arch/asm-x86/swap_uprobes.h +++ b/uprobe/arch/x86/swap-asm/swap_uprobes.h @@ -34,6 +34,9 @@ #define _X86_SWAP_UPROBES_H +#include <swap-asm/swap_kprobes.h> /* FIXME: for UPROBES_TRAMP_LEN */ + + struct uprobe; struct uretprobe; struct uretprobe_instance; diff --git a/uprobe/swap_uprobes.c b/uprobe/swap_uprobes.c index aa6904ce..c8ffd51e 100644 --- a/uprobe/swap_uprobes.c +++ b/uprobe/swap_uprobes.c @@ -31,17 +31,19 @@ */ -#include "swap_uprobes.h" -#include <kprobe/swap_kdebug.h> - -#include <uprobe/arch/asm/swap_uprobes.h> - #include <linux/hash.h> #include <linux/mempolicy.h> #include <linux/module.h> + #include <kprobe/swap_slots.h> +#include <kprobe/swap_kdebug.h> #include <kprobe/swap_kprobes_deps.h> +#include <swap-asm/swap_uprobes.h> + +#include "swap_uprobes.h" + + enum { UPROBE_HASH_BITS = 10, UPROBE_TABLE_SIZE = (1 << UPROBE_HASH_BITS) diff --git a/uprobe/swap_uprobes.h b/uprobe/swap_uprobes.h index 8d91b14e..da06aff2 100644 --- a/uprobe/swap_uprobes.h +++ b/uprobe/swap_uprobes.h @@ -35,7 +35,9 @@ #include <kprobe/swap_kprobes.h> -#include <uprobe/arch/asm/swap_uprobes.h> + +#include <swap-asm/swap_uprobes.h> + /** * @struct uprobe diff --git a/us_manager/us_slot_manager.c b/us_manager/us_slot_manager.c index 02aecfe7..126b5df8 100644 --- a/us_manager/us_slot_manager.c +++ b/us_manager/us_slot_manager.c @@ -29,8 +29,9 @@ #include <linux/mm.h> #include <linux/mman.h> #include <linux/list.h> + #include <kprobe/swap_slots.h> -#include <kprobe/arch/asm/swap_kprobes.h> +#include <swap-asm/swap_kprobes.h> #include "us_manager_common.h" diff --git a/writer/swap_writer_module.c b/writer/swap_writer_module.c index af9646f0..00e35c72 100644 --- a/writer/swap_writer_module.c +++ b/writer/swap_writer_module.c @@ -39,13 +39,15 @@ #include <linux/err.h> #include <linux/module.h> #include <linux/slab.h> + #include <asm/uaccess.h> -#include <kprobe/arch/asm/swap_kprobes.h> -#include <uprobe/arch/asm/swap_uprobes.h> #include <buffer/swap_buffer_module.h> #include <buffer/swap_buffer_errors.h> +#include <swap-asm/swap_kprobes.h> +#include <swap-asm/swap_uprobes.h> + #include "swap_writer_module.h" #include "swap_writer_errors.h" #include "kernel_operations.h" |