From patchwork Thu Mar 15 03:11:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Drewry X-Patchwork-Id: 146835 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 003BEB6F9D for ; Thu, 15 Mar 2012 14:18:42 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760071Ab2CODN6 (ORCPT ); Wed, 14 Mar 2012 23:13:58 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:37718 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758698Ab2CODNY (ORCPT ); Wed, 14 Mar 2012 23:13:24 -0400 Received: by yenl12 with SMTP id l12so2585785yen.19 for ; Wed, 14 Mar 2012 20:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=2SmipDeJmROTBFr0sG/1fQerAhrZIZ5X82kulcrDCxo=; b=Q98BUmzUq7EJhyEzP/05DrU6Lpp8cqgaHeTVgNIspNbbUrNpR+yfHbs4y15c9pKYlH NnkR3i8dzIaromX23NZk3sNcZfKFnd9qdNGtivzYVrYZGqx44avrPkVHdRdKE2nYb9iK qoxTQP7SE0WylxWZ6p7+sOC/R7SIU69EDCxdE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=2SmipDeJmROTBFr0sG/1fQerAhrZIZ5X82kulcrDCxo=; b=MNEr1HEyr287m47Bvn3y1P+seAaQDEMzg3f89lV0Gy0gstCqdd9PBar40XjGTXmiqS uSEH7M+klcFcOMMVeRKrG+5udhyi5D+yv8/hqh20Eg6/Odsjw067LmNqZTfAWew1u6pX IGQ/yyoXtGEVGCiuTjFAl6OQyI5a9gBfYawxZXoLaWse7wipev3OGrL9TA+/HEBaQYV+ M0G93p2SKW9DKrRNLMo+ltyYwDk8TMurMN615vTDUxP9dV8QiGqbq97rOs2OptYbrYnA Spx8iGnQR0cwcjxlJU1ue4Qg1+fNEzcnlH4JneQMziBnqXhyv1epi3mlMnBoST2hhQM6 J0EA== Received: by 10.236.155.101 with SMTP id i65mr6178000yhk.52.1331781203773; Wed, 14 Mar 2012 20:13:23 -0700 (PDT) Received: from localhost.localdomain (173-164-30-65-Nashville.hfc.comcastbusiness.net. [173.164.30.65]) by mx.google.com with ESMTPS id n35sm1522518yhh.19.2012.03.14.20.13.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Mar 2012 20:13:22 -0700 (PDT) From: Will Drewry To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, kernel-hardening@lists.openwall.com, netdev@vger.kernel.org, x86@kernel.org, arnd@arndb.de, davem@davemloft.net, hpa@zytor.com, mingo@redhat.com, oleg@redhat.com, peterz@infradead.org, rdunlap@xenotime.net, mcgrathr@chromium.org, tglx@linutronix.de, luto@mit.edu, eparis@redhat.com, serge.hallyn@canonical.com, djm@mindrot.org, scarybeasts@gmail.com, indan@nul.nu, pmoore@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, eric.dumazet@gmail.com, markus@chromium.org, coreyb@linux.vnet.ibm.com, keescook@chromium.org, Will Drewry Subject: [PATCH v15 03/13] seccomp: kill the seccomp_t typedef Date: Wed, 14 Mar 2012 22:11:55 -0500 Message-Id: <1331781125-15658-4-git-send-email-wad@chromium.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1331781125-15658-1-git-send-email-wad@chromium.org> References: <1331781125-15658-1-git-send-email-wad@chromium.org> X-Gm-Message-State: ALoCoQne8H6Y5cbUJnlfCzqQJHYZkoqZUM3LpTeekFG+7Z0WijGcCdgeq8y8FWBKreHTD/orfFF7 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replaces the seccomp_t typedef with struct seccomp to match modern kernel style. v14: rebase/nochanges v13: rebase on to 88ebdda6159ffc15699f204c33feb3e431bf9bdc v12: rebase on to linux-next v8-v11: no changes v7: struct seccomp_struct -> struct seccomp v6: original inclusion in this series. Acked-by: Serge Hallyn Reviewed-by: James Morris Signed-off-by: Will Drewry --- include/linux/sched.h | 2 +- include/linux/seccomp.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 3bcde52..6311128 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1420,7 +1420,7 @@ struct task_struct { uid_t loginuid; unsigned int sessionid; #endif - seccomp_t seccomp; + struct seccomp seccomp; /* Thread group tracking */ u32 parent_exec_id; diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index cc7a4e9..d61f27f 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -7,7 +7,9 @@ #include #include -typedef struct { int mode; } seccomp_t; +struct seccomp { + int mode; +}; extern void __secure_computing(int); static inline void secure_computing(int this_syscall) @@ -19,7 +21,7 @@ static inline void secure_computing(int this_syscall) extern long prctl_get_seccomp(void); extern long prctl_set_seccomp(unsigned long); -static inline int seccomp_mode(seccomp_t *s) +static inline int seccomp_mode(struct seccomp *s) { return s->mode; } @@ -28,7 +30,7 @@ static inline int seccomp_mode(seccomp_t *s) #include -typedef struct { } seccomp_t; +struct seccomp { }; #define secure_computing(x) do { } while (0) @@ -42,7 +44,7 @@ static inline long prctl_set_seccomp(unsigned long arg2) return -EINVAL; } -static inline int seccomp_mode(seccomp_t *s) +static inline int seccomp_mode(struct seccomp *s) { return 0; }