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: 23293 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 471B3202FA for ; Fri, 17 Jan 2014 08:14:24 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 200sf525932ykr.3 for ; Fri, 17 Jan 2014 00:14:23 -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=xcKWKDdceIRN8mXHp2Y+GWsUsvNRCw1U92LxC3DRrBc=; b=aJxWKdEYcGNb2vMj2IJJFmNn9SYCAI0doMKQCJm3UBv3dH5BQyTaUnZRpnKcYKbhFT X/oOjmyDl7zItfBo9ZG6GjHwulnegTQT/s67b0IxAXtmSspMPIqJGsYjJ2657uAR2hiA vqSFGG45WzHZf9jG+eTZa4Dc4r6Fc/XCIgNuofJ1uZq2QAskorFILE8jlwejgSelPq2C Y9nJskUaS5wGNRIJ3rA7MBi8LVqzsGSAzKeFqWllIIpwZUJ8kWgYSEaNiWJy6alLGuKA 0HE14loXzfpO/7NrtFdbU3fflm2icOc6KjKjg8EhCLPoozirkic3+dTTW6PgpDyaC6ht /Plg== X-Gm-Message-State: ALoCoQmeEAUwxls/OvED+V4QgB0ngu5DCXiRI1aQ1gLRyM2rtQRNzQkpsF8Ghqe8wrQ9m7XFhd51 X-Received: by 10.58.189.73 with SMTP id gg9mr144187vec.34.1389946463481; Fri, 17 Jan 2014 00:14:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.119 with SMTP id 110ls420885qgw.28.gmail; Fri, 17 Jan 2014 00:14:23 -0800 (PST) X-Received: by 10.52.107.35 with SMTP id gz3mr217141vdb.8.1389946463382; Fri, 17 Jan 2014 00:14:23 -0800 (PST) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id uq6si4552140vcb.75.2014.01.17.00.14.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:14:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.50 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.50; Received: by mail-vb0-f50.google.com with SMTP id w8so1388429vbj.23 for ; Fri, 17 Jan 2014 00:14:23 -0800 (PST) X-Received: by 10.52.164.203 with SMTP id ys11mr178100vdb.37.1389946463280; Fri, 17 Jan 2014 00:14:23 -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 ey3csp2353ved; Fri, 17 Jan 2014 00:14:22 -0800 (PST) X-Received: by 10.68.225.9 with SMTP id rg9mr673428pbc.122.1389946462325; Fri, 17 Jan 2014 00:14:22 -0800 (PST) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by mx.google.com with ESMTPS id nu5si9428011pbc.358.2014.01.17.00.14.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 00:14:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.52 is neither permitted nor denied by best guess record for domain of takahiro.akashi@linaro.org) client-ip=209.85.160.52; Received: by mail-pb0-f52.google.com with SMTP id jt11so1731772pbb.25 for ; Fri, 17 Jan 2014 00:14:21 -0800 (PST) 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 Cc: arndb@arndb.de, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com, patches@linaro.org, AKASHI Takahiro 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-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.50 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: , 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)