Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

seccomp: kill the seccomp_t typedef

Replaces the seccomp_t typedef with struct seccomp to match modern
kernel style.

Signed-off-by: Will Drewry <wad@chromium.org>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Acked-by: Eric Paris <eparis@redhat.com>

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.
Signed-off-by: James Morris <james.l.morris@oracle.com>

authored by

Will Drewry and committed by
James Morris
932ecebb 0c5fe1b4

+7 -5
+1 -1
include/linux/sched.h
··· 1452 1452 uid_t loginuid; 1453 1453 unsigned int sessionid; 1454 1454 #endif 1455 - seccomp_t seccomp; 1455 + struct seccomp seccomp; 1456 1456 1457 1457 /* Thread group tracking */ 1458 1458 u32 parent_exec_id;
+6 -4
include/linux/seccomp.h
··· 7 7 #include <linux/thread_info.h> 8 8 #include <asm/seccomp.h> 9 9 10 - typedef struct { int mode; } seccomp_t; 10 + struct seccomp { 11 + int mode; 12 + }; 11 13 12 14 extern void __secure_computing(int); 13 15 static inline void secure_computing(int this_syscall) ··· 21 19 extern long prctl_get_seccomp(void); 22 20 extern long prctl_set_seccomp(unsigned long); 23 21 24 - static inline int seccomp_mode(seccomp_t *s) 22 + static inline int seccomp_mode(struct seccomp *s) 25 23 { 26 24 return s->mode; 27 25 } ··· 30 28 31 29 #include <linux/errno.h> 32 30 33 - typedef struct { } seccomp_t; 31 + struct seccomp { }; 34 32 35 33 #define secure_computing(x) do { } while (0) 36 34 ··· 44 42 return -EINVAL; 45 43 } 46 44 47 - static inline int seccomp_mode(seccomp_t *s) 45 + static inline int seccomp_mode(struct seccomp *s) 48 46 { 49 47 return 0; 50 48 }