* [RFC PATH 0/2] audit(userspace): Add/Improve arm/aarch64 support
@ 2013-11-19 7:28 AKASHI Takahiro
2013-11-19 7:28 ` [RFC PATCH 1/2] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: AKASHI Takahiro @ 2013-11-19 7:28 UTC (permalink / raw)
To: linux-audit; +Cc: dsaxena, will.deacon, patchs
For better arm/aarch64 support in audit,
patch [1/2] adds more system call definitions for aarch64 (or arm64 in
kernel) that are missing in the current implementation.
https://www.redhat.com/archives/linux-audit/2013-November/msg00082.html
Patch [2/2] improves endianness support for arm/aarch64. There used to be
old discussions but the latest version, v2.3.2, has no fixes yet.
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266
AKASHI Takahiro (2):
audit(userspace): Add missing syscalls for AArch64
audit(userspace): Add arm LE/aarch64 BE support
lib/aarch64_table.h | 11 +++++++++++
lib/libaudit.c | 2 ++
lib/libaudit.h | 4 +++-
lib/lookup_table.c | 6 ++++++
lib/machinetab.h | 10 ++++++----
swig/audit.py | 2 ++
tools/ausyscall/ausyscall.c | 3 ++-
7 files changed, 32 insertions(+), 6 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 16+ messages in thread* [RFC PATCH 1/2] audit(userspace): Add missing syscalls for AArch64 2013-11-19 7:28 [RFC PATH 0/2] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro @ 2013-11-19 7:28 ` AKASHI Takahiro 2013-11-19 7:29 ` [RFC PATCH 2/2] audit(userspace): Add arm LE/aarch64 BE support AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2013-11-19 7:28 UTC (permalink / raw) To: linux-audit; +Cc: dsaxena, will.deacon, patchs Based on kernel's include/uapi/asm-generic/unistd.h. System call names here are derived directly from called fuctions by removing prefix 'sys_'. This may sometimes lead to some strange conventions against well-known system calls, for example, * fadvise64_64 can be posix_fadvise or fadvise64 * newfstat can be fstat64 or just fstat * (f)statfs64 can be (f)statfs and so on. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/aarch64_table.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/aarch64_table.h b/lib/aarch64_table.h index 56f4d33..40a1353 100644 --- a/lib/aarch64_table.h +++ b/lib/aarch64_table.h @@ -45,6 +45,7 @@ _S(21, "epoll_ctl") _S(22, "epoll_pwait") _S(23, "dup") _S(24, "dup3") +_S(25, "fcntl") _S(26, "inotify_init1") _S(27, "inotify_add_watch") _S(28, "inotify_rm_watch") @@ -62,6 +63,10 @@ _S(39, "umount2") _S(40, "mount") _S(41, "pivot_root") _S(42, "nfsservctl") +_S(43, "statfs64") +_S(44, "fstatfs64") +_S(45, "truncate64") +_S(46, "ftruncate64") _S(47, "fallocate") _S(48, "faccessat") _S(49, "chdir") @@ -77,6 +82,7 @@ _S(58, "vhangup") _S(59, "pipe2") _S(60, "quotactl") _S(61, "getdents64") +_S(62, "lseek") _S(63, "read") _S(64, "write") _S(65, "readv") @@ -85,6 +91,7 @@ _S(67, "pread64") _S(68, "pwrite64") _S(69, "preadv") _S(70, "pwritev") +_S(71, "sendfile64") _S(72, "pselect6") _S(73, "ppoll") _S(74, "signalfd4") @@ -92,6 +99,8 @@ _S(75, "vmsplice") _S(76, "splice") _S(77, "tee") _S(78, "readlinkat") +_S(79, "newfstatat") +_S(80, "newfstat") _S(81, "sync") _S(82, "fsync") _S(83, "fdatasync") @@ -233,6 +242,8 @@ _S(218, "request_key") _S(219, "keyctl") _S(220, "clone") _S(221, "execve") +_S(222, "mmap") +_S(223, "fadvise64_64") _S(224, "swapon") _S(225, "swapoff") _S(226, "mprotect") -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [RFC PATCH 2/2] audit(userspace): Add arm LE/aarch64 BE support 2013-11-19 7:28 [RFC PATH 0/2] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2013-11-19 7:28 ` [RFC PATCH 1/2] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro @ 2013-11-19 7:29 ` AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2013-11-19 7:29 UTC (permalink / raw) To: linux-audit; +Cc: dsaxena, will.deacon, patchs For arm/aarch64(or arm64 in kernel), endianness does not have any differences in term of system call tables. So this patch made some changes to treat LE and BE binaries equally by re-using existing conversion tables. This patch works with the kernel patch I submitted for AArch64 which advertises no -EB value for LE and EB for BE. Alternatively, however, we might better use single macros, AUTH_ARCH_ARM and AUTH_ARCH_AARCH64, for clarification as discussed here: http://permalink.gmane.org/gmane.linux.ports.arm.kerenl/165266 This is a disucssion. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/libaudit.c | 2 ++ lib/libaudit.h | 4 +++- lib/lookup_table.c | 6 ++++++ lib/machinetab.h | 10 ++++++---- swig/audit.py | 2 ++ tools/ausyscall/ausyscall.c | 3 ++- 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/lib/libaudit.c b/lib/libaudit.c index f7b6bef..77b3f9b 100644 --- a/lib/libaudit.c +++ b/lib/libaudit.c @@ -1329,6 +1329,7 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, return -6; break; #ifdef WITH_ARMEB + case MACH_ARM: case MACH_ARMEB: if (bits == __AUDIT_ARCH_64BIT) return -6; @@ -1336,6 +1337,7 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, #endif #ifdef WITH_AARCH64 case MACH_AARCH64: + case MACH_AARCH64EB: if (bits != __AUDIT_ARCH_64BIT) return -6; break; diff --git a/lib/libaudit.h b/lib/libaudit.h index 338b2df..07fffb3 100644 --- a/lib/libaudit.h +++ b/lib/libaudit.h @@ -416,8 +416,10 @@ typedef enum { MACH_S390X, MACH_S390, MACH_ALPHA, + MACH_ARM, MACH_ARMEB, - MACH_AARCH64 + MACH_AARCH64, + MACH_AARCH64EB } machine_t; /* These are the valid audit failure tunable enum values */ diff --git a/lib/lookup_table.c b/lib/lookup_table.c index 4f4c0ae..08fcfa7 100644 --- a/lib/lookup_table.c +++ b/lib/lookup_table.c @@ -77,10 +77,12 @@ static const struct int_transtab elftab[] = { { MACH_ALPHA, AUDIT_ARCH_ALPHA }, #endif #ifdef WITH_ARMEB + { MACH_ARM, AUDIT_ARCH_ARM }, { MACH_ARMEB, AUDIT_ARCH_ARMEB }, #endif #ifdef WITH_AARCH64 { MACH_AARCH64, AUDIT_ARCH_AARCH64}, + { MACH_AARCH64EB, AUDIT_ARCH_AARCH64}, #endif }; #define AUDIT_ELF_NAMES (sizeof(elftab)/sizeof(elftab[0])) @@ -138,12 +140,14 @@ int audit_name_to_syscall(const char *sc, int machine) break; #endif #ifdef WITH_ARMEB + case MACH_ARM: case MACH_ARMEB: found = armeb_syscall_s2i(sc, &res); break; #endif #ifdef WITH_AARCH64 case MACH_AARCH64: + case MACH_AARCH64EB: found = aarch64_syscall_s2i(sc, &res); break; #endif @@ -180,11 +184,13 @@ const char *audit_syscall_to_name(int sc, int machine) return alpha_syscall_i2s(sc); #endif #ifdef WITH_ARMEB + case MACH_ARM: case MACH_ARMEB: return armeb_syscall_i2s(sc); #endif #ifdef WITH_AARCH64 case MACH_AARCH64: + case MACH_AARCH64EB: return aarch64_syscall_i2s(sc); #endif } diff --git a/lib/machinetab.h b/lib/machinetab.h index 48eaf50..4eefba8 100644 --- a/lib/machinetab.h +++ b/lib/machinetab.h @@ -35,11 +35,13 @@ _S(MACH_ALPHA, "alpha" ) #endif #ifdef WITH_ARMEB _S(MACH_ARMEB, "armeb" ) -_S(MACH_ARMEB, "armv5tejl") -_S(MACH_ARMEB, "armv5tel") -_S(MACH_ARMEB, "armv6l") -_S(MACH_ARMEB, "armv7l") +_S(MACH_ARM, "arm") +_S(MACH_ARM, "armv5tejl") +_S(MACH_ARM, "armv5tel") +_S(MACH_ARM, "armv6l") +_S(MACH_ARM, "armv7l") #endif #ifdef WITH_AARCH64 _S(MACH_AARCH64, "aarch64" ) +_S(MACH_AARCH64EB, "aarch64eb" ) #endif diff --git a/swig/audit.py b/swig/audit.py index 1feae68..152d90f 100644 --- a/swig/audit.py +++ b/swig/audit.py @@ -695,8 +695,10 @@ MACH_PPC = _audit.MACH_PPC MACH_S390X = _audit.MACH_S390X MACH_S390 = _audit.MACH_S390 MACH_ALPHA = _audit.MACH_ALPHA +MACH_ARM = _audit.MACH_ARM MACH_ARMEB = _audit.MACH_ARMEB MACH_AARCH64 = _audit.MACH_AARCH64 +MACH_AARCH64EB = _audit.MACH_AARCH64EB FAIL_IGNORE = _audit.FAIL_IGNORE FAIL_LOG = _audit.FAIL_LOG FAIL_TERMINATE = _audit.FAIL_TERMINATE diff --git a/tools/ausyscall/ausyscall.c b/tools/ausyscall/ausyscall.c index 8d2a4b3..ba78a2e 100644 --- a/tools/ausyscall/ausyscall.c +++ b/tools/ausyscall/ausyscall.c @@ -72,7 +72,8 @@ int main(int argc, char *argv[]) exit(1); #endif #ifndef WITH_ARMEB - } else if (strcmp("armeb", argv[i]) == 0) { + } else if (strcmp("armeb", argv[i]) == 0 || + strcmp("arm", argv[i]) == 0) { fputs("Arm eabi processor support is not enabled\n", stderr); exit(1); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support 2013-11-19 7:28 [RFC PATH 0/2] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2013-11-19 7:28 ` [RFC PATCH 1/2] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro 2013-11-19 7:29 ` [RFC PATCH 2/2] audit(userspace): Add arm LE/aarch64 BE support AKASHI Takahiro @ 2014-01-17 8:15 ` AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 1/3] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro ` (3 more replies) 2 siblings, 4 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-01-17 8:15 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches For better arm/aarch64 support in audit, patch [1/3] adds more system call definitions for aarch64 (or arm64 in kernel) that are missing in the current implementation. https://www.redhat.com/archives/linux-audit/2013-November/msg00082.html Patch [2/3] improves endianness support for arm/aarch64. There used to be old discussions but the latest version, v2.3.2, has no fixes yet. http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 Patch [3/3] enables auditing 32-bit tasks (auditctl -F arch=b32). This code replies on my kernel patch for aarch64 support, and was tested on armv8 fast model with 32-bit/64-bit userland: 1) basic operations with auditctl/autrace # auditctl -a exit,always -S openat -F path=/etc/inittab # auditctl -a exit,always -F dir=/tmp -F perm=rw # auditctl -a task,always # autrace /bin/ls by comparing output from autrace with one from strace 2) audit-test-code (+ my workarounds for arm/arm64) by running "audit-tool", "filter" and "syscalls" test categories. AKASHI Takahiro (3): audit(userspace): Add missing syscalls for AArch64 audit(userspace): Add arm LE/aarch64 BE support audit(userspace): Add compat system call support for AArch64 lib/aarch64_table.h | 17 ++++++++++++++--- lib/libaudit.c | 8 ++++++++ lib/libaudit.h | 4 +++- lib/lookup_table.c | 14 ++++++++++---- lib/machinetab.h | 12 +++++++----- swig/audit.py | 2 ++ tools/ausyscall/ausyscall.c | 3 ++- 7 files changed, 46 insertions(+), 14 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/3] audit(userspace): Add missing syscalls for AArch64 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro @ 2014-01-17 8:15 ` AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 2/3] audit(userspace): Add arm LE/aarch64 BE support AKASHI Takahiro ` (2 subsequent siblings) 3 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-01-17 8:15 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches There are missing system call entries in lookup table for AArch64. This patch adds them based on kernel's include/uapi/asm-generic/unistd.h, which AArch64 (or arm64 in kernel) relies on. System call names here are derived directly from called fuctions by removing prefix 'sys_' and postfix '64'. The exceptions are: * fadvise64 * prlimit64 * fstat because we want to keep compatibility with other arch's namings like on x86 or s390x. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/aarch64_table.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/aarch64_table.h b/lib/aarch64_table.h index 56f4d33..5dcd349 100644 --- a/lib/aarch64_table.h +++ b/lib/aarch64_table.h @@ -45,6 +45,7 @@ _S(21, "epoll_ctl") _S(22, "epoll_pwait") _S(23, "dup") _S(24, "dup3") +_S(25, "fcntl") _S(26, "inotify_init1") _S(27, "inotify_add_watch") _S(28, "inotify_rm_watch") @@ -62,6 +63,10 @@ _S(39, "umount2") _S(40, "mount") _S(41, "pivot_root") _S(42, "nfsservctl") +_S(43, "statfs") +_S(44, "fstatfs") +_S(45, "truncate") +_S(46, "ftruncate") _S(47, "fallocate") _S(48, "faccessat") _S(49, "chdir") @@ -76,15 +81,17 @@ _S(57, "close") _S(58, "vhangup") _S(59, "pipe2") _S(60, "quotactl") -_S(61, "getdents64") +_S(61, "getdents") +_S(62, "lseek") _S(63, "read") _S(64, "write") _S(65, "readv") _S(66, "writev") -_S(67, "pread64") -_S(68, "pwrite64") +_S(67, "pread") +_S(68, "pwrite") _S(69, "preadv") _S(70, "pwritev") +_S(71, "sendfile") _S(72, "pselect6") _S(73, "ppoll") _S(74, "signalfd4") @@ -92,6 +99,8 @@ _S(75, "vmsplice") _S(76, "splice") _S(77, "tee") _S(78, "readlinkat") +_S(79, "newfstatat") +_S(80, "newfstat") _S(81, "sync") _S(82, "fsync") _S(83, "fdatasync") @@ -233,6 +242,8 @@ _S(218, "request_key") _S(219, "keyctl") _S(220, "clone") _S(221, "execve") +_S(222, "mmap") +_S(223, "fadvise64") _S(224, "swapon") _S(225, "swapoff") _S(226, "mprotect") -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/3] audit(userspace): Add arm LE/aarch64 BE support 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 1/3] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro @ 2014-01-17 8:15 ` AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro 3 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-01-17 8:15 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches For arm/aarch64(or arm64 in kernel), endianness does not have any differences in term of system call tables. So this patch made some changes to treat LE and BE binaries equally by re-using existing conversion tables. In addition, all the machine names matching "arm*l" were classified to MACH_ARM (instead of MACH_ARMEB) because they represent LE. This patch works with the kernel patch I submitted for AArch64 support, which advertises AUDIT_ARCH_ARM/AARCH64 for LE and AUDIT_ARCH_ARMEB/ AARCH64EB for BE. Alternatively, however, we might better use single macros, AUTH_ARCH_ARM and AUTH_ARCH_AARCH64 only, for both LE and BE as discussed here: http://permalink.gmane.org/gmane.linux.ports.arm.kerenl/165266 Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/libaudit.c | 2 ++ lib/libaudit.h | 4 +++- lib/lookup_table.c | 14 ++++++++++---- lib/machinetab.h | 12 +++++++----- swig/audit.py | 2 ++ tools/ausyscall/ausyscall.c | 3 ++- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/lib/libaudit.c b/lib/libaudit.c index f7b6bef..77b3f9b 100644 --- a/lib/libaudit.c +++ b/lib/libaudit.c @@ -1329,6 +1329,7 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, return -6; break; #ifdef WITH_ARMEB + case MACH_ARM: case MACH_ARMEB: if (bits == __AUDIT_ARCH_64BIT) return -6; @@ -1336,6 +1337,7 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, #endif #ifdef WITH_AARCH64 case MACH_AARCH64: + case MACH_AARCH64EB: if (bits != __AUDIT_ARCH_64BIT) return -6; break; diff --git a/lib/libaudit.h b/lib/libaudit.h index 338b2df..07fffb3 100644 --- a/lib/libaudit.h +++ b/lib/libaudit.h @@ -416,8 +416,10 @@ typedef enum { MACH_S390X, MACH_S390, MACH_ALPHA, + MACH_ARM, MACH_ARMEB, - MACH_AARCH64 + MACH_AARCH64, + MACH_AARCH64EB } machine_t; /* These are the valid audit failure tunable enum values */ diff --git a/lib/lookup_table.c b/lib/lookup_table.c index 4f4c0ae..d9ecb3a 100644 --- a/lib/lookup_table.c +++ b/lib/lookup_table.c @@ -77,10 +77,12 @@ static const struct int_transtab elftab[] = { { MACH_ALPHA, AUDIT_ARCH_ALPHA }, #endif #ifdef WITH_ARMEB + { MACH_ARM, AUDIT_ARCH_ARM }, { MACH_ARMEB, AUDIT_ARCH_ARMEB }, #endif #ifdef WITH_AARCH64 { MACH_AARCH64, AUDIT_ARCH_AARCH64}, + { MACH_AARCH64EB, AUDIT_ARCH_AARCH64}, #endif }; #define AUDIT_ELF_NAMES (sizeof(elftab)/sizeof(elftab[0])) @@ -138,12 +140,14 @@ int audit_name_to_syscall(const char *sc, int machine) break; #endif #ifdef WITH_ARMEB - case MACH_ARMEB: + case MACH_ARM: + case MACH_ARMEB: found = armeb_syscall_s2i(sc, &res); break; #endif #ifdef WITH_AARCH64 - case MACH_AARCH64: + case MACH_AARCH64: + case MACH_AARCH64EB: found = aarch64_syscall_s2i(sc, &res); break; #endif @@ -180,11 +184,13 @@ const char *audit_syscall_to_name(int sc, int machine) return alpha_syscall_i2s(sc); #endif #ifdef WITH_ARMEB - case MACH_ARMEB: + case MACH_ARM: + case MACH_ARMEB: return armeb_syscall_i2s(sc); #endif #ifdef WITH_AARCH64 - case MACH_AARCH64: + case MACH_AARCH64: + case MACH_AARCH64EB: return aarch64_syscall_i2s(sc); #endif } diff --git a/lib/machinetab.h b/lib/machinetab.h index 48eaf50..c7033a6 100644 --- a/lib/machinetab.h +++ b/lib/machinetab.h @@ -35,11 +35,13 @@ _S(MACH_ALPHA, "alpha" ) #endif #ifdef WITH_ARMEB _S(MACH_ARMEB, "armeb" ) -_S(MACH_ARMEB, "armv5tejl") -_S(MACH_ARMEB, "armv5tel") -_S(MACH_ARMEB, "armv6l") -_S(MACH_ARMEB, "armv7l") +_S(MACH_ARM, "arm") +_S(MACH_ARM, "armv5tejl") +_S(MACH_ARM, "armv5tel") +_S(MACH_ARM, "armv6l") +_S(MACH_ARM, "armv7l") #endif #ifdef WITH_AARCH64 -_S(MACH_AARCH64, "aarch64" ) +_S(MACH_AARCH64, "aarch64") +_S(MACH_AARCH64EB, "aarch64eb") #endif diff --git a/swig/audit.py b/swig/audit.py index 1feae68..152d90f 100644 --- a/swig/audit.py +++ b/swig/audit.py @@ -695,8 +695,10 @@ MACH_PPC = _audit.MACH_PPC MACH_S390X = _audit.MACH_S390X MACH_S390 = _audit.MACH_S390 MACH_ALPHA = _audit.MACH_ALPHA +MACH_ARM = _audit.MACH_ARM MACH_ARMEB = _audit.MACH_ARMEB MACH_AARCH64 = _audit.MACH_AARCH64 +MACH_AARCH64EB = _audit.MACH_AARCH64EB FAIL_IGNORE = _audit.FAIL_IGNORE FAIL_LOG = _audit.FAIL_LOG FAIL_TERMINATE = _audit.FAIL_TERMINATE diff --git a/tools/ausyscall/ausyscall.c b/tools/ausyscall/ausyscall.c index 8d2a4b3..ba78a2e 100644 --- a/tools/ausyscall/ausyscall.c +++ b/tools/ausyscall/ausyscall.c @@ -72,7 +72,8 @@ int main(int argc, char *argv[]) exit(1); #endif #ifndef WITH_ARMEB - } else if (strcmp("armeb", argv[i]) == 0) { + } else if (strcmp("armeb", argv[i]) == 0 || + strcmp("arm", argv[i]) == 0) { fputs("Arm eabi processor support is not enabled\n", stderr); exit(1); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 1/3] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 2/3] audit(userspace): Add arm LE/aarch64 BE support AKASHI Takahiro @ 2014-01-17 8:15 ` AKASHI Takahiro 2014-01-17 15:05 ` Will Deacon 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro 3 siblings, 1 reply; 16+ messages in thread From: AKASHI Takahiro @ 2014-01-17 8:15 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches For 32-bit task auditing (-F arch=b32), internally-used machine type will be overwritten to MACH_ARM[EB] in order to use a correct system call lookup table. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/libaudit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/libaudit.c b/lib/libaudit.c index 77b3f9b..df2af2a 100644 --- a/lib/libaudit.c +++ b/lib/libaudit.c @@ -1306,6 +1306,12 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, else if (bits == ~__AUDIT_ARCH_64BIT && machine == MACH_S390X) machine = MACH_S390; + else if (bits == ~__AUDIT_ARCH_64BIT && + machine == MACH_AARCH64) + machine = MACH_ARM; + else if (bits == ~__AUDIT_ARCH_64BIT && + machine == MACH_AARCH64EB) + machine = MACH_ARMEB; /* Check for errors - return -6 * We don't allow 32 bit machines to specify -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 2014-01-17 8:15 ` [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 AKASHI Takahiro @ 2014-01-17 15:05 ` Will Deacon 2014-01-20 5:05 ` AKASHI Takahiro 0 siblings, 1 reply; 16+ messages in thread From: Will Deacon @ 2014-01-17 15:05 UTC (permalink / raw) To: AKASHI Takahiro Cc: linux-audit@redhat.com, arndb@arndb.de, patches@linaro.org On Fri, Jan 17, 2014 at 08:15:29AM +0000, AKASHI Takahiro wrote: > For 32-bit task auditing (-F arch=b32), internally-used machine type will > be overwritten to MACH_ARM[EB] in order to use a correct system call > lookup table. > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > --- > lib/libaudit.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/libaudit.c b/lib/libaudit.c > index 77b3f9b..df2af2a 100644 > --- a/lib/libaudit.c > +++ b/lib/libaudit.c > @@ -1306,6 +1306,12 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, > else if (bits == ~__AUDIT_ARCH_64BIT && > machine == MACH_S390X) > machine = MACH_S390; > + else if (bits == ~__AUDIT_ARCH_64BIT && > + machine == MACH_AARCH64) > + machine = MACH_ARM; > + else if (bits == ~__AUDIT_ARCH_64BIT && > + machine == MACH_AARCH64EB) > + machine = MACH_ARMEB; Why do you care about MACH_ARMEB? The syscall APIs are identical for either endianness. Will ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 2014-01-17 15:05 ` Will Deacon @ 2014-01-20 5:05 ` AKASHI Takahiro 0 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-01-20 5:05 UTC (permalink / raw) To: Will Deacon; +Cc: linux-audit@redhat.com, arndb@arndb.de, patches@linaro.org [+ Cc: Eric] On 01/18/2014 12:05 AM, Will Deacon wrote: > On Fri, Jan 17, 2014 at 08:15:29AM +0000, AKASHI Takahiro wrote: >> For 32-bit task auditing (-F arch=b32), internally-used machine type will >> be overwritten to MACH_ARM[EB] in order to use a correct system call >> lookup table. >> >> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> >> --- >> lib/libaudit.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/lib/libaudit.c b/lib/libaudit.c >> index 77b3f9b..df2af2a 100644 >> --- a/lib/libaudit.c >> +++ b/lib/libaudit.c >> @@ -1306,6 +1306,12 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, >> else if (bits == ~__AUDIT_ARCH_64BIT && >> machine == MACH_S390X) >> machine = MACH_S390; >> + else if (bits == ~__AUDIT_ARCH_64BIT && >> + machine == MACH_AARCH64) >> + machine = MACH_ARM; >> + else if (bits == ~__AUDIT_ARCH_64BIT && >> + machine == MACH_AARCH64EB) >> + machine = MACH_ARMEB; > > Why do you care about MACH_ARMEB? The syscall APIs are identical for either > endianness. Yeah, I remember that you have already mentioned it before: On 11/08/2013 11:34 PM, Will Deacon wrote: > On Wed, Nov 06, 2013 at 10:25:42AM +0000, AKASHI Takahiro wrote: >> * Userspace audit package >> There are some missing syscall definitions in lib/aarch64_table.h. >> There is no support for AUDIT_ARCH_ARM (I mean LE. armeb is BE). > > I did post something over a year ago... did it not get picked up? > > http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 But since then, I've never got any follow-ups from audit folks (especially Eric) and so just kept the code unchanged and made my changes compatible with it. Once we all agree, I will be easily able to remove such a conditional. -Takahiro AKASHI > Will > ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro ` (2 preceding siblings ...) 2014-01-17 8:15 ` [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 AKASHI Takahiro @ 2014-02-03 6:57 ` AKASHI Takahiro 2014-02-03 6:57 ` AKASHI Takahiro ` (5 more replies) 3 siblings, 6 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-02-03 6:57 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches On ARM, endianness doesn't make any differences on auditing. See the discussion below: http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 In this version, mistakenly-used "ARMEB" and "armeb" are substituted with "ARM" and "arm" respectively in Patches [1,2/4]. patch [3/4] adds more system call definitions for aarch64 (or arm64 in kernel) that are missing in the current implementation. https://www.redhat.com/archives/linux-audit/2013-November/msg00082.html Patch [4/4] enables auditing 32-bit tasks (ie. auditctl -F arch=b32) on aarch64. This code replies on my kernel patch for aarch64 support, and was tested on armv8 fast model with 32-bit/64-bit userland: 1) basic operations with auditctl/autrace # auditctl -a exit,always -S openat -F path=/etc/inittab # auditctl -a exit,always -F dir=/tmp -F perm=rw # auditctl -a task,always # autrace /bin/ls by comparing output from autrace with one from strace 2) audit-test-code (+ my workarounds for arm/arm64) by running "audit-tool", "filter" and "syscalls" test categories. Changes v2 -> v3: * The previous [2/3] patch was replaced by [1,2/4] due to the reason above * remove a ARMEB-related conditional from [4/4] AKASHI Takahiro (4): audit(userspace): Substitute ARMEB with ARM audit(userspace): Substitute armeb with arm audit(userspace): Add missing syscalls for AArch64 audit(userspace): Add compat system call support for AArch64 arm_table.h | 365 +++++++++++++++++++++++++++++++++++++++++++ config.guess | 1 - config.h.in | 2 +- config.sub | 2 +- configure | 38 ++--- configure.ac | 16 +- lib/Makefile.am | 14 +- lib/Makefile.in | 62 ++++---- lib/aarch64_table.h | 17 +- lib/armeb_table.h | 365 ------------------------------------------- lib/libaudit.c | 7 +- lib/libaudit.h | 2 +- lib/lookup_table.c | 20 +-- lib/machinetab.h | 13 +- lib/test/lookup_test.c | 16 +- swig/audit.py | 2 +- tools/ausyscall/ausyscall.c | 4 +- 17 files changed, 480 insertions(+), 466 deletions(-) create mode 100644 arm_table.h delete mode 100644 lib/armeb_table.h -- 1.7.9.5 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro @ 2014-02-03 6:57 ` AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 1/4] audit(userspace): Substitute ARMEB with ARM AKASHI Takahiro ` (4 subsequent siblings) 5 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-02-03 6:57 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches On ARM, endianness doesn't make any differences on auditing. See the discussion below: http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 In this version, mistakenly used "ARMEB" and "armeb" are substituted with "ARM" and "arm" respectively in Patches [1,2/4]. patch [3/4] adds more system call definitions for aarch64 (or arm64 in kernel) that are missing in the current implementation. https://www.redhat.com/archives/linux-audit/2013-November/msg00082.html Patch [4/4] enables auditing 32-bit tasks (ie. auditctl -F arch=b32). This code replies on my kernel patch for aarch64 support, and was tested on armv8 fast model with 32-bit/64-bit userland: 1) basic operations with auditctl/autrace # auditctl -a exit,always -S openat -F path=/etc/inittab # auditctl -a exit,always -F dir=/tmp -F perm=rw # auditctl -a task,always # autrace /bin/ls by comparing output from autrace with one from strace 2) audit-test-code (+ my workarounds for arm/arm64) by running "audit-tool", "filter" and "syscalls" test categories. Changes v2 -> v3: * The previous [2/3] patch was replaced by [1,2/4] due to the reason above * remove a ARMEB-related conditional from [4/4] AKASHI Takahiro (4): audit(userspace): Rename ARMEB to ARM audit(userspace): Rename armeb to arm audit(userspace): Add missing syscalls for AArch64 audit(userspace): Add compat system call support for AArch64 arm_table.h | 365 +++++++++++++++++++++++++++++++++++++++++++ config.guess | 1 - config.h.in | 2 +- config.sub | 2 +- configure | 38 ++--- configure.ac | 16 +- lib/Makefile.am | 14 +- lib/Makefile.in | 62 ++++---- lib/aarch64_table.h | 17 +- lib/armeb_table.h | 365 ------------------------------------------- lib/libaudit.c | 7 +- lib/libaudit.h | 2 +- lib/lookup_table.c | 20 +-- lib/machinetab.h | 13 +- lib/test/lookup_test.c | 16 +- swig/audit.py | 2 +- tools/ausyscall/ausyscall.c | 4 +- 17 files changed, 480 insertions(+), 466 deletions(-) create mode 100644 arm_table.h delete mode 100644 lib/armeb_table.h -- 1.7.9.5 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 1/4] audit(userspace): Substitute ARMEB with ARM 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro 2014-02-03 6:57 ` AKASHI Takahiro @ 2014-02-03 6:57 ` AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 2/4] audit(userspace): Substitute armeb with arm AKASHI Takahiro ` (3 subsequent siblings) 5 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-02-03 6:57 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches On ARM, endianness doesn't make any differences on auditing. See: http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- config.h.in | 2 +- configure | 18 +++++++++--------- configure.ac | 4 ++-- lib/Makefile.am | 4 ++-- lib/Makefile.in | 18 +++++++++--------- lib/libaudit.c | 4 ++-- lib/libaudit.h | 2 +- lib/lookup_table.c | 14 +++++++------- lib/machinetab.h | 12 ++++++------ lib/test/lookup_test.c | 8 ++++---- swig/audit.py | 2 +- tools/ausyscall/ausyscall.c | 2 +- 12 files changed, 45 insertions(+), 45 deletions(-) diff --git a/config.h.in b/config.h.in index fcfbec3..ae9abdf 100644 --- a/config.h.in +++ b/config.h.in @@ -162,7 +162,7 @@ #undef WITH_APPARMOR /* Define if you want to enable Arm eabi processor support. */ -#undef WITH_ARMEB +#undef WITH_ARM /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff --git a/configure b/configure index 42c9efb..84f45c0 100755 --- a/configure +++ b/configure @@ -642,8 +642,8 @@ HAVE_PRELUDE_FALSE HAVE_PRELUDE_TRUE USE_AARCH64_FALSE USE_AARCH64_TRUE -USE_ARMEB_FALSE -USE_ARMEB_TRUE +USE_ARM_FALSE +USE_ARM_TRUE USE_ALPHA_FALSE USE_ALPHA_TRUE DEBUG_FALSE @@ -13614,15 +13614,15 @@ fi if test x$use_armeb != xno ; then -$as_echo "#define WITH_ARMEB 1" >>confdefs.h +$as_echo "#define WITH_ARM 1" >>confdefs.h fi if test x$use_armeb = xyes; then - USE_ARMEB_TRUE= - USE_ARMEB_FALSE='#' + USE_ARM_TRUE= + USE_ARM_FALSE='#' else - USE_ARMEB_TRUE='#' - USE_ARMEB_FALSE= + USE_ARM_TRUE='#' + USE_ARM_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_armeb" >&5 @@ -14258,8 +14258,8 @@ if test -z "${USE_ALPHA_TRUE}" && test -z "${USE_ALPHA_FALSE}"; then as_fn_error $? "conditional \"USE_ALPHA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${USE_ARMEB_TRUE}" && test -z "${USE_ARMEB_FALSE}"; then - as_fn_error $? "conditional \"USE_ARMEB\" was never defined. +if test -z "${USE_ARM_TRUE}" && test -z "${USE_ARM_FALSE}"; then + as_fn_error $? "conditional \"USE_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_AARCH64_TRUE}" && test -z "${USE_AARCH64_FALSE}"; then diff --git a/configure.ac b/configure.ac index c4f1fb6..52691cf 100644 --- a/configure.ac +++ b/configure.ac @@ -196,9 +196,9 @@ AS_HELP_STRING([--with-armeb],[enable Arm eabi processor support]), use_armeb=$withval, use_armeb=no) if test x$use_armeb != xno ; then - AC_DEFINE(WITH_ARMEB,1,[Define if you want to enable Arm eabi processor support.]) + AC_DEFINE(WITH_ARM,1,[Define if you want to enable Arm eabi processor support.]) fi -AM_CONDITIONAL(USE_ARMEB, test x$use_armeb = xyes) +AM_CONDITIONAL(USE_ARM, test x$use_armeb = xyes) AC_MSG_RESULT($use_armeb) AC_MSG_CHECKING(whether to include aarch64 processor support) diff --git a/lib/Makefile.am b/lib/Makefile.am index 91d483b..162d41b 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -49,7 +49,7 @@ BUILT_SOURCES = actiontabs.h errtabs.h fieldtabs.h flagtabs.h \ if USE_ALPHA BUILT_SOURCES += alpha_tables.h gen_alpha_tables_h endif -if USE_ARMEB +if USE_ARM BUILT_SOURCES += armeb_tables.h gen_armeb_tables_h endif if USE_AARCH64 @@ -68,7 +68,7 @@ alpha_tables.h: gen_alpha_tables_h Makefile $(PYTHON) gen_tables.py --lowercase --i2s --s2i alpha_syscall gen_alpha_tables_h $@ endif -if USE_ARMEB +if USE_ARM gen_armeb_tables_h: gen_tables.c gen_tables.h armeb_table.h $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\"armeb_table.h\" -E -o $@ gen_tables.c armeb_tables.h: gen_armeb_tables_h Makefile diff --git a/lib/Makefile.in b/lib/Makefile.in index d63e2ef..4075b6f 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -104,7 +104,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @USE_ALPHA_TRUE@am__append_1 = alpha_tables.h -@USE_ARMEB_TRUE@am__append_2 = armeb_tables.h +@USE_ARM_TRUE@am__append_2 = armeb_tables.h @USE_AARCH64_TRUE@am__append_3 = aarch64_tables.h noinst_PROGRAMS = gen_actiontabs_h$(EXEEXT) gen_errtabs_h$(EXEEXT) \ gen_fieldtabs_h$(EXEEXT) gen_flagtabs_h$(EXEEXT) \ @@ -115,7 +115,7 @@ noinst_PROGRAMS = gen_actiontabs_h$(EXEEXT) gen_errtabs_h$(EXEEXT) \ gen_s390x_tables_h$(EXEEXT) gen_x86_64_tables_h$(EXEEXT) \ $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) @USE_ALPHA_TRUE@am__append_4 = gen_alpha_tables_h -@USE_ARMEB_TRUE@am__append_5 = gen_armeb_tables_h +@USE_ARM_TRUE@am__append_5 = gen_armeb_tables_h @USE_AARCH64_TRUE@am__append_6 = gen_aarch64_tables_h subdir = lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ @@ -175,7 +175,7 @@ libaudit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libaudit_la_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALPHA_TRUE@am__EXEEXT_1 = gen_alpha_tables_h$(EXEEXT) -@USE_ARMEB_TRUE@am__EXEEXT_2 = gen_armeb_tables_h$(EXEEXT) +@USE_ARM_TRUE@am__EXEEXT_2 = gen_armeb_tables_h$(EXEEXT) @USE_AARCH64_TRUE@am__EXEEXT_3 = gen_aarch64_tables_h$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am__gen_aarch64_tables_h_SOURCES_DIST = gen_tables.c gen_tables.h \ @@ -207,8 +207,8 @@ gen_alpha_tables_h_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(LDFLAGS) -o $@ am__gen_armeb_tables_h_SOURCES_DIST = gen_tables.c gen_tables.h \ armeb_table.h -@USE_ARMEB_TRUE@am_gen_armeb_tables_h_OBJECTS = \ -@USE_ARMEB_TRUE@ gen_armeb_tables_h-gen_tables.$(OBJEXT) +@USE_ARM_TRUE@am_gen_armeb_tables_h_OBJECTS = \ +@USE_ARM_TRUE@ gen_armeb_tables_h-gen_tables.$(OBJEXT) gen_armeb_tables_h_OBJECTS = $(am_gen_armeb_tables_h_OBJECTS) gen_armeb_tables_h_LDADD = $(LDADD) gen_armeb_tables_h_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -591,8 +591,8 @@ gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h gen_actiontabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="actiontab.h"' @USE_ALPHA_TRUE@gen_alpha_tables_h_SOURCES = gen_tables.c gen_tables.h alpha_table.h @USE_ALPHA_TRUE@gen_alpha_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="alpha_table.h"' -@USE_ARMEB_TRUE@gen_armeb_tables_h_SOURCES = gen_tables.c gen_tables.h armeb_table.h -@USE_ARMEB_TRUE@gen_armeb_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="armeb_table.h"' +@USE_ARM_TRUE@gen_armeb_tables_h_SOURCES = gen_tables.c gen_tables.h armeb_table.h +@USE_ARM_TRUE@gen_armeb_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="armeb_table.h"' @USE_AARCH64_TRUE@gen_aarch64_tables_h_SOURCES = gen_tables.c gen_tables.h aarch64_table.h @USE_AARCH64_TRUE@gen_aarch64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="aarch64_table.h"' gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h @@ -1379,8 +1379,8 @@ actiontabs.h: gen_actiontabs_h Makefile ./gen_actiontabs_h --lowercase --i2s --s2i action > $@ @USE_ALPHA_TRUE@alpha_tables.h: gen_alpha_tables_h Makefile @USE_ALPHA_TRUE@ ./gen_alpha_tables_h --lowercase --i2s --s2i alpha_syscall > $@ -@USE_ARMEB_TRUE@armeb_tables.h: gen_armeb_tables_h Makefile -@USE_ARMEB_TRUE@ ./gen_armeb_tables_h --lowercase --i2s --s2i armeb_syscall > $@ +@USE_ARM_TRUE@armeb_tables.h: gen_armeb_tables_h Makefile +@USE_ARM_TRUE@ ./gen_armeb_tables_h --lowercase --i2s --s2i armeb_syscall > $@ @USE_AARCH64_TRUE@aarch64_tables.h: gen_aarch64_tables_h Makefile @USE_AARCH64_TRUE@ ./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@ errtabs.h: gen_errtabs_h Makefile diff --git a/lib/libaudit.c b/lib/libaudit.c index f7b6bef..7dacd36 100644 --- a/lib/libaudit.c +++ b/lib/libaudit.c @@ -1328,8 +1328,8 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, if (bits == __AUDIT_ARCH_64BIT) return -6; break; -#ifdef WITH_ARMEB - case MACH_ARMEB: +#ifdef WITH_ARM + case MACH_ARM: if (bits == __AUDIT_ARCH_64BIT) return -6; break; diff --git a/lib/libaudit.h b/lib/libaudit.h index 338b2df..a155a89 100644 --- a/lib/libaudit.h +++ b/lib/libaudit.h @@ -416,7 +416,7 @@ typedef enum { MACH_S390X, MACH_S390, MACH_ALPHA, - MACH_ARMEB, + MACH_ARM, MACH_AARCH64 } machine_t; diff --git a/lib/lookup_table.c b/lib/lookup_table.c index 4f4c0ae..77c754a 100644 --- a/lib/lookup_table.c +++ b/lib/lookup_table.c @@ -38,7 +38,7 @@ #ifdef WITH_ALPHA #include "alpha_tables.h" #endif -#ifdef WITH_ARMEB +#ifdef WITH_ARM #include "armeb_tables.h" #endif #ifdef WITH_AARCH64 @@ -76,8 +76,8 @@ static const struct int_transtab elftab[] = { #ifdef WITH_ALPHA { MACH_ALPHA, AUDIT_ARCH_ALPHA }, #endif -#ifdef WITH_ARMEB - { MACH_ARMEB, AUDIT_ARCH_ARMEB }, +#ifdef WITH_ARM + { MACH_ARM, AUDIT_ARCH_ARM }, #endif #ifdef WITH_AARCH64 { MACH_AARCH64, AUDIT_ARCH_AARCH64}, @@ -137,8 +137,8 @@ int audit_name_to_syscall(const char *sc, int machine) found = alpha_syscall_s2i(sc, &res); break; #endif -#ifdef WITH_ARMEB - case MACH_ARMEB: +#ifdef WITH_ARM + case MACH_ARM: found = armeb_syscall_s2i(sc, &res); break; #endif @@ -179,8 +179,8 @@ const char *audit_syscall_to_name(int sc, int machine) case MACH_ALPHA: return alpha_syscall_i2s(sc); #endif -#ifdef WITH_ARMEB - case MACH_ARMEB: +#ifdef WITH_ARM + case MACH_ARM: return armeb_syscall_i2s(sc); #endif #ifdef WITH_AARCH64 diff --git a/lib/machinetab.h b/lib/machinetab.h index 48eaf50..f1358ae 100644 --- a/lib/machinetab.h +++ b/lib/machinetab.h @@ -33,12 +33,12 @@ _S(MACH_S390, "s390" ) #ifdef WITH_ALPHA _S(MACH_ALPHA, "alpha" ) #endif -#ifdef WITH_ARMEB -_S(MACH_ARMEB, "armeb" ) -_S(MACH_ARMEB, "armv5tejl") -_S(MACH_ARMEB, "armv5tel") -_S(MACH_ARMEB, "armv6l") -_S(MACH_ARMEB, "armv7l") +#ifdef WITH_ARM +_S(MACH_ARM, "armeb" ) +_S(MACH_ARM, "armv5tejl") +_S(MACH_ARM, "armv5tel") +_S(MACH_ARM, "armv6l") +_S(MACH_ARM, "armv7l") #endif #ifdef WITH_AARCH64 _S(MACH_AARCH64, "aarch64" ) diff --git a/lib/test/lookup_test.c b/lib/test/lookup_test.c index 2b028c5..21893da 100644 --- a/lib/test/lookup_test.c +++ b/lib/test/lookup_test.c @@ -137,7 +137,7 @@ test_alpha_table(void) } #endif -#ifdef WITH_ARMEB +#ifdef WITH_ARM static void test_armeb_table(void) { @@ -146,8 +146,8 @@ test_armeb_table(void) }; printf("Testing armeb_table...\n"); -#define I2S(I) audit_syscall_to_name((I), MACH_ARMEB) -#define S2I(S) audit_name_to_syscall((S), MACH_ARMEB) +#define I2S(I) audit_syscall_to_name((I), MACH_ARM) +#define S2I(S) audit_name_to_syscall((S), MACH_ARM) TEST_I2S(0); TEST_S2I(-1); #undef I2S @@ -406,7 +406,7 @@ main(void) #ifdef WITH_ALPHA test_alpha_table(); #endif -#ifdef WITH_ARMEB +#ifdef WITH_ARM test_armeb_table(); #endif #ifdef WITH_AARCH64 diff --git a/swig/audit.py b/swig/audit.py index 1feae68..a7612cf 100644 --- a/swig/audit.py +++ b/swig/audit.py @@ -695,7 +695,7 @@ MACH_PPC = _audit.MACH_PPC MACH_S390X = _audit.MACH_S390X MACH_S390 = _audit.MACH_S390 MACH_ALPHA = _audit.MACH_ALPHA -MACH_ARMEB = _audit.MACH_ARMEB +MACH_ARM = _audit.MACH_ARM MACH_AARCH64 = _audit.MACH_AARCH64 FAIL_IGNORE = _audit.FAIL_IGNORE FAIL_LOG = _audit.FAIL_LOG diff --git a/tools/ausyscall/ausyscall.c b/tools/ausyscall/ausyscall.c index 8d2a4b3..914900e 100644 --- a/tools/ausyscall/ausyscall.c +++ b/tools/ausyscall/ausyscall.c @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) stderr); exit(1); #endif -#ifndef WITH_ARMEB +#ifndef WITH_ARM } else if (strcmp("armeb", argv[i]) == 0) { fputs("Arm eabi processor support is not enabled\n", stderr); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 2/4] audit(userspace): Substitute armeb with arm 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro 2014-02-03 6:57 ` AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 1/4] audit(userspace): Substitute ARMEB with ARM AKASHI Takahiro @ 2014-02-03 6:57 ` AKASHI Takahiro 2014-02-03 6:58 ` [PATCH v3 3/4] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro ` (2 subsequent siblings) 5 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-02-03 6:57 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches On ARM, endianness doesn't make any differences on auditing. See: http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 The only exception is machintab.h. "armeb" stays unchanged, and "arm" is added because of potential backward compatibility. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- arm_table.h | 365 +++++++++++++++++++++++++++++++++++++++++++ config.guess | 1 - config.sub | 2 +- configure | 20 +-- configure.ac | 14 +- lib/Makefile.am | 10 +- lib/Makefile.in | 62 ++++---- lib/armeb_table.h | 365 ------------------------------------------- lib/lookup_table.c | 6 +- lib/machinetab.h | 1 + lib/test/lookup_test.c | 8 +- tools/ausyscall/ausyscall.c | 2 +- 12 files changed, 428 insertions(+), 428 deletions(-) create mode 100644 arm_table.h delete mode 100644 lib/armeb_table.h diff --git a/arm_table.h b/arm_table.h new file mode 100644 index 0000000..e4034dd --- /dev/null +++ b/arm_table.h @@ -0,0 +1,365 @@ +/* arm_table.h -- + * Copyright 2009-10,2013 Red Hat Inc., Durham, North Carolina. + * All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: + * Steve Grubb <sgrubb@redhat.com> + */ +_S(0, "restart_syscall") +_S(1, "exit") +_S(2, "fork") +_S(3, "read") +_S(4, "write") +_S(5, "open") +_S(6, "close") +_S(8, "creat") +_S(9, "link") +_S(10, "unlink") +_S(11, "execve") +_S(12, "chdir") +_S(13, "time") +_S(14, "mknod") +_S(15, "chmod") +_S(16, "lchown") +_S(19, "lseek") +_S(20, "getpid") +_S(21, "mount") +_S(22, "umount") +_S(23, "setuid") +_S(24, "getuid") +_S(25, "stime") +_S(26, "ptrace") +_S(27, "alarm") +_S(29, "pause") +_S(30, "utime") +_S(33, "access") +_S(34, "nice") +_S(36, "sync") +_S(37, "kill") +_S(38, "rename") +_S(39, "mkdir") +_S(40, "rmdir") +_S(41, "dup") +_S(42, "pipe") +_S(43, "times") +_S(45, "brk") +_S(46, "setgid") +_S(47, "getgid") +_S(49, "geteuid") +_S(50, "getegid") +_S(51, "acct") +_S(52, "umount2") +_S(54, "ioctl") +_S(55, "fcntl") +_S(57, "setpgid") +_S(60, "umask") +_S(61, "chroot") +_S(62, "ustat") +_S(63, "dup2") +_S(64, "getppid") +_S(65, "getpgrp") +_S(66, "setsid") +_S(67, "sigaction") +_S(70, "setreuid") +_S(71, "setregid") +_S(72, "sigsuspend") +_S(73, "sigpending") +_S(74, "sethostname") +_S(75, "setrlimit") +_S(76, "getrlimit") +_S(77, "getrusage") +_S(78, "gettimeofday") +_S(79, "settimeofday") +_S(80, "getgroups") +_S(81, "setgroups") +_S(82, "select") +_S(83, "symlink") +_S(85, "readlink") +_S(86, "uselib") +_S(87, "swapon") +_S(88, "reboot") +_S(89, "readdir") +_S(90, "mmap") +_S(91, "munmap") +_S(92, "truncate") +_S(93, "ftruncate") +_S(94, "fchmod") +_S(95, "fchown") +_S(96, "getpriority") +_S(97, "setpriority") +_S(99, "statfs") +_S(100, "fstatfs") +_S(102, "socketcall") +_S(103, "syslog") +_S(104, "setitimer") +_S(105, "getitimer") +_S(106, "stat") +_S(107, "lstat") +_S(108, "fstat") +_S(111, "vhangup") +_S(113, "syscall") +_S(114, "wait4") +_S(115, "swapoff") +_S(116, "sysinfo") +_S(117, "ipc") +_S(118, "fsync") +_S(119, "sigreturn") +_S(120, "clone") +_S(121, "setdomainname") +_S(122, "uname") +_S(124, "adjtimex") +_S(125, "mprotect") +_S(126, "sigprocmask") +_S(128, "init_module") +_S(129, "delete_module") +_S(131, "quotactl") +_S(132, "getpgid") +_S(133, "fchdir") +_S(134, "bdflush") +_S(135, "sysfs") +_S(136, "personality") +_S(138, "setfsuid") +_S(139, "setfsgid") +_S(140, "llseek") +_S(141, "getdents") +_S(142, "newselect") +_S(143, "flock") +_S(144, "msync") +_S(145, "readv") +_S(146, "writev") +_S(147, "getsid") +_S(148, "fdatasync") +_S(149, "sysctl") +_S(150, "mlock") +_S(151, "munlock") +_S(152, "mlockall") +_S(153, "munlockall") +_S(154, "sched_setparam") +_S(155, "sched_getparam") +_S(156, "sched_setscheduler") +_S(157, "sched_getscheduler") +_S(158, "sched_yield") +_S(159, "sched_get_priority_max") +_S(160, "sched_get_priority_min") +_S(161, "sched_rr_get_interval") +_S(162, "nanosleep") +_S(163, "mremap") +_S(164, "setresuid") +_S(165, "getresuid") +_S(168, "poll") +_S(169, "nfsservctl") +_S(170, "setresgid") +_S(171, "getresgid") +_S(172, "prctl") +_S(173, "rt_sigreturn") +_S(174, "rt_sigaction") +_S(175, "rt_sigprocmask") +_S(176, "rt_sigpending") +_S(177, "rt_sigtimedwait") +_S(178, "rt_sigqueueinfo") +_S(179, "rt_sigsuspend") +_S(180, "pread64") +_S(181, "pwrite64") +_S(182, "chown") +_S(183, "getcwd") +_S(184, "capget") +_S(185, "capset") +_S(186, "sigaltstack") +_S(187, "sendfile") +_S(190, "vfork") +_S(191, "ugetrlimit") +_S(192, "mmap2") +_S(193, "truncate64") +_S(194, "ftruncate64") +_S(195, "stat64") +_S(196, "lstat64") +_S(197, "fstat64") +_S(198, "lchown32") +_S(199, "getuid32") +_S(200, "getgid32") +_S(201, "geteuid32") +_S(202, "getegid32") +_S(203, "setreuid32") +_S(204, "setregid32") +_S(205, "getgroups32") +_S(206, "setgroups32") +_S(207, "fchown32") +_S(208, "setresuid32") +_S(209, "getresuid32") +_S(210, "setresgid32") +_S(211, "getresgid32") +_S(212, "chown32") +_S(213, "setuid32") +_S(214, "setgid32") +_S(215, "setfsuid32") +_S(216, "setfsgid32") +_S(217, "getdents64") +_S(218, "pivot_root") +_S(219, "mincore") +_S(220, "madvise") +_S(221, "fcntl64") +_S(224, "gettid") +_S(225, "readahead") +_S(226, "setxattr") +_S(227, "lsetxattr") +_S(228, "fsetxattr") +_S(229, "getxattr") +_S(230, "lgetxattr") +_S(231, "fgetxattr") +_S(232, "listxattr") +_S(233, "llistxattr") +_S(234, "flistxattr") +_S(235, "removexattr") +_S(236, "lremovexattr") +_S(237, "fremovexattr") +_S(238, "tkill") +_S(239, "sendfile64") +_S(240, "futex") +_S(241, "sched_setaffinity") +_S(242, "sched_getaffinity") +_S(243, "io_setup") +_S(244, "io_destroy") +_S(245, "io_getevents") +_S(246, "io_submit") +_S(247, "io_cancel") +_S(248, "exit_group") +_S(249, "lookup_dcookie") +_S(250, "epoll_create") +_S(251, "epoll_ctl") +_S(252, "epoll_wait") +_S(253, "remap_file_pages") +_S(256, "set_tid_address") +_S(257, "timer_create") +_S(258, "timer_settime") +_S(259, "timer_gettime") +_S(260, "timer_getoverrun") +_S(261, "timer_delete") +_S(262, "clock_settime") +_S(263, "clock_gettime") +_S(264, "clock_getres") +_S(265, "clock_nanosleep") +_S(266, "statfs64") +_S(267, "fstatfs64") +_S(268, "tgkill") +_S(269, "utimes") +_S(270, "fadvise64_64") +_S(271, "pciconfig_iobase") +_S(272, "pciconfig_read") +_S(273, "pciconfig_write") +_S(274, "mq_open") +_S(275, "mq_unlink") +_S(276, "mq_timedsend") +_S(277, "mq_timedreceive") +_S(278, "mq_notify") +_S(279, "mq_getsetattr") +_S(280, "waitid") +_S(281, "socket") +_S(282, "bind") +_S(283, "connect") +_S(284, "listen") +_S(285, "accept") +_S(286, "getsockname") +_S(287, "getpeername") +_S(288, "socketpair") +_S(289, "send") +_S(290, "sendto") +_S(291, "recv") +_S(292, "recvfrom") +_S(293, "shutdown") +_S(294, "setsockopt") +_S(295, "getsockopt") +_S(296, "sendmsg") +_S(297, "recvmsg") +_S(298, "semop") +_S(299, "semget") +_S(300, "semctl") +_S(301, "msgsnd") +_S(302, "msgrcv") +_S(303, "msgget") +_S(304, "msgctl") +_S(305, "shmat") +_S(306, "shmdt") +_S(307, "shmget") +_S(308, "shmctl") +_S(309, "add_key") +_S(310, "request_key") +_S(311, "keyctl") +_S(312, "semtimedop") +_S(313, "vserver") +_S(314, "ioprio_set") +_S(315, "ioprio_get") +_S(316, "inotify_init") +_S(317, "inotify_add_watch") +_S(318, "inotify_rm_watch") +_S(319, "mbind") +_S(320, "get_mempolicy") +_S(321, "set_mempolicy") +_S(322, "openat") +_S(323, "mkdirat") +_S(324, "mknodat") +_S(325, "fchownat") +_S(326, "futimesat") +_S(327, "fstatat64") +_S(328, "unlinkat") +_S(329, "renameat") +_S(330, "linkat") +_S(331, "symlinkat") +_S(332, "readlinkat") +_S(333, "fchmodat") +_S(334, "faccessat") +_S(337, "unshare") +_S(338, "set_robust_list") +_S(339, "get_robust_list") +_S(340, "splice") +_S(341, "sync_file_range") +_S(342, "tee") +_S(343, "vmsplice") +_S(344, "move_pages") +_S(345, "getcpu") +_S(347, "kexec_load") +_S(348, "utimensat") +_S(349, "signalfd") +_S(350, "timerfd_create") +_S(351, "eventfd") +_S(352, "fallocate") +_S(353, "timerfd_settime") +_S(354, "timerfd_gettime") +_S(355, "signalfd4") +_S(356, "eventfd2") +_S(357, "epoll_create1") +_S(358, "dup3") +_S(359, "pipe2") +_S(360, "inotify_init1") +_S(361, "preadv") +_S(362, "pwritev") +_S(363, "rt_tgsigqueueinfo") +_S(364, "perf_event_open") +_S(365, "recvmmsg") +_S(366, "accept4") +_S(367, "fanotify_init") +_S(368, "fanotify_mark") +_S(369, "prlimit64") +_S(370, "name_to_handle_at") +_S(371, "open_by_handle_at") +_S(372, "clock_adjtime") +_S(373, "syncfs") +_S(374, "sendmmsg") +_S(375, "setns") +_S(376, "process_vm_readv") +_S(377, "process_vm_writev") +_S(378, "kcmp") +_S(379, "finit_module") diff --git a/config.guess b/config.guess index b79252d..916300b 100755 --- a/config.guess +++ b/config.guess @@ -171,7 +171,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; diff --git a/config.sub b/config.sub index c765b34..058edb7 100755 --- a/config.sub +++ b/config.sub @@ -342,7 +342,7 @@ case $basic_machine in os=-none ;; xscaleeb) - basic_machine=armeb-unknown + basic_machine=arm-unknown ;; xscaleel) diff --git a/configure b/configure index 84f45c0..a57650c 100755 --- a/configure +++ b/configure @@ -802,7 +802,7 @@ enable_systemd with_debug with_warn with_alpha -with_armeb +with_arm with_aarch64 with_apparmor with_prelude @@ -1465,7 +1465,7 @@ Optional Packages: --with-debug turn on debugging [default=no] --with-warn turn on warnings [default=yes] --with-alpha enable Alpha processor support - --with-armeb enable Arm eabi processor support + --with-arm enable Arm eabi processor support --with-aarch64 enable Aarch64 processor support --with-apparmor enable AppArmor events --with-prelude enable prelude IDS support @@ -13605,19 +13605,19 @@ $as_echo "$use_alpha" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include arm eabi processor support" >&5 $as_echo_n "checking whether to include arm eabi processor support... " >&6; } -# Check whether --with-armeb was given. -if test "${with_armeb+set}" = set; then : - withval=$with_armeb; use_armeb=$withval +# Check whether --with-arm was given. +if test "${with_arm+set}" = set; then : + withval=$with_arm; use_arm=$withval else - use_armeb=no + use_arm=no fi -if test x$use_armeb != xno ; then +if test x$use_arm != xno ; then $as_echo "#define WITH_ARM 1" >>confdefs.h fi - if test x$use_armeb = xyes; then + if test x$use_arm = xyes; then USE_ARM_TRUE= USE_ARM_FALSE='#' else @@ -13625,8 +13625,8 @@ else USE_ARM_FALSE= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_armeb" >&5 -$as_echo "$use_armeb" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_arm" >&5 +$as_echo "$use_arm" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include aarch64 processor support" >&5 $as_echo_n "checking whether to include aarch64 processor support... " >&6; } diff --git a/configure.ac b/configure.ac index 52691cf..1267a8d 100644 --- a/configure.ac +++ b/configure.ac @@ -191,15 +191,15 @@ AM_CONDITIONAL(USE_ALPHA, test x$use_alpha = xyes) AC_MSG_RESULT($use_alpha) AC_MSG_CHECKING(whether to include arm eabi processor support) -AC_ARG_WITH(armeb, -AS_HELP_STRING([--with-armeb],[enable Arm eabi processor support]), -use_armeb=$withval, -use_armeb=no) -if test x$use_armeb != xno ; then +AC_ARG_WITH(arm, +AS_HELP_STRING([--with-arm],[enable Arm eabi processor support]), +use_arm=$withval, +use_arm=no) +if test x$use_arm != xno ; then AC_DEFINE(WITH_ARM,1,[Define if you want to enable Arm eabi processor support.]) fi -AM_CONDITIONAL(USE_ARM, test x$use_armeb = xyes) -AC_MSG_RESULT($use_armeb) +AM_CONDITIONAL(USE_ARM, test x$use_arm = xyes) +AC_MSG_RESULT($use_arm) AC_MSG_CHECKING(whether to include aarch64 processor support) AC_ARG_WITH(aarch64, diff --git a/lib/Makefile.am b/lib/Makefile.am index 162d41b..f72c7c0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -50,7 +50,7 @@ if USE_ALPHA BUILT_SOURCES += alpha_tables.h gen_alpha_tables_h endif if USE_ARM -BUILT_SOURCES += armeb_tables.h gen_armeb_tables_h +BUILT_SOURCES += arm_tables.h gen_arm_tables_h endif if USE_AARCH64 BUILT_SOURCES += aarch64_tables.h gen_aarch64_tables_h @@ -69,10 +69,10 @@ alpha_tables.h: gen_alpha_tables_h Makefile endif if USE_ARM -gen_armeb_tables_h: gen_tables.c gen_tables.h armeb_table.h - $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\"armeb_table.h\" -E -o $@ gen_tables.c -armeb_tables.h: gen_armeb_tables_h Makefile - $(PYTHON) gen_tables.py --lowercase --i2s --s2i armeb_syscall gen_armeb_tables_h $@ +gen_arm_tables_h: gen_tables.c gen_tables.h arm_table.h + $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) -DTABLE_H=\"arm_table.h\" -E -o $@ gen_tables.c +arm_tables.h: gen_arm_tables_h Makefile + $(PYTHON) gen_tables.py --lowercase --i2s --s2i arm_syscall gen_arm_tables_h $@ endif if USE_AARCH64 diff --git a/lib/Makefile.in b/lib/Makefile.in index 4075b6f..c3a003c 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -104,7 +104,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @USE_ALPHA_TRUE@am__append_1 = alpha_tables.h -@USE_ARM_TRUE@am__append_2 = armeb_tables.h +@USE_ARM_TRUE@am__append_2 = arm_tables.h @USE_AARCH64_TRUE@am__append_3 = aarch64_tables.h noinst_PROGRAMS = gen_actiontabs_h$(EXEEXT) gen_errtabs_h$(EXEEXT) \ gen_fieldtabs_h$(EXEEXT) gen_flagtabs_h$(EXEEXT) \ @@ -115,7 +115,7 @@ noinst_PROGRAMS = gen_actiontabs_h$(EXEEXT) gen_errtabs_h$(EXEEXT) \ gen_s390x_tables_h$(EXEEXT) gen_x86_64_tables_h$(EXEEXT) \ $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) @USE_ALPHA_TRUE@am__append_4 = gen_alpha_tables_h -@USE_ARM_TRUE@am__append_5 = gen_armeb_tables_h +@USE_ARM_TRUE@am__append_5 = gen_arm_tables_h @USE_AARCH64_TRUE@am__append_6 = gen_aarch64_tables_h subdir = lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ @@ -175,7 +175,7 @@ libaudit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libaudit_la_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALPHA_TRUE@am__EXEEXT_1 = gen_alpha_tables_h$(EXEEXT) -@USE_ARM_TRUE@am__EXEEXT_2 = gen_armeb_tables_h$(EXEEXT) +@USE_ARM_TRUE@am__EXEEXT_2 = gen_arm_tables_h$(EXEEXT) @USE_AARCH64_TRUE@am__EXEEXT_3 = gen_aarch64_tables_h$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am__gen_aarch64_tables_h_SOURCES_DIST = gen_tables.c gen_tables.h \ @@ -205,15 +205,15 @@ gen_alpha_tables_h_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(gen_alpha_tables_h_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -am__gen_armeb_tables_h_SOURCES_DIST = gen_tables.c gen_tables.h \ - armeb_table.h -@USE_ARM_TRUE@am_gen_armeb_tables_h_OBJECTS = \ -@USE_ARM_TRUE@ gen_armeb_tables_h-gen_tables.$(OBJEXT) -gen_armeb_tables_h_OBJECTS = $(am_gen_armeb_tables_h_OBJECTS) -gen_armeb_tables_h_LDADD = $(LDADD) -gen_armeb_tables_h_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ +am__gen_arm_tables_h_SOURCES_DIST = gen_tables.c gen_tables.h \ + arm_table.h +@USE_ARM_TRUE@am_gen_arm_tables_h_OBJECTS = \ +@USE_ARM_TRUE@ gen_arm_tables_h-gen_tables.$(OBJEXT) +gen_arm_tables_h_OBJECTS = $(am_gen_arm_tables_h_OBJECTS) +gen_arm_tables_h_LDADD = $(LDADD) +gen_arm_tables_h_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(gen_armeb_tables_h_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(gen_arm_tables_h_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_gen_errtabs_h_OBJECTS = gen_errtabs_h-gen_tables.$(OBJEXT) gen_errtabs_h_OBJECTS = $(am_gen_errtabs_h_OBJECTS) @@ -343,7 +343,7 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libaudit_la_SOURCES) $(nodist_libaudit_la_SOURCES) \ $(gen_aarch64_tables_h_SOURCES) $(gen_actiontabs_h_SOURCES) \ - $(gen_alpha_tables_h_SOURCES) $(gen_armeb_tables_h_SOURCES) \ + $(gen_alpha_tables_h_SOURCES) $(gen_arm_tables_h_SOURCES) \ $(gen_errtabs_h_SOURCES) $(gen_fieldtabs_h_SOURCES) \ $(gen_flagtabs_h_SOURCES) $(gen_ftypetabs_h_SOURCES) \ $(gen_i386_tables_h_SOURCES) $(gen_ia64_tables_h_SOURCES) \ @@ -355,7 +355,7 @@ DIST_SOURCES = $(libaudit_la_SOURCES) \ $(am__gen_aarch64_tables_h_SOURCES_DIST) \ $(gen_actiontabs_h_SOURCES) \ $(am__gen_alpha_tables_h_SOURCES_DIST) \ - $(am__gen_armeb_tables_h_SOURCES_DIST) \ + $(am__gen_arm_tables_h_SOURCES_DIST) \ $(gen_errtabs_h_SOURCES) $(gen_fieldtabs_h_SOURCES) \ $(gen_flagtabs_h_SOURCES) $(gen_ftypetabs_h_SOURCES) \ $(gen_i386_tables_h_SOURCES) $(gen_ia64_tables_h_SOURCES) \ @@ -591,8 +591,8 @@ gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h gen_actiontabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="actiontab.h"' @USE_ALPHA_TRUE@gen_alpha_tables_h_SOURCES = gen_tables.c gen_tables.h alpha_table.h @USE_ALPHA_TRUE@gen_alpha_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="alpha_table.h"' -@USE_ARM_TRUE@gen_armeb_tables_h_SOURCES = gen_tables.c gen_tables.h armeb_table.h -@USE_ARM_TRUE@gen_armeb_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="armeb_table.h"' +@USE_ARM_TRUE@gen_arm_tables_h_SOURCES = gen_tables.c gen_tables.h arm_table.h +@USE_ARM_TRUE@gen_arm_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="arm_table.h"' @USE_AARCH64_TRUE@gen_aarch64_tables_h_SOURCES = gen_tables.c gen_tables.h aarch64_table.h @USE_AARCH64_TRUE@gen_aarch64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="aarch64_table.h"' gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h @@ -716,9 +716,9 @@ gen_alpha_tables_h$(EXEEXT): $(gen_alpha_tables_h_OBJECTS) $(gen_alpha_tables_h_ @rm -f gen_alpha_tables_h$(EXEEXT) $(AM_V_CCLD)$(gen_alpha_tables_h_LINK) $(gen_alpha_tables_h_OBJECTS) $(gen_alpha_tables_h_LDADD) $(LIBS) -gen_armeb_tables_h$(EXEEXT): $(gen_armeb_tables_h_OBJECTS) $(gen_armeb_tables_h_DEPENDENCIES) $(EXTRA_gen_armeb_tables_h_DEPENDENCIES) - @rm -f gen_armeb_tables_h$(EXEEXT) - $(AM_V_CCLD)$(gen_armeb_tables_h_LINK) $(gen_armeb_tables_h_OBJECTS) $(gen_armeb_tables_h_LDADD) $(LIBS) +gen_arm_tables_h$(EXEEXT): $(gen_arm_tables_h_OBJECTS) $(gen_arm_tables_h_DEPENDENCIES) $(EXTRA_gen_arm_tables_h_DEPENDENCIES) + @rm -f gen_arm_tables_h$(EXEEXT) + $(AM_V_CCLD)$(gen_arm_tables_h_LINK) $(gen_arm_tables_h_OBJECTS) $(gen_arm_tables_h_LDADD) $(LIBS) gen_errtabs_h$(EXEEXT): $(gen_errtabs_h_OBJECTS) $(gen_errtabs_h_DEPENDENCIES) $(EXTRA_gen_errtabs_h_DEPENDENCIES) @rm -f gen_errtabs_h$(EXEEXT) @@ -783,7 +783,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_aarch64_tables_h-gen_tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_actiontabs_h-gen_tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_alpha_tables_h-gen_tables.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_armeb_tables_h-gen_tables.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_arm_tables_h-gen_tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_errtabs_h-gen_tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_fieldtabs_h-gen_tables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gen_flagtabs_h-gen_tables.Po@am__quote@ @@ -865,19 +865,19 @@ gen_alpha_tables_h-gen_tables.obj: gen_tables.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_alpha_tables_h_CFLAGS) $(CFLAGS) -c -o gen_alpha_tables_h-gen_tables.obj `if test -f 'gen_tables.c'; then $(CYGPATH_W) 'gen_tables.c'; else $(CYGPATH_W) '$(srcdir)/gen_tables.c'; fi` -gen_armeb_tables_h-gen_tables.o: gen_tables.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_armeb_tables_h_CFLAGS) $(CFLAGS) -MT gen_armeb_tables_h-gen_tables.o -MD -MP -MF $(DEPDIR)/gen_armeb_tables_h-gen_tables.Tpo -c -o gen_armeb_tables_h-gen_tables.o `test -f 'gen_tables.c' || echo '$(srcdir)/'`gen_tables.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gen_armeb_tables_h-gen_tables.Tpo $(DEPDIR)/gen_armeb_tables_h-gen_tables.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_tables.c' object='gen_armeb_tables_h-gen_tables.o' libtool=no @AMDEPBACKSLASH@ +gen_arm_tables_h-gen_tables.o: gen_tables.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_arm_tables_h_CFLAGS) $(CFLAGS) -MT gen_arm_tables_h-gen_tables.o -MD -MP -MF $(DEPDIR)/gen_arm_tables_h-gen_tables.Tpo -c -o gen_arm_tables_h-gen_tables.o `test -f 'gen_tables.c' || echo '$(srcdir)/'`gen_tables.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gen_arm_tables_h-gen_tables.Tpo $(DEPDIR)/gen_arm_tables_h-gen_tables.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_tables.c' object='gen_arm_tables_h-gen_tables.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_armeb_tables_h_CFLAGS) $(CFLAGS) -c -o gen_armeb_tables_h-gen_tables.o `test -f 'gen_tables.c' || echo '$(srcdir)/'`gen_tables.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_arm_tables_h_CFLAGS) $(CFLAGS) -c -o gen_arm_tables_h-gen_tables.o `test -f 'gen_tables.c' || echo '$(srcdir)/'`gen_tables.c -gen_armeb_tables_h-gen_tables.obj: gen_tables.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_armeb_tables_h_CFLAGS) $(CFLAGS) -MT gen_armeb_tables_h-gen_tables.obj -MD -MP -MF $(DEPDIR)/gen_armeb_tables_h-gen_tables.Tpo -c -o gen_armeb_tables_h-gen_tables.obj `if test -f 'gen_tables.c'; then $(CYGPATH_W) 'gen_tables.c'; else $(CYGPATH_W) '$(srcdir)/gen_tables.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gen_armeb_tables_h-gen_tables.Tpo $(DEPDIR)/gen_armeb_tables_h-gen_tables.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_tables.c' object='gen_armeb_tables_h-gen_tables.obj' libtool=no @AMDEPBACKSLASH@ +gen_arm_tables_h-gen_tables.obj: gen_tables.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_arm_tables_h_CFLAGS) $(CFLAGS) -MT gen_arm_tables_h-gen_tables.obj -MD -MP -MF $(DEPDIR)/gen_arm_tables_h-gen_tables.Tpo -c -o gen_arm_tables_h-gen_tables.obj `if test -f 'gen_tables.c'; then $(CYGPATH_W) 'gen_tables.c'; else $(CYGPATH_W) '$(srcdir)/gen_tables.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gen_arm_tables_h-gen_tables.Tpo $(DEPDIR)/gen_arm_tables_h-gen_tables.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gen_tables.c' object='gen_arm_tables_h-gen_tables.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_armeb_tables_h_CFLAGS) $(CFLAGS) -c -o gen_armeb_tables_h-gen_tables.obj `if test -f 'gen_tables.c'; then $(CYGPATH_W) 'gen_tables.c'; else $(CYGPATH_W) '$(srcdir)/gen_tables.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_arm_tables_h_CFLAGS) $(CFLAGS) -c -o gen_arm_tables_h-gen_tables.obj `if test -f 'gen_tables.c'; then $(CYGPATH_W) 'gen_tables.c'; else $(CYGPATH_W) '$(srcdir)/gen_tables.c'; fi` gen_errtabs_h-gen_tables.o: gen_tables.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gen_errtabs_h_CFLAGS) $(CFLAGS) -MT gen_errtabs_h-gen_tables.o -MD -MP -MF $(DEPDIR)/gen_errtabs_h-gen_tables.Tpo -c -o gen_errtabs_h-gen_tables.o `test -f 'gen_tables.c' || echo '$(srcdir)/'`gen_tables.c @@ -1379,8 +1379,8 @@ actiontabs.h: gen_actiontabs_h Makefile ./gen_actiontabs_h --lowercase --i2s --s2i action > $@ @USE_ALPHA_TRUE@alpha_tables.h: gen_alpha_tables_h Makefile @USE_ALPHA_TRUE@ ./gen_alpha_tables_h --lowercase --i2s --s2i alpha_syscall > $@ -@USE_ARM_TRUE@armeb_tables.h: gen_armeb_tables_h Makefile -@USE_ARM_TRUE@ ./gen_armeb_tables_h --lowercase --i2s --s2i armeb_syscall > $@ +@USE_ARM_TRUE@arm_tables.h: gen_arm_tables_h Makefile +@USE_ARM_TRUE@ ./gen_arm_tables_h --lowercase --i2s --s2i arm_syscall > $@ @USE_AARCH64_TRUE@aarch64_tables.h: gen_aarch64_tables_h Makefile @USE_AARCH64_TRUE@ ./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@ errtabs.h: gen_errtabs_h Makefile diff --git a/lib/armeb_table.h b/lib/armeb_table.h deleted file mode 100644 index f45213a..0000000 --- a/lib/armeb_table.h +++ /dev/null @@ -1,365 +0,0 @@ -/* armeb_table.h -- - * Copyright 2009-10,2013 Red Hat Inc., Durham, North Carolina. - * All Rights Reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: - * Steve Grubb <sgrubb@redhat.com> - */ -_S(0, "restart_syscall") -_S(1, "exit") -_S(2, "fork") -_S(3, "read") -_S(4, "write") -_S(5, "open") -_S(6, "close") -_S(8, "creat") -_S(9, "link") -_S(10, "unlink") -_S(11, "execve") -_S(12, "chdir") -_S(13, "time") -_S(14, "mknod") -_S(15, "chmod") -_S(16, "lchown") -_S(19, "lseek") -_S(20, "getpid") -_S(21, "mount") -_S(22, "umount") -_S(23, "setuid") -_S(24, "getuid") -_S(25, "stime") -_S(26, "ptrace") -_S(27, "alarm") -_S(29, "pause") -_S(30, "utime") -_S(33, "access") -_S(34, "nice") -_S(36, "sync") -_S(37, "kill") -_S(38, "rename") -_S(39, "mkdir") -_S(40, "rmdir") -_S(41, "dup") -_S(42, "pipe") -_S(43, "times") -_S(45, "brk") -_S(46, "setgid") -_S(47, "getgid") -_S(49, "geteuid") -_S(50, "getegid") -_S(51, "acct") -_S(52, "umount2") -_S(54, "ioctl") -_S(55, "fcntl") -_S(57, "setpgid") -_S(60, "umask") -_S(61, "chroot") -_S(62, "ustat") -_S(63, "dup2") -_S(64, "getppid") -_S(65, "getpgrp") -_S(66, "setsid") -_S(67, "sigaction") -_S(70, "setreuid") -_S(71, "setregid") -_S(72, "sigsuspend") -_S(73, "sigpending") -_S(74, "sethostname") -_S(75, "setrlimit") -_S(76, "getrlimit") -_S(77, "getrusage") -_S(78, "gettimeofday") -_S(79, "settimeofday") -_S(80, "getgroups") -_S(81, "setgroups") -_S(82, "select") -_S(83, "symlink") -_S(85, "readlink") -_S(86, "uselib") -_S(87, "swapon") -_S(88, "reboot") -_S(89, "readdir") -_S(90, "mmap") -_S(91, "munmap") -_S(92, "truncate") -_S(93, "ftruncate") -_S(94, "fchmod") -_S(95, "fchown") -_S(96, "getpriority") -_S(97, "setpriority") -_S(99, "statfs") -_S(100, "fstatfs") -_S(102, "socketcall") -_S(103, "syslog") -_S(104, "setitimer") -_S(105, "getitimer") -_S(106, "stat") -_S(107, "lstat") -_S(108, "fstat") -_S(111, "vhangup") -_S(113, "syscall") -_S(114, "wait4") -_S(115, "swapoff") -_S(116, "sysinfo") -_S(117, "ipc") -_S(118, "fsync") -_S(119, "sigreturn") -_S(120, "clone") -_S(121, "setdomainname") -_S(122, "uname") -_S(124, "adjtimex") -_S(125, "mprotect") -_S(126, "sigprocmask") -_S(128, "init_module") -_S(129, "delete_module") -_S(131, "quotactl") -_S(132, "getpgid") -_S(133, "fchdir") -_S(134, "bdflush") -_S(135, "sysfs") -_S(136, "personality") -_S(138, "setfsuid") -_S(139, "setfsgid") -_S(140, "llseek") -_S(141, "getdents") -_S(142, "newselect") -_S(143, "flock") -_S(144, "msync") -_S(145, "readv") -_S(146, "writev") -_S(147, "getsid") -_S(148, "fdatasync") -_S(149, "sysctl") -_S(150, "mlock") -_S(151, "munlock") -_S(152, "mlockall") -_S(153, "munlockall") -_S(154, "sched_setparam") -_S(155, "sched_getparam") -_S(156, "sched_setscheduler") -_S(157, "sched_getscheduler") -_S(158, "sched_yield") -_S(159, "sched_get_priority_max") -_S(160, "sched_get_priority_min") -_S(161, "sched_rr_get_interval") -_S(162, "nanosleep") -_S(163, "mremap") -_S(164, "setresuid") -_S(165, "getresuid") -_S(168, "poll") -_S(169, "nfsservctl") -_S(170, "setresgid") -_S(171, "getresgid") -_S(172, "prctl") -_S(173, "rt_sigreturn") -_S(174, "rt_sigaction") -_S(175, "rt_sigprocmask") -_S(176, "rt_sigpending") -_S(177, "rt_sigtimedwait") -_S(178, "rt_sigqueueinfo") -_S(179, "rt_sigsuspend") -_S(180, "pread64") -_S(181, "pwrite64") -_S(182, "chown") -_S(183, "getcwd") -_S(184, "capget") -_S(185, "capset") -_S(186, "sigaltstack") -_S(187, "sendfile") -_S(190, "vfork") -_S(191, "ugetrlimit") -_S(192, "mmap2") -_S(193, "truncate64") -_S(194, "ftruncate64") -_S(195, "stat64") -_S(196, "lstat64") -_S(197, "fstat64") -_S(198, "lchown32") -_S(199, "getuid32") -_S(200, "getgid32") -_S(201, "geteuid32") -_S(202, "getegid32") -_S(203, "setreuid32") -_S(204, "setregid32") -_S(205, "getgroups32") -_S(206, "setgroups32") -_S(207, "fchown32") -_S(208, "setresuid32") -_S(209, "getresuid32") -_S(210, "setresgid32") -_S(211, "getresgid32") -_S(212, "chown32") -_S(213, "setuid32") -_S(214, "setgid32") -_S(215, "setfsuid32") -_S(216, "setfsgid32") -_S(217, "getdents64") -_S(218, "pivot_root") -_S(219, "mincore") -_S(220, "madvise") -_S(221, "fcntl64") -_S(224, "gettid") -_S(225, "readahead") -_S(226, "setxattr") -_S(227, "lsetxattr") -_S(228, "fsetxattr") -_S(229, "getxattr") -_S(230, "lgetxattr") -_S(231, "fgetxattr") -_S(232, "listxattr") -_S(233, "llistxattr") -_S(234, "flistxattr") -_S(235, "removexattr") -_S(236, "lremovexattr") -_S(237, "fremovexattr") -_S(238, "tkill") -_S(239, "sendfile64") -_S(240, "futex") -_S(241, "sched_setaffinity") -_S(242, "sched_getaffinity") -_S(243, "io_setup") -_S(244, "io_destroy") -_S(245, "io_getevents") -_S(246, "io_submit") -_S(247, "io_cancel") -_S(248, "exit_group") -_S(249, "lookup_dcookie") -_S(250, "epoll_create") -_S(251, "epoll_ctl") -_S(252, "epoll_wait") -_S(253, "remap_file_pages") -_S(256, "set_tid_address") -_S(257, "timer_create") -_S(258, "timer_settime") -_S(259, "timer_gettime") -_S(260, "timer_getoverrun") -_S(261, "timer_delete") -_S(262, "clock_settime") -_S(263, "clock_gettime") -_S(264, "clock_getres") -_S(265, "clock_nanosleep") -_S(266, "statfs64") -_S(267, "fstatfs64") -_S(268, "tgkill") -_S(269, "utimes") -_S(270, "fadvise64_64") -_S(271, "pciconfig_iobase") -_S(272, "pciconfig_read") -_S(273, "pciconfig_write") -_S(274, "mq_open") -_S(275, "mq_unlink") -_S(276, "mq_timedsend") -_S(277, "mq_timedreceive") -_S(278, "mq_notify") -_S(279, "mq_getsetattr") -_S(280, "waitid") -_S(281, "socket") -_S(282, "bind") -_S(283, "connect") -_S(284, "listen") -_S(285, "accept") -_S(286, "getsockname") -_S(287, "getpeername") -_S(288, "socketpair") -_S(289, "send") -_S(290, "sendto") -_S(291, "recv") -_S(292, "recvfrom") -_S(293, "shutdown") -_S(294, "setsockopt") -_S(295, "getsockopt") -_S(296, "sendmsg") -_S(297, "recvmsg") -_S(298, "semop") -_S(299, "semget") -_S(300, "semctl") -_S(301, "msgsnd") -_S(302, "msgrcv") -_S(303, "msgget") -_S(304, "msgctl") -_S(305, "shmat") -_S(306, "shmdt") -_S(307, "shmget") -_S(308, "shmctl") -_S(309, "add_key") -_S(310, "request_key") -_S(311, "keyctl") -_S(312, "semtimedop") -_S(313, "vserver") -_S(314, "ioprio_set") -_S(315, "ioprio_get") -_S(316, "inotify_init") -_S(317, "inotify_add_watch") -_S(318, "inotify_rm_watch") -_S(319, "mbind") -_S(320, "get_mempolicy") -_S(321, "set_mempolicy") -_S(322, "openat") -_S(323, "mkdirat") -_S(324, "mknodat") -_S(325, "fchownat") -_S(326, "futimesat") -_S(327, "fstatat64") -_S(328, "unlinkat") -_S(329, "renameat") -_S(330, "linkat") -_S(331, "symlinkat") -_S(332, "readlinkat") -_S(333, "fchmodat") -_S(334, "faccessat") -_S(337, "unshare") -_S(338, "set_robust_list") -_S(339, "get_robust_list") -_S(340, "splice") -_S(341, "sync_file_range") -_S(342, "tee") -_S(343, "vmsplice") -_S(344, "move_pages") -_S(345, "getcpu") -_S(347, "kexec_load") -_S(348, "utimensat") -_S(349, "signalfd") -_S(350, "timerfd_create") -_S(351, "eventfd") -_S(352, "fallocate") -_S(353, "timerfd_settime") -_S(354, "timerfd_gettime") -_S(355, "signalfd4") -_S(356, "eventfd2") -_S(357, "epoll_create1") -_S(358, "dup3") -_S(359, "pipe2") -_S(360, "inotify_init1") -_S(361, "preadv") -_S(362, "pwritev") -_S(363, "rt_tgsigqueueinfo") -_S(364, "perf_event_open") -_S(365, "recvmmsg") -_S(366, "accept4") -_S(367, "fanotify_init") -_S(368, "fanotify_mark") -_S(369, "prlimit64") -_S(370, "name_to_handle_at") -_S(371, "open_by_handle_at") -_S(372, "clock_adjtime") -_S(373, "syncfs") -_S(374, "sendmmsg") -_S(375, "setns") -_S(376, "process_vm_readv") -_S(377, "process_vm_writev") -_S(378, "kcmp") -_S(379, "finit_module") diff --git a/lib/lookup_table.c b/lib/lookup_table.c index 77c754a..a60aeb8 100644 --- a/lib/lookup_table.c +++ b/lib/lookup_table.c @@ -39,7 +39,7 @@ #include "alpha_tables.h" #endif #ifdef WITH_ARM -#include "armeb_tables.h" +#include "arm_tables.h" #endif #ifdef WITH_AARCH64 #include "aarch64_tables.h" @@ -139,7 +139,7 @@ int audit_name_to_syscall(const char *sc, int machine) #endif #ifdef WITH_ARM case MACH_ARM: - found = armeb_syscall_s2i(sc, &res); + found = arm_syscall_s2i(sc, &res); break; #endif #ifdef WITH_AARCH64 @@ -181,7 +181,7 @@ const char *audit_syscall_to_name(int sc, int machine) #endif #ifdef WITH_ARM case MACH_ARM: - return armeb_syscall_i2s(sc); + return arm_syscall_i2s(sc); #endif #ifdef WITH_AARCH64 case MACH_AARCH64: diff --git a/lib/machinetab.h b/lib/machinetab.h index f1358ae..88af2cf 100644 --- a/lib/machinetab.h +++ b/lib/machinetab.h @@ -35,6 +35,7 @@ _S(MACH_ALPHA, "alpha" ) #endif #ifdef WITH_ARM _S(MACH_ARM, "armeb" ) +_S(MACH_ARM, "arm" ) _S(MACH_ARM, "armv5tejl") _S(MACH_ARM, "armv5tel") _S(MACH_ARM, "armv6l") diff --git a/lib/test/lookup_test.c b/lib/test/lookup_test.c index 21893da..6517d96 100644 --- a/lib/test/lookup_test.c +++ b/lib/test/lookup_test.c @@ -139,13 +139,13 @@ test_alpha_table(void) #ifdef WITH_ARM static void -test_armeb_table(void) +test_arm_table(void) { static const struct entry t[] = { -#include "../armeb_table.h" +#include "../arm_table.h" }; - printf("Testing armeb_table...\n"); + printf("Testing arm_table...\n"); #define I2S(I) audit_syscall_to_name((I), MACH_ARM) #define S2I(S) audit_name_to_syscall((S), MACH_ARM) TEST_I2S(0); @@ -407,7 +407,7 @@ main(void) test_alpha_table(); #endif #ifdef WITH_ARM - test_armeb_table(); + test_arm_table(); #endif #ifdef WITH_AARCH64 test_aarch64_table(); diff --git a/tools/ausyscall/ausyscall.c b/tools/ausyscall/ausyscall.c index 914900e..361afd9 100644 --- a/tools/ausyscall/ausyscall.c +++ b/tools/ausyscall/ausyscall.c @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) exit(1); #endif #ifndef WITH_ARM - } else if (strcmp("armeb", argv[i]) == 0) { + } else if (strcmp("arm", argv[i]) == 0) { fputs("Arm eabi processor support is not enabled\n", stderr); exit(1); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 3/4] audit(userspace): Add missing syscalls for AArch64 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro ` (2 preceding siblings ...) 2014-02-03 6:57 ` [PATCH v3 2/4] audit(userspace): Substitute armeb with arm AKASHI Takahiro @ 2014-02-03 6:58 ` AKASHI Takahiro 2014-02-03 6:58 ` [PATCH v3 4/4] audit(userspace): Add compat system call support " AKASHI Takahiro 2014-03-20 0:38 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support Steve Grubb 5 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-02-03 6:58 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches There are missing system call entries in lookup table for AArch64. This patch adds them based on kernel's include/uapi/asm-generic/unistd.h, which AArch64 (or arm64 in kernel) relies on. System call names here are derived directly from called fuctions by removing prefix 'sys_' and postfix '64'. The exceptions are: * fadvise64 * prlimit64 * fstat because we want to keep compatibility with other arch's namings like on x86 or s390x. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/aarch64_table.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/aarch64_table.h b/lib/aarch64_table.h index 56f4d33..5dcd349 100644 --- a/lib/aarch64_table.h +++ b/lib/aarch64_table.h @@ -45,6 +45,7 @@ _S(21, "epoll_ctl") _S(22, "epoll_pwait") _S(23, "dup") _S(24, "dup3") +_S(25, "fcntl") _S(26, "inotify_init1") _S(27, "inotify_add_watch") _S(28, "inotify_rm_watch") @@ -62,6 +63,10 @@ _S(39, "umount2") _S(40, "mount") _S(41, "pivot_root") _S(42, "nfsservctl") +_S(43, "statfs") +_S(44, "fstatfs") +_S(45, "truncate") +_S(46, "ftruncate") _S(47, "fallocate") _S(48, "faccessat") _S(49, "chdir") @@ -76,15 +81,17 @@ _S(57, "close") _S(58, "vhangup") _S(59, "pipe2") _S(60, "quotactl") -_S(61, "getdents64") +_S(61, "getdents") +_S(62, "lseek") _S(63, "read") _S(64, "write") _S(65, "readv") _S(66, "writev") -_S(67, "pread64") -_S(68, "pwrite64") +_S(67, "pread") +_S(68, "pwrite") _S(69, "preadv") _S(70, "pwritev") +_S(71, "sendfile") _S(72, "pselect6") _S(73, "ppoll") _S(74, "signalfd4") @@ -92,6 +99,8 @@ _S(75, "vmsplice") _S(76, "splice") _S(77, "tee") _S(78, "readlinkat") +_S(79, "newfstatat") +_S(80, "newfstat") _S(81, "sync") _S(82, "fsync") _S(83, "fdatasync") @@ -233,6 +242,8 @@ _S(218, "request_key") _S(219, "keyctl") _S(220, "clone") _S(221, "execve") +_S(222, "mmap") +_S(223, "fadvise64") _S(224, "swapon") _S(225, "swapoff") _S(226, "mprotect") -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 4/4] audit(userspace): Add compat system call support for AArch64 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro ` (3 preceding siblings ...) 2014-02-03 6:58 ` [PATCH v3 3/4] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro @ 2014-02-03 6:58 ` AKASHI Takahiro 2014-03-20 0:38 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support Steve Grubb 5 siblings, 0 replies; 16+ messages in thread From: AKASHI Takahiro @ 2014-02-03 6:58 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches For 32-bit task auditing (-F arch=b32), internally-used machine type will be overwritten to MACH_ARM in order to use a correct system call lookup table. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- lib/libaudit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libaudit.c b/lib/libaudit.c index 7dacd36..4ee6660 100644 --- a/lib/libaudit.c +++ b/lib/libaudit.c @@ -1306,6 +1306,9 @@ int audit_rule_fieldpair_data(struct audit_rule_data **rulep, const char *pair, else if (bits == ~__AUDIT_ARCH_64BIT && machine == MACH_S390X) machine = MACH_S390; + else if (bits == ~__AUDIT_ARCH_64BIT && + machine == MACH_AARCH64) + machine = MACH_ARM; /* Check for errors - return -6 * We don't allow 32 bit machines to specify -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro ` (4 preceding siblings ...) 2014-02-03 6:58 ` [PATCH v3 4/4] audit(userspace): Add compat system call support " AKASHI Takahiro @ 2014-03-20 0:38 ` Steve Grubb 5 siblings, 0 replies; 16+ messages in thread From: Steve Grubb @ 2014-03-20 0:38 UTC (permalink / raw) To: linux-audit; +Cc: will.deacon, arndb, patches On Monday, February 03, 2014 03:57:56 PM AKASHI Takahiro wrote: > On ARM, endianness doesn't make any differences on auditing. > See the discussion below: > http://permalink.gmane.org/gmane.linux.ports.arm.kernel/165266 > In this version, mistakenly-used "ARMEB" and "armeb" are substituted > with "ARM" and "arm" respectively in Patches [1,2/4]. > > patch [3/4] adds more system call definitions for aarch64 (or arm64 in > kernel) that are missing in the current implementation. > https://www.redhat.com/archives/linux-audit/2013-November/msg00082.html > > Patch [4/4] enables auditing 32-bit tasks (ie. auditctl -F arch=b32) on > aarch64. > > This code replies on my kernel patch for aarch64 support, and > was tested on armv8 fast model with 32-bit/64-bit userland: > 1) basic operations with auditctl/autrace > # auditctl -a exit,always -S openat -F path=/etc/inittab > # auditctl -a exit,always -F dir=/tmp -F perm=rw > # auditctl -a task,always > # autrace /bin/ls > by comparing output from autrace with one from strace > > 2) audit-test-code (+ my workarounds for arm/arm64) > by running "audit-tool", "filter" and "syscalls" test categories. Thanks. This set of patches have been applied in svn. It would be good to double check that arm still works for everyone. It does change --with-armeb to --with-arm. This is something all distributions and testers would need to fix in their build system. Please let me know if there are any other updates needed. -Steve ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2014-03-20 0:38 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-19 7:28 [RFC PATH 0/2] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2013-11-19 7:28 ` [RFC PATCH 1/2] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro 2013-11-19 7:29 ` [RFC PATCH 2/2] audit(userspace): Add arm LE/aarch64 BE support AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 0/3] audit(userspace): Add/Improve arm/aarch64 support AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 1/3] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 2/3] audit(userspace): Add arm LE/aarch64 BE support AKASHI Takahiro 2014-01-17 8:15 ` [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 AKASHI Takahiro 2014-01-17 15:05 ` Will Deacon 2014-01-20 5:05 ` AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support AKASHI Takahiro 2014-02-03 6:57 ` AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 1/4] audit(userspace): Substitute ARMEB with ARM AKASHI Takahiro 2014-02-03 6:57 ` [PATCH v3 2/4] audit(userspace): Substitute armeb with arm AKASHI Takahiro 2014-02-03 6:58 ` [PATCH v3 3/4] audit(userspace): Add missing syscalls for AArch64 AKASHI Takahiro 2014-02-03 6:58 ` [PATCH v3 4/4] audit(userspace): Add compat system call support " AKASHI Takahiro 2014-03-20 0:38 ` [PATCH v3 0/4] audit(userspace): Improve arm/aarch64 support Steve Grubb
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox