From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH v2 3/3] audit(userspace): Add compat system call support for AArch64 Date: Fri, 17 Jan 2014 15:05:22 +0000 Message-ID: <20140117150522.GJ16003@mudshark.cambridge.arm.com> References: <1384846140-5716-1-git-send-email-takahiro.akashi@linaro.org> <1389946529-4590-1-git-send-email-takahiro.akashi@linaro.org> <1389946529-4590-4-git-send-email-takahiro.akashi@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0HF5XGT016831 for ; Fri, 17 Jan 2014 10:05:33 -0500 Received: from cam-admin0.cambridge.arm.com (cam-admin0.cambridge.arm.com [217.140.96.50]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0HF5Uqm022298 for ; Fri, 17 Jan 2014 10:05:31 -0500 Content-Disposition: inline In-Reply-To: <1389946529-4590-4-git-send-email-takahiro.akashi@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: AKASHI Takahiro Cc: "linux-audit@redhat.com" , "arndb@arndb.de" , "patches@linaro.org" List-Id: linux-audit@redhat.com 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 > --- > 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