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 88ebdda615
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>
	
	
This commit is contained in:
		
					parent
					
						
							
								0c5fe1b422
							
						
					
				
			
			
				commit
				
					
						932ecebb04
					
				
			
		
					 2 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
					@ -1452,7 +1452,7 @@ struct task_struct {
 | 
				
			||||||
	uid_t loginuid;
 | 
						uid_t loginuid;
 | 
				
			||||||
	unsigned int sessionid;
 | 
						unsigned int sessionid;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	seccomp_t seccomp;
 | 
						struct seccomp seccomp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Thread group tracking */
 | 
					/* Thread group tracking */
 | 
				
			||||||
   	u32 parent_exec_id;
 | 
					   	u32 parent_exec_id;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,9 @@
 | 
				
			||||||
#include <linux/thread_info.h>
 | 
					#include <linux/thread_info.h>
 | 
				
			||||||
#include <asm/seccomp.h>
 | 
					#include <asm/seccomp.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct { int mode; } seccomp_t;
 | 
					struct seccomp {
 | 
				
			||||||
 | 
						int mode;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern void __secure_computing(int);
 | 
					extern void __secure_computing(int);
 | 
				
			||||||
static inline void secure_computing(int this_syscall)
 | 
					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_get_seccomp(void);
 | 
				
			||||||
extern long prctl_set_seccomp(unsigned long);
 | 
					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;
 | 
						return s->mode;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -28,7 +30,7 @@ static inline int seccomp_mode(seccomp_t *s)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/errno.h>
 | 
					#include <linux/errno.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct { } seccomp_t;
 | 
					struct seccomp { };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define secure_computing(x) do { } while (0)
 | 
					#define secure_computing(x) do { } while (0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,7 +44,7 @@ static inline long prctl_set_seccomp(unsigned long arg2)
 | 
				
			||||||
	return -EINVAL;
 | 
						return -EINVAL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline int seccomp_mode(seccomp_t *s)
 | 
					static inline int seccomp_mode(struct seccomp *s)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue