]> granicus.if.org Git - strace/commitdiff
Remove AUDIT_ARCH_* fallback definitions from arch_get_personality.c files
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Aug 2019 10:58:30 +0000 (10:58 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Aug 2019 10:58:30 +0000 (10:58 +0000)
Since xlat/audit_arch.h provides definitions for all AUDIT_ARCH_*
constants, remove their fallback definitions from other files.

* get_personality.c [SUPPORTED_PERSONALITIES > 1]: Include
"xlat/elf_em.h" and "xlat/audit_arch.h" under XLAT_MACROS_ONLY.
* linux/aarch64/arch_get_personality.c (AUDIT_ARCH_ARM): Remove.
* linux/powerpc64/arch_get_personality.c (AUDIT_ARCH_PPC): Remove.
* linux/riscv/arch_get_personality.c (AUDIT_ARCH_RISCV32): Remove.
* linux/s390x/arch_get_personality.c (AUDIT_ARCH_S390): Remove.
* linux/sparc64/arch_get_personality.c (AUDIT_ARCH_SPARC): Remove.
* linux/tile/arch_get_personality.c (AUDIT_ARCH_TILEGX32,
AUDIT_ARCH_TILEPRO): Remove.
* linux/x86_64/arch_get_personality.c (AUDIT_ARCH_I386): Remove.

get_personality.c
linux/aarch64/arch_get_personality.c
linux/powerpc64/arch_get_personality.c
linux/riscv/arch_get_personality.c
linux/s390x/arch_get_personality.c
linux/sparc64/arch_get_personality.c
linux/tile/arch_get_personality.c
linux/x86_64/arch_get_personality.c

index 4fa096945113b7329162cda66e61697b029f33df..11f779d0d116c0d095bca81ada1d839ce0402955 100644 (file)
@@ -10,5 +10,9 @@
 #if SUPPORTED_PERSONALITIES > 1
 # include "get_personality.h"
 # include <linux/audit.h>
+# define XLAT_MACROS_ONLY
+#  include "xlat/elf_em.h"
+#  include "xlat/audit_arch.h"
+# undef XLAT_MACROS_ONLY
 # include "arch_get_personality.c"
 #endif
index 534d7f4fec083bfc88fd40993f41fd6ef0f34611..1e7863d4ff36b61a2f333d411818f5c487490cac 100644 (file)
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_ARM
-# define AUDIT_ARCH_ARM 0x40000028
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {
index 9817d44afcf9f84370e671a7fab81b3dae0e9d33..fbec9ff2911c588cc238b8aa9484816ee87fa3c6 100644 (file)
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_PPC
-# define AUDIT_ARCH_PPC 0x14
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {
index 78cf4329de6aab9a7bcce9f8d57938b9cfa49bb8..aba7779ed215762e397eebbd462e46a6c0575486 100644 (file)
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_RISCV32
-# define AUDIT_ARCH_RISCV32 0x400000f3
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {
index 8b12132ec51dc40d795433bcd1dadef9bb654e92..78bef2929fba091d7b468c895e3efd3f7c1f405b 100644 (file)
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_S390
-# define AUDIT_ARCH_S390 0x16
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {
index 36d11915c55ec37dbde6c37ef40c663d28fa127c..243d53e44ca81f2e1e40fe3904584d54543bcec3 100644 (file)
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_SPARC
-# define AUDIT_ARCH_SPARC 0x2
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {
index 0a88242d54381b74493de78cae5b8f32cab17357..ca21c5dee77e193a24043ef235ca74c886c15f5d 100644 (file)
@@ -5,13 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_TILEGX32
-# define AUDIT_ARCH_TILEGX32 0x400000bf
-#endif
-#ifndef AUDIT_ARCH_TILEPRO
-# define AUDIT_ARCH_TILEPRO 0x400000bc
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {
index 1dcc6932d7787d165075a75bb20190d00f5cbec3..2ca15c1d0c7bd78946db465dc8bf2efd2923c4e1 100644 (file)
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier: LGPL-2.1-or-later
  */
 
-#ifndef AUDIT_ARCH_I386
-# define AUDIT_ARCH_I386 0x40000003
-#endif
-
 int
 get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
 {