From patchwork Thu Apr 12 21:47:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Drewry X-Patchwork-Id: 152180 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 B2085B70A5 for ; Fri, 13 Apr 2012 07:48:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762883Ab2DLVsz (ORCPT ); Thu, 12 Apr 2012 17:48:55 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:33941 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934830Ab2DLVsv (ORCPT ); Thu, 12 Apr 2012 17:48:51 -0400 Received: by mail-gx0-f174.google.com with SMTP id e5so1393412ggh.19 for ; Thu, 12 Apr 2012 14:48:51 -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=snoBbMvCtEUdpIg9WC+bAH0+FuNgXH1e4yQgc1LdjyA=; b=K0R5UK0q0WbdYCVpcSw4dtkYHHii4GFrFFmVbuMJB1mLgmFP93dg2kZK8N/u06dKsQ 5dOHiaeQlZiAQ4SCiVwMqc1x4lpmepnTFtI/qT0DYHdneuOzH291LwiZlwPkqnu2ZCee 60u1/E81TeW3sLV8e2hsmF5Ogn0JVzPZvaNW8= 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=snoBbMvCtEUdpIg9WC+bAH0+FuNgXH1e4yQgc1LdjyA=; b=J7i/1zjpggzRjkY/yZL/Bxosxv+W8eFrmwwr8SHLiL4w160Pspzz8QfDeQkzu6ffY8 c5w5B5UzaQ90F1B4NQuCAjNPFtlquSBOtnu4rp6B9Veb7wWelct+w9BqM9DOV8lwYLYY ZGgVOSOXoSKcxmk4q7g+wjWqm8x5ZvwZcZZeOzz5gX1YzAMLwdvK7Lq0LcrgHsw0P19z H+8wPIwvn0lhqnYH8gRetOCV6p+l+Il6NRAlv8dPdQYRAhkSe4Ocwz2JIQGchqJlp8C3 qZv1fvSJ3o2L+GakRBv5EqkWVIF/mqrKBrJH978ohV33dITEL0jnvlQVfDtRxWP+RJ9H 68xw== Received: by 10.101.175.37 with SMTP id c37mr1110291anp.59.1334267329735; Thu, 12 Apr 2012 14:48:49 -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 u20sm27723748yhi.10.2012.04.12.14.48.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Apr 2012 14:48:47 -0700 (PDT) From: Will Drewry To: linux-kernel@vger.kernel.org Cc: linux-man@vger.kernel.org, linux-security-module@vger.kernel.org, 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, jmorris@namei.org, Will Drewry Subject: [PATCH v18 05/15] seccomp: kill the seccomp_t typedef Date: Thu, 12 Apr 2012 16:47:54 -0500 Message-Id: <1334267284-19166-5-git-send-email-wad@chromium.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1334267284-19166-1-git-send-email-wad@chromium.org> References: <1334267284-19166-1-git-send-email-wad@chromium.org> X-Gm-Message-State: ALoCoQk81R2rR4L0FZp+6BsEG+oHW9Z2MgOiHTbt/pOPjFrT+t/CVGxZQFgn0mwDKewMzOJuf//b 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. Signed-off-by: Will Drewry Reviewed-by: James Morris Acked-by: Serge Hallyn Acked-by: Eric Paris v18: rebase ... 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. --- 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 ba60897..cad1502 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1452,7 +1452,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; }