From patchwork Fri Nov 28 05:26:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 41661 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0129C244C2 for ; Fri, 28 Nov 2014 05:27:44 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf3668237wgg.7 for ; Thu, 27 Nov 2014 21:27:43 -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=V+/ZG30xF6qfj6QO47F2lZDytREnVss8J0qU1WbQEoW0yTUco9y88eA0/dNgXqW1TW ztpiVmLbWcaTwqbs8ppUT56kuMkzxCBriA9Q1C5IaAKj/V+O2hRI9LJI3TJwqRof/Mm+ x0v43lUTOPRPaKNBaK1VD9r0Tw+jJDyjiHdakNM0QKHqzLjID2d8tBp8I37dNb7uzCTi Ophb8GhKnRFAXJNyqF6P3/A9wn1JTod1y5BqbumLm3AFbsNqDrDrtME6EmqvLtMrbBu0 oosH7eUj7VStvb/VMXEByvraZ+jrJdJHsSylWEtFPbzlR+jN2BEXxmzSStJZhejFFkOc 8LSw== X-Gm-Message-State: ALoCoQlK6z2flPZByHS7gZC/QhOiMZd/2EDrEAK0a/+kVyZ9LuLiOp88MztMc4CETNLBalaPkoID X-Received: by 10.180.82.34 with SMTP id f2mr9474077wiy.1.1417152463313; Thu, 27 Nov 2014 21:27:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.104 with SMTP id kx8ls651451lac.82.gmail; Thu, 27 Nov 2014 21:27:43 -0800 (PST) X-Received: by 10.152.27.227 with SMTP id w3mr14099802lag.24.1417152463122; Thu, 27 Nov 2014 21:27:43 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id 6si8939175laj.58.2014.11.27.21.27.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Nov 2014 21:27:43 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id ms9so5095206lab.38 for ; Thu, 27 Nov 2014 21:27:43 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr18612467lal.29.1417152462995; Thu, 27 Nov 2014 21:27:42 -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 ew9csp35180lbc; Thu, 27 Nov 2014 21:27:42 -0800 (PST) X-Received: by 10.70.41.137 with SMTP id f9mr17117025pdl.83.1417152461375; Thu, 27 Nov 2014 21:27:41 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id om9si14338216pbc.221.2014.11.27.21.27.40 for ; Thu, 27 Nov 2014 21:27:41 -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 S1751388AbaK1F1d (ORCPT + 26 others); Fri, 28 Nov 2014 00:27:33 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35813 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbaK1F1a (ORCPT ); Fri, 28 Nov 2014 00:27:30 -0500 Received: by mail-pa0-f42.google.com with SMTP id et14so6128721pad.15 for ; Thu, 27 Nov 2014 21:27:30 -0800 (PST) X-Received: by 10.66.235.37 with SMTP id uj5mr12637384pac.72.1417152450432; Thu, 27 Nov 2014 21:27:30 -0800 (PST) Received: from localhost.localdomain (KD182249096114.au-net.ne.jp. [182.249.96.114]) by mx.google.com with ESMTPSA id kp2sm8661866pdb.30.2014.11.27.21.27.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Nov 2014 21:27:29 -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 v10 3/6] asm-generic: add generic seccomp.h for secure computing mode 1 Date: Fri, 28 Nov 2014 14:26:36 +0900 Message-Id: <1417152399-32717-4-git-send-email-takahiro.akashi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417152399-32717-1-git-send-email-takahiro.akashi@linaro.org> References: <1417152399-32717-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.51 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 */