From patchwork Thu Feb 16 20:02:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Drewry X-Patchwork-Id: 141675 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 C08FB1007D3 for ; Fri, 17 Feb 2012 07:05:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755355Ab2BPUDQ (ORCPT ); Thu, 16 Feb 2012 15:03:16 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:60880 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755216Ab2BPUDN (ORCPT ); Thu, 16 Feb 2012 15:03:13 -0500 Received: by ghrr11 with SMTP id r11so1509393ghr.19 for ; Thu, 16 Feb 2012 12:03:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=8trsPMIMlPBnofjI4LRA/UkQxf5S8o9+KRZQBorMU0w=; b=il5/LeC9I4C7NBZUE06Wt7M3F4CWjonM9v9uVl3hFxpx3ur3oiBNcf+zK7QBfIF2bf 2fDa7E0pNkhcSu3drZzjWBvqECnM3sGL35xVvEBIa7BCYTsBDtELUzvV12jzChCAwJPl mzsbZ4SfjMOuNnA5wLX7lRzpFhCrEKvyRBd+E= MIME-Version: 1.0 Received: by 10.236.189.105 with SMTP id b69mr5634849yhn.90.1329422592738; Thu, 16 Feb 2012 12:03:12 -0800 (PST) Received: from localhost.localdomain (173-164-30-65-Nashville.hfc.comcastbusiness.net. [173.164.30.65]) by mx.google.com with ESMTPS id y12sm11332830ang.21.2012.02.16.12.03.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Feb 2012 12:03:11 -0800 (PST) From: Will Drewry To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, kernel-hardening@lists.openwall.org, 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, keescook@chromium.org, Will Drewry Subject: [PATCH v8 2/8] seccomp: kill the seccomp_t typedef Date: Thu, 16 Feb 2012 14:02:23 -0600 Message-Id: <1329422549-16407-2-git-send-email-wad@chromium.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1329422549-16407-1-git-send-email-wad@chromium.org> References: <1329422549-16407-1-git-send-email-wad@chromium.org> X-Gm-Message-State: ALoCoQkEPl4PJ+TYJ819ZVf5J8VABfzksfieeabk4iC5oy8UMQ2B9XPSGxh2qoOD9oWNXLtmU3xh 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. v7: struct seccomp_struct -> struct seccomp v6: original inclusion in this series. Signed-off-by: Will Drewry Reviewed-by: James Morris --- 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 7d379a6..c30526f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1418,7 +1418,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; }