From patchwork Fri Jan 17 08:13:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3502601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 210D59F2E9 for ; Fri, 17 Jan 2014 08:17:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57CD020172 for ; Fri, 17 Jan 2014 08:17:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 149E620148 for ; Fri, 17 Jan 2014 08:17:25 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44ad-0000hB-IA; Fri, 17 Jan 2014 08:15:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44a8-00026b-5i; Fri, 17 Jan 2014 08:15:12 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W44Zf-0001zM-FA for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 08:14:45 +0000 Received: by mail-pa0-f47.google.com with SMTP id kp14so3819381pab.20 for ; Fri, 17 Jan 2014 00:14:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xcKWKDdceIRN8mXHp2Y+GWsUsvNRCw1U92LxC3DRrBc=; b=f/rz2oUExlPf7vwczyOJ7L7afIic4eqSXd97/3vmc8LZ7HyaJZY+nDw2SjJc4yOP/y XDSS5b9pwa/Ab1gEv7ntlFhvUa6CQw+YrwuvKF9QpQyoalt+ETGiMHnnuZzRnbCXcxqB YbWJg47kUE/mHbtyACiMqTYnJHLJ2q9DYwZnm8H44AMBbZVZPGg7+s2aRDHl+x2LjZiR OYv4XAkYltlNSWV1lDjgYW8zz89KHGxoKQeeFyx2KmQQqqOfmeDFQXfRMnxcotbzkd6n vY/w51CQr+X92gHkMijum2PYUZAtLR+MO2dV0ADmtBBW1dOsZDFnKDC9rALTq6Aa8QRw t8Zw== X-Gm-Message-State: ALoCoQlnX9lYavFDleJB0/T8w5hf538nlBYUbTUgNYMxTPMThTvF0O8kcLE8Wzpy3txudgy0LHUJ X-Received: by 10.66.189.193 with SMTP id gk1mr543928pac.105.1389946461895; Fri, 17 Jan 2014 00:14:21 -0800 (PST) Received: from localhost.localdomain (KD182250177246.au-net.ne.jp. [182.250.177.246]) by mx.google.com with ESMTPSA id jn12sm20572056pbd.37.2014.01.17.00.14.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:14:20 -0800 (PST) From: AKASHI Takahiro To: viro@zeniv.linux.org.uk, eparis@redhat.com, rgb@redhat.com, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH v2 5/6] arm64: audit: Add makefile rule to create unistd_32.h for compat syscalls Date: Fri, 17 Jan 2014 17:13:18 +0900 Message-Id: <1389946399-4525-6-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1389946399-4525-1-git-send-email-takahiro.akashi@linaro.org> References: <1383733546-2846-1-git-send-email-takahiro.akashi@linaro.org> <1389946399-4525-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140117_031443_665885_5634D330 X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, arndb@arndb.de, linux-kernel@vger.kernel.org, AKASHI Takahiro , linux-audit@redhat.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP generic compat sycall audit (lib/compat_audit.c) requires unistd_32.h for __NR_xyx compat syscall numbers. This is a different file from unistd32.h on arm64 and so it must be generated from unistd32.h. Signed-off-by: AKASHI Takahiro --- arch/arm64/Makefile | 4 ++++ arch/arm64/kernel/syscalls/Makefile | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 arch/arm64/kernel/syscalls/Makefile diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 2fceb71..6d24f92 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -72,6 +72,10 @@ PHONY += vdso_install vdso_install: $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@ +# Compat syscall header generation +archheaders: + $(Q)$(MAKE) $(build)=arch/arm64/kernel/syscalls $@ + # We use MRPROPER_FILES and CLEAN_FILES now archclean: $(Q)$(MAKE) $(clean)=$(boot) diff --git a/arch/arm64/kernel/syscalls/Makefile b/arch/arm64/kernel/syscalls/Makefile new file mode 100644 index 0000000..7661113 --- /dev/null +++ b/arch/arm64/kernel/syscalls/Makefile @@ -0,0 +1,20 @@ +out := $(obj)/../../include/generated/asm + +# Create output directory if not already present +_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)') + +syshdr-$(CONFIG_COMPAT) += unistd_32.h + +targets += $(syshdr-y) + +quiet_cmd_syshdr = SYSHDR $@ + cmd_syshdr = cat $< | sed -r \ + -e 's/compat_//' \ + -e 's/_wrapper//' \ + -e 's/^__SYSCALL\((.*),[ ]*sys_([^)].*)\).*/\#define __NR_\2 \1/p;d' \ + | grep -v __NR_ni_syscall > $@ + +archheaders: $(addprefix $(out)/,$(syshdr-y)) + +$(out)/unistd_32.h: $(src)/../../include/asm/unistd32.h + $(call if_changed,syshdr)