Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
binfmts.h File Reference
#include <linux/sched.h>
#include <linux/unistd.h>
#include <asm/exec.h>
#include <uapi/linux/binfmts.h>

Go to the source code of this file.

Data Structures

struct  linux_binprm
 
struct  coredump_params
 
struct  linux_binfmt
 

Macros

#define CORENAME_MAX_SIZE   128
 
#define MAX_ARG_PAGES   32
 
#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT   0
 
#define BINPRM_FLAGS_ENFORCE_NONDUMP   (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)
 
#define BINPRM_FLAGS_EXECFD_BIT   1
 
#define BINPRM_FLAGS_EXECFD   (1 << BINPRM_FLAGS_EXECFD_BIT)
 
#define BINPRM_MAX_RECURSION   4
 
#define SUID_DUMP_DISABLE   0 /* No setuid dumping */
 
#define SUID_DUMP_USER   1 /* Dump as user of process */
 
#define SUID_DUMP_ROOT   2 /* Dump as root */
 
#define EXSTACK_DEFAULT   0 /* Whatever the arch defaults to */
 
#define EXSTACK_DISABLE_X   1 /* Disable executable stacks */
 
#define EXSTACK_ENABLE_X   2 /* Enable executable stacks */
 

Functions

void __register_binfmt (struct linux_binfmt *fmt, int insert)
 
void unregister_binfmt (struct linux_binfmt *)
 
int prepare_binprm (struct linux_binprm *)
 
int __must_check remove_arg_zero (struct linux_binprm *)
 
int search_binary_handler (struct linux_binprm *, struct pt_regs *)
 
int flush_old_exec (struct linux_binprm *bprm)
 
void setup_new_exec (struct linux_binprm *bprm)
 
void would_dump (struct linux_binprm *, struct file *)
 
int setup_arg_pages (struct linux_binprm *bprm, unsigned long stack_top, int executable_stack)
 
int bprm_mm_init (struct linux_binprm *bprm)
 
int copy_strings_kernel (int argc, const char *const *argv, struct linux_binprm *bprm)
 
int prepare_bprm_creds (struct linux_binprm *bprm)
 
void install_exec_creds (struct linux_binprm *bprm)
 
void set_binfmt (struct linux_binfmt *new)
 
void free_bprm (struct linux_binprm *)
 

Variables

int suid_dumpable
 

Macro Definition Documentation

#define BINPRM_FLAGS_ENFORCE_NONDUMP   (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)

Definition at line 51 of file binfmts.h.

#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT   0

Definition at line 50 of file binfmts.h.

#define BINPRM_FLAGS_EXECFD   (1 << BINPRM_FLAGS_EXECFD_BIT)

Definition at line 55 of file binfmts.h.

#define BINPRM_FLAGS_EXECFD_BIT   1

Definition at line 54 of file binfmts.h.

#define BINPRM_MAX_RECURSION   4

Definition at line 57 of file binfmts.h.

#define CORENAME_MAX_SIZE   128

Definition at line 9 of file binfmts.h.

#define EXSTACK_DEFAULT   0 /* Whatever the arch defaults to */

Definition at line 109 of file binfmts.h.

#define EXSTACK_DISABLE_X   1 /* Disable executable stacks */

Definition at line 110 of file binfmts.h.

#define EXSTACK_ENABLE_X   2 /* Enable executable stacks */

Definition at line 111 of file binfmts.h.

#define MAX_ARG_PAGES   32

Definition at line 20 of file binfmts.h.

#define SUID_DUMP_DISABLE   0 /* No setuid dumping */

Definition at line 104 of file binfmts.h.

#define SUID_DUMP_ROOT   2 /* Dump as root */

Definition at line 106 of file binfmts.h.

#define SUID_DUMP_USER   1 /* Dump as user of process */

Definition at line 105 of file binfmts.h.

Function Documentation

void __register_binfmt ( struct linux_binfmt fmt,
int  insert 
)

Definition at line 74 of file exec.c.

int bprm_mm_init ( struct linux_binprm bprm)

Definition at line 358 of file exec.c.

int copy_strings_kernel ( int  argc,
const char *const argv,
struct linux_binprm bprm 
)

Definition at line 544 of file exec.c.

int flush_old_exec ( struct linux_binprm bprm)

Definition at line 1060 of file exec.c.

void free_bprm ( struct linux_binprm )

Definition at line 1171 of file exec.c.

void install_exec_creds ( struct linux_binprm bprm)

Definition at line 1184 of file exec.c.

int prepare_binprm ( struct linux_binprm )

Definition at line 1254 of file exec.c.

int prepare_bprm_creds ( struct linux_binprm bprm)

Definition at line 1158 of file exec.c.

int __must_check remove_arg_zero ( struct linux_binprm )

Definition at line 1310 of file exec.c.

int search_binary_handler ( struct linux_binprm ,
struct pt_regs  
)

Definition at line 1352 of file exec.c.

void set_binfmt ( struct linux_binfmt new)

Definition at line 1595 of file exec.c.

int setup_arg_pages ( struct linux_binprm bprm,
unsigned long  stack_top,
int  executable_stack 
)
void setup_new_exec ( struct linux_binprm bprm)

Definition at line 1105 of file exec.c.

void unregister_binfmt ( struct linux_binfmt )

Definition at line 85 of file exec.c.

void would_dump ( struct linux_binprm ,
struct file  
)

Definition at line 1098 of file exec.c.

Variable Documentation

int suid_dumpable

Definition at line 69 of file exec.c.