From patchwork Wed Nov 26 04:49:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 41516 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89F3C25E18 for ; Wed, 26 Nov 2014 04:50:52 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id b13sf1289985wgh.5 for ; Tue, 25 Nov 2014 20:50:51 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=tI9UjmG0ceaF7wtzgDWWSnh7VEzVW0zhsViIbC9rYno=; b=DrYCScmumLkOqoLzX2qApQkBdaXXxLJk39mX7BkQyyzVepzoVzQIXG2zc4jYF2wYOa CcXNgMVwNJegam3TC50WtXlxluQb2gSclWBg93qlw0kDyf5nRZQ1yeEPWMtOLwi6ez5R htGTpp5LDe4JOTetySh5MvgCUiS1r1Aj1AspqgeSG0PZa6Oejd4ARboGJ3h+N7NOCdFP GXE9G6LoMmUNqCbftaTv9ZZlOHw5mbZCk4QtySgOPtjh6T19Ki4e9ZZt2XVerkaniDFj ebWycxXTanJ6YCgBr0fop2wuL/KSWLZk026FoxWsVNAkR7BlwBwk39UvA0TP8Dsa5qYL wRYA== X-Gm-Message-State: ALoCoQnvYV1LeYyBzhk3UbksZxUZYShE6V2Km4wMwKBa5MJIiDi44ApQWsPfqcBe1a+8eK7P/4eS X-Received: by 10.152.10.233 with SMTP id l9mr8615683lab.0.1416977451793; Tue, 25 Nov 2014 20:50:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.135 with SMTP id k7ls593287lah.78.gmail; Tue, 25 Nov 2014 20:50:51 -0800 (PST) X-Received: by 10.152.21.9 with SMTP id r9mr32249249lae.76.1416977451043; Tue, 25 Nov 2014 20:50:51 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id jw6si3171904lbc.101.2014.11.25.20.50.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 20:50:50 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gf13so1839271lab.13 for ; Tue, 25 Nov 2014 20:50:50 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr31844902lbc.34.1416977450922; Tue, 25 Nov 2014 20:50:50 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp567458lbc; Tue, 25 Nov 2014 20:50:50 -0800 (PST) X-Received: by 10.66.216.198 with SMTP id os6mr49775485pac.112.1416977449314; Tue, 25 Nov 2014 20:50:49 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yi1si4950875pbc.162.2014.11.25.20.50.48 for ; Tue, 25 Nov 2014 20:50:49 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752435AbaKZEuq (ORCPT + 26 others); Tue, 25 Nov 2014 23:50:46 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:44573 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403AbaKZEun (ORCPT ); Tue, 25 Nov 2014 23:50:43 -0500 Received: by mail-pa0-f47.google.com with SMTP id kq14so2061462pab.6 for ; Tue, 25 Nov 2014 20:50:43 -0800 (PST) X-Received: by 10.70.64.134 with SMTP id o6mr48934922pds.153.1416977443010; Tue, 25 Nov 2014 20:50:43 -0800 (PST) Received: from localhost.localdomain (KD182249086035.au-net.ne.jp. [182.249.86.35]) by mx.google.com with ESMTPSA id yp8sm2962059pab.48.2014.11.25.20.50.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Nov 2014 20:50:41 -0800 (PST) From: AKASHI Takahiro To: keescook@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com Cc: dsaxena@linaro.org, arndb@arndb.de, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v9 3/6] asm-generic: add generic seccomp.h for secure computing mode 1 Date: Wed, 26 Nov 2014 13:49:48 +0900 Message-Id: <1416977391-24231-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416977391-24231-1-git-send-email-takahiro.akashi@linaro.org> References: <1416977391-24231-1-git-send-email-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: takahiro.akashi@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Reviewed-by: Kees Cook Signed-off-by: AKASHI Takahiro --- include/asm-generic/seccomp.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..9fa1f65 --- /dev/null +++ b/include/asm-generic/seccomp.h @@ -0,0 +1,30 @@ +/* + * 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 +#ifndef __NR_seccomp_sigreturn +#define __NR_seccomp_sigreturn __NR_rt_sigreturn +#endif + +#endif /* _ASM_GENERIC_SECCOMP_H */