From patchwork Mon Feb 3 06:57:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 24028 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5107020675 for ; Mon, 3 Feb 2014 06:58:35 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf17507418pbc.4 for ; Sun, 02 Feb 2014 22:58:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=To2jtu/SWwCMKf9csvJGVwWR/nT+KvWIg84bVF4foUQ=; b=OlJZgZ/xvQNQZbe1OWs53WFOdR3T+LDVcd8jyFDxwLF7FaU6bbmpeMRmm0W0/R/1gE 0BUZyDEK8L0x1OoI3+tFgK/mnOv4A+ByaCoEshdWdaiZT2DrPSiOQkdiJ6mev1o3U340 Cu3ZfWXa0BCsvkkYdwQb1ewtoOJGwyecsNtFZyF4AVh0M3rZy6cjejLcLGF+OlqJls/E 66fbb6LaiGXWm88IyNXVIFFqLrkam6gxPpk4o5N5dtA+gaRW1u+9S/kBpya1PM3i7os5 N6B8xM2L0MihrJ+H4OE6snt2q9rUKvYU1VpdgkAnll+/doXEI5VnkiHFL0kPP5w9PRSK ZHtQ== X-Gm-Message-State: ALoCoQnqu/EnX/cC2IvyUSPKweV1FYzle1XGIp6QdFF54y7u5D8KS6ekS73X2crWlweTjvV40jv2 X-Received: by 10.66.163.67 with SMTP id yg3mr1562061pab.45.1391410714569; Sun, 02 Feb 2014 22:58:34 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.110 with SMTP id y101ls1811882qgd.0.gmail; Sun, 02 Feb 2014 22:58:34 -0800 (PST) X-Received: by 10.220.159.4 with SMTP id h4mr27641456vcx.1.1391410714447; Sun, 02 Feb 2014 22:58:34 -0800 (PST) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id n15si6585405vcy.27.2014.02.02.22.58.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 22:58:34 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g10so4526221vbg.0 for ; Sun, 02 Feb 2014 22:58:34 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr3596030vcn.21.1391410714245; Sun, 02 Feb 2014 22:58:34 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp136275vcz; Sun, 2 Feb 2014 22:58:33 -0800 (PST) X-Received: by 10.68.106.130 with SMTP id gu2mr35317425pbb.59.1391410713164; Sun, 02 Feb 2014 22:58:33 -0800 (PST) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id bf5si19347567pad.320.2014.02.02.22.58.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 22:58:33 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of takahiro.akashi@linaro.org) client-ip=209.85.220.48; Received: by mail-pa0-f48.google.com with SMTP id kx10so6712035pab.7 for ; Sun, 02 Feb 2014 22:58:32 -0800 (PST) X-Received: by 10.66.148.230 with SMTP id tv6mr1332096pab.155.1391410712747; Sun, 02 Feb 2014 22:58:32 -0800 (PST) Received: from localhost.localdomain (KD182249091062.au-net.ne.jp. [182.249.91.62]) by mx.google.com with ESMTPSA id qw8sm52680920pbb.27.2014.02.02.22.58.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 02 Feb 2014 22:58:31 -0800 (PST) From: AKASHI Takahiro To: linux-audit@redhat.com Cc: will.deacon@arm.com, arndb@arndb.de, patches@linaro.org, AKASHI Takahiro Subject: [PATCH v3 1/4] audit(userspace): Substitute ARMEB with ARM Date: Mon, 3 Feb 2014 15:57:58 +0900 Message-Id: <1391410681-4924-3-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1391410681-4924-1-git-send-email-takahiro.akashi@linaro.org> References: <1389946529-4590-1-git-send-email-takahiro.akashi@linaro.org> <1391410681-4924-1-git-send-email-takahiro.akashi@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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);