From patchwork Fri Jan 17 08:15:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 23297 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 41B97202FA for ; Fri, 17 Jan 2014 08:16:04 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id e16sf5723582qcx.8 for ; Fri, 17 Jan 2014 00:16:03 -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=ghGugmynV2/IbXXunE4+y+y1o21BRvP6nmDptzRGDac=; b=Z3csDLBfZawzMYegjsy4DWF+ie7J8OItR+ZKd48YAIwc3L53n4XJM/elZEVimIg8G2 Ob1DER4d1s4oMoRE3qXjp+DBeonkpEuDYQkNUVP/hWSeoTFniQLxKzmwCun0wvGxWnCM Kw15litp+TGPO1JO5UCpgc2HP/panqN1qnDnGr++OcJhOq7mm++HytgDh80DtgMObE7V FVz5qm9qIsW8dh+olYZXe+/pnuRPEHHz3mLKUY7iObaT7+9DS1N6uFFxtMS3zrTlpSRT j+9XFRs5gvwOjtW/h2IMJRy9ZfrJ9HqAq61d9NjfddOcpz7sl8RGcIAWDLnvR3HvkgQy ZPKw== X-Gm-Message-State: ALoCoQk7xR42zA/9RjrIMlmD1Th/Gnc8UzLT2QjmQRqmB3HW8sG17Anz/EWb3Gi6/zdM+Qna4JKW X-Received: by 10.52.229.41 with SMTP id sn9mr196468vdc.6.1389946563481; Fri, 17 Jan 2014 00:16:03 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.127.11 with SMTP id nc11ls1111920qeb.31.gmail; Fri, 17 Jan 2014 00:16:03 -0800 (PST) X-Received: by 10.58.180.227 with SMTP id dr3mr249850vec.36.1389946563366; Fri, 17 Jan 2014 00:16:03 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id z15si4554916vce.72.2014.01.17.00.16.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:16:03 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id c14so1458064vea.16 for ; Fri, 17 Jan 2014 00:16:03 -0800 (PST) X-Received: by 10.220.92.135 with SMTP id r7mr221179vcm.11.1389946563298; Fri, 17 Jan 2014 00:16:03 -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.59.13.131 with SMTP id ey3csp2446ved; Fri, 17 Jan 2014 00:16:02 -0800 (PST) X-Received: by 10.66.189.193 with SMTP id gk1mr551051pac.105.1389946562507; Fri, 17 Jan 2014 00:16:02 -0800 (PST) Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by mx.google.com with ESMTPS id s7si9470364pae.127.2014.01.17.00.16.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:16:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.176 is neither permitted nor denied by best guess record for domain of takahiro.akashi@linaro.org) client-ip=209.85.192.176; Received: by mail-pd0-f176.google.com with SMTP id r10so3707148pdi.7 for ; Fri, 17 Jan 2014 00:16:02 -0800 (PST) X-Received: by 10.66.226.46 with SMTP id rp14mr514918pac.133.1389946562125; Fri, 17 Jan 2014 00:16:02 -0800 (PST) Received: from localhost.localdomain (KD182250177246.au-net.ne.jp. [182.250.177.246]) by mx.google.com with ESMTPSA id ki1sm20698957pbd.1.2014.01.17.00.15.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:16:01 -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 v2 3/3] audit(userspace): Add compat system call support for AArch64 Date: Fri, 17 Jan 2014 17:15:29 +0900 Message-Id: <1389946529-4590-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389946529-4590-1-git-send-email-takahiro.akashi@linaro.org> References: <1384846140-5716-1-git-send-email-takahiro.akashi@linaro.org> <1389946529-4590-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.128.171 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: , 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; /* Check for errors - return -6 * We don't allow 32 bit machines to specify