From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Subject: lib/audit.c (kernel) Date: Thu, 14 Nov 2013 14:45:51 +0900 Message-ID: <5284638F.20203@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.19]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rAE5l1Bl004815 for ; Thu, 14 Nov 2013 00:47:01 -0500 Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAE5l0Gb021364 for ; Thu, 14 Nov 2013 00:47:00 -0500 Received: by mail-pd0-f181.google.com with SMTP id p10so1502012pdj.12 for ; Wed, 13 Nov 2013 21:47:00 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: "linux-audit@redhat.com" Cc: Will Deacon List-Id: linux-audit@redhat.com Hi I'm working on audit/seccomp support for AArch64 as you see in [0/4] arm64: Add audit support https://www.redhat.com/archives/linux-audit/2013-November/msg00040.html ARM sub-system maintainer asked me whether it would be possible to re-work lib/audit.c to work with "compat" syscalls. My question is, "Is this reasonable to think about?" (I know all the existing architectures already have their own implementations.) I'd like to get any comments before going further. One of possible solutions is * Add lib/compat_audit.c, where #include "asm/unistd32.h" <= it seems somewhat arch-specific. static unsigned dir_class[] = { ... int audit_classify_compat_syscall() { ... static int __init audit_compat_classes_init() { ... __initcall(audit_compat_classes_init); * In lib/audit.c, #include #include ... int audit_classify_arch(arch) { #ifdef CONFIG_COMPAT if (audit_is_compat(arch)) return 1; #endif return 0; } int audit_classify_syscall(abi, syscall) { #ifdef CONFIG_COMPAT if (audit_is_compat(arch)) return audit_classify_compat_syscall(abi, syscall); #endif ... } * In arch/*/include/asm/audit.h, #inlcude ... #define audit_is_compat(arch) \ ((arch == AUDIT_ARCH_x) || (arch == AUDIT_ARCH_y)) -Takahiro AKASHI