From patchwork Thu Aug 21 08:56:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 35732 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ABAFA20540 for ; Thu, 21 Aug 2014 08:59:31 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rl12sf16739300iec.1 for ; Thu, 21 Aug 2014 01:59:31 -0700 (PDT) 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=wdAKzwLSN4wVnkc9IjCRz3wcmZJv5E+cKhHDSuuXyYU=; b=OihWHvrhyghs6wNl50AN4/HsqNKOvseaqEKRcqV+pc3vuVknLmXZK5z7wANrs4hZ7r tpz6BmBoJ/eZHXO+xTvO33AiCTBi9RuDGBuE8CStVTAkAb5yed3UEgLEmPPRiBHGBSoY UnBTKqBvQcWQR7bNqCux+/xC1wac/6lUovgzlfzH/ZSK1gl6HE+PQScS4L0TCFVgvmrp 3r8Bd7e7Ij7GwBiAlYcu65dgKtIicatgt1gU5qhRuHfAWtGNyyafzaCF6au41yTQFRe/ /mCfQ6JWP36B7i3YxGwx8mcFgauWlsbItvNR2CNRDRAAPGwenTd186gmTO9Jv0cca8EP lXbw== X-Gm-Message-State: ALoCoQludvu2NFFiKlyWj6nbMT+yJSgfjoJugYhDngGXxZdOFG85Q0HnV9t/ocqV5MsyBiJDkRji X-Received: by 10.43.74.198 with SMTP id yx6mr1785175icb.32.1408611571087; Thu, 21 Aug 2014 01:59:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.210 with SMTP id g76ls652856qge.74.gmail; Thu, 21 Aug 2014 01:59:30 -0700 (PDT) X-Received: by 10.220.182.73 with SMTP id cb9mr41457624vcb.9.1408611570924; Thu, 21 Aug 2014 01:59:30 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id rw10si12143054vcb.44.2014.08.21.01.59.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Aug 2014 01:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id ij19so10168929vcb.25 for ; Thu, 21 Aug 2014 01:59:30 -0700 (PDT) X-Received: by 10.52.138.210 with SMTP id qs18mr1975128vdb.18.1408611570812; Thu, 21 Aug 2014 01:59:30 -0700 (PDT) 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.221.45.67 with SMTP id uj3csp118569vcb; Thu, 21 Aug 2014 01:59:30 -0700 (PDT) X-Received: by 10.70.38.49 with SMTP id d17mr27276pdk.19.1408611569854; Thu, 21 Aug 2014 01:59:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id iw7si35505107pbd.7.2014.08.21.01.59.28 for ; Thu, 21 Aug 2014 01:59:29 -0700 (PDT) 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 S1754014AbaHUI56 (ORCPT + 26 others); Thu, 21 Aug 2014 04:57:58 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:36164 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955AbaHUI5y (ORCPT ); Thu, 21 Aug 2014 04:57:54 -0400 Received: by mail-pd0-f170.google.com with SMTP id g10so13208175pdj.15 for ; Thu, 21 Aug 2014 01:57:54 -0700 (PDT) X-Received: by 10.69.26.33 with SMTP id iv1mr59541010pbd.62.1408611474181; Thu, 21 Aug 2014 01:57:54 -0700 (PDT) Received: from localhost.localdomain (KD182249099030.au-net.ne.jp. [182.249.99.30]) by mx.google.com with ESMTPSA id q5sm37734708pdf.70.2014.08.21.01.57.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Aug 2014 01:57:52 -0700 (PDT) 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 v6 3/6] asm-generic: add generic seccomp.h for secure computing mode 1 Date: Thu, 21 Aug 2014 17:56:42 +0900 Message-Id: <1408611405-8943-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408611405-8943-1-git-send-email-takahiro.akashi@linaro.org> References: <1408611405-8943-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.220.180 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 Signed-off-by: AKASHI Takahiro Reviewed-by: Kees Cook --- 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 */