From patchwork Sat Mar 15 05:50:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 3836501 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 20B95BF540 for ; Sat, 15 Mar 2014 05:51:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3E57D2034E for ; Sat, 15 Mar 2014 05:51:50 +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 3C78420340 for ; Sat, 15 Mar 2014 05:51:49 +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 1WOhV8-0005mN-B8; Sat, 15 Mar 2014 05:51:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhUx-0008WA-HA; Sat, 15 Mar 2014 05:51:07 +0000 Received: from mail-pb0-f47.google.com ([209.85.160.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WOhUk-0008Su-U1 for linux-arm-kernel@lists.infradead.org; Sat, 15 Mar 2014 05:50:57 +0000 Received: by mail-pb0-f47.google.com with SMTP id up15so3496929pbc.34 for ; Fri, 14 Mar 2014 22:50:33 -0700 (PDT) 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=J5u/2SK93eHwTZVdyPUyV2XV7XnJ+vIIbmUeb9q9hjU=; b=VqJGO7nZ4uE4nlWdHsHOKPffbDy2a/WsGu5ESjH5Mh9OcpdFxlYCv/fzbTFqlx2mRZ w85U+Xa1Rzd7h/38bf3QgE1gc9tG31Sf5NPG7xI/fRdc0wLT04LWd6GLm8XJXjjQOLLh zr+7Ht5VTCQvDBSDhQuPCIgHi0QlrfnegnaZ5DYftxkutzsql6hPTGD5yHja8eWyLoo0 rqdXXD1TWtioVOtBbs/gKeefvkYUtsLd5+NF6oNiCjnU2yoMefdnVEBNGDQ+P0uo50NQ ABb8cgQHqpxiNtbphWPBbDIZANPl4vSU8blUrLB5qyH9x14LWWDPhyvMc7uhtUKbawWy AP2A== X-Gm-Message-State: ALoCoQksFktpBjgG2R9rBJLJirEdOIi6xFpuzumAMndkFqOpeLPtB5EFqxk6HaDqSErU7GmPIEF2 X-Received: by 10.69.25.69 with SMTP id io5mr13495023pbd.22.1394862633467; Fri, 14 Mar 2014 22:50:33 -0700 (PDT) Received: from localhost.localdomain (pdddd29.tkyoac00.ap.so-net.ne.jp. [218.221.221.41]) by mx.google.com with ESMTPSA id ha11sm22375393pbd.17.2014.03.14.22.50.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 22:50:32 -0700 (PDT) From: AKASHI Takahiro To: wad@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com, arndb@arndb.de Subject: [PATCH_v4 1/2] asm-generic: Add generic seccomp.h for secure computing mode 1 Date: Sat, 15 Mar 2014 14:50:03 +0900 Message-Id: <1394862604-29105-2-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394862604-29105-1-git-send-email-takahiro.akashi@linaro.org> References: <1394705823-12465-1-git-send-email-takahiro.akashi@linaro.org> <1394862604-29105-1-git-send-email-takahiro.akashi@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140315_015055_111076_96221253 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, AKASHI Takahiro , dsaxena@linaro.org, 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 Those values (__NR_seccomp_*) are used solely in secure_computing() to identify mode 1 system calls. If compat system calls have different syscall numbers, asm/seccomp.h may override them. Acked-by: Arnd Bergmann Signed-off-by: AKASHI Takahiro --- include/asm-generic/seccomp.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/asm-generic/seccomp.h diff --git a/include/asm-generic/seccomp.h b/include/asm-generic/seccomp.h new file mode 100644 index 0000000..5e97022 --- /dev/null +++ b/include/asm-generic/seccomp.h @@ -0,0 +1,28 @@ +/* + * include/asm-generic/seccomp.h + * + * Copyright (C) 2014 Linaro Limited + * Author: AKASHI Takahiro + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef _ASM_GENERIC_SECCOMP_H +#define _ASM_GENERIC_SECCOMP_H + +#include + +#if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32) +#define __NR_seccomp_read_32 __NR_read +#define __NR_seccomp_write_32 __NR_write +#define __NR_seccomp_exit_32 __NR_exit +#define __NR_seccomp_sigreturn_32 __NR_rt_sigreturn +#endif /* CONFIG_COMPAT && ! already defined */ + +#define __NR_seccomp_read __NR_read +#define __NR_seccomp_write __NR_write +#define __NR_seccomp_exit __NR_exit +#define __NR_seccomp_sigreturn __NR_rt_sigreturn + +#endif /* _ASM_GENERIC_SECCOMP_H */