Skip to content

Commit

Permalink
Merge pull request #6 from VCTLabs/support-aarch64
Browse files Browse the repository at this point in the history
add arm64 (aka aarch64) platform
  • Loading branch information
robertswiecki committed Sep 15, 2017
2 parents 0cb94fc + 47cfef4 commit 2ae8e11
Show file tree
Hide file tree
Showing 4 changed files with 1,776 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ GENERATED_SRCS:=lexer.c parser.c
GENERATED:=lexer.h parser.h ${GENERATED_SRCS}
TEMPORARY:=libkafel_r.o libkafel.o
SYSCALL_LISTS:=amd64_syscalls.c \
aarch64_syscalls.c \
arm_syscalls.c
SRCS:=kafel.c \
context.c \
Expand Down
2 changes: 2 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

#if defined(__x86_64__)
#define KAFEL_DEFAULT_TARGET_ARCH AUDIT_ARCH_X86_64
#elif defined(__aarch64__)
#define KAFEL_DEFAULT_TARGET_ARCH AUDIT_ARCH_AARCH64
#elif defined(__arm__)
#define KAFEL_DEFAULT_TARGET_ARCH AUDIT_ARCH_ARM
#else
Expand Down
4 changes: 4 additions & 0 deletions src/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@
{ audit_arch, arch##_syscall_list, &arch##_syscall_list_size }

SYSCALL_LIST_DECL(arm)
SYSCALL_LIST_DECL(aarch64)
SYSCALL_LIST_DECL(amd64)

const struct syscall_list syscall_lists[] = {
#ifdef AUDIT_ARCH_ARM
SYSCALL_LIST(AUDIT_ARCH_ARM, arm),
#endif
#ifdef AUDIT_ARCH_AARCH64
SYSCALL_LIST(AUDIT_ARCH_AARCH64, aarch64),
#endif
#ifdef AUDIT_ARCH_X86_64
SYSCALL_LIST(AUDIT_ARCH_X86_64, amd64),
#endif
Expand Down
Loading

0 comments on commit 2ae8e11

Please sign in to comment.