/* * This structure is used to hold the arguments that are used when loading binaries.
*/ struct linux_binprm { #ifdef CONFIG_MMU struct vm_area_struct *vma; unsignedlong vma_pages; unsignedlong argmin; /* rlimit marker for copy_strings() */ #else # define MAX_ARG_PAGES 32 struct page *page[MAX_ARG_PAGES]; #endif struct mm_struct *mm; unsignedlong p; /* current top of mem */ unsignedint /* Should an execfd be passed to userspace? */
have_execfd:1,
/* Use the creds of a script (see binfmt_misc) */
execfd_creds:1, /* * Set by bprm_creds_for_exec hook to indicate a * privilege-gaining exec has happened. Used to set * AT_SECURE auxv for glibc.
*/
secureexec:1, /* * Set when errors can no longer be returned to the * original userspace.
*/
point_of_no_return:1, /* Set when "comm" must come from the dentry. */
comm_from_dentry:1, /* * Set by user space to check executability according to the * caller's environment.
*/
is_check:1; struct file *executable; /* Executable to pass to the interpreter */ struct file *interpreter; struct file *file; struct cred *cred; /* new credentials */ int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */ unsignedint per_clear; /* bits to clear in current->personality */ int argc, envc; constchar *filename; /* Name of binary as seen by procps */ constchar *interp; /* Name of the binary really executed. Most of the time same as filename, but could be
different for binfmt_{misc,script} */ constchar *fdpath; /* generated filename for execveat */ unsigned interp_flags; int execfd; /* File descriptor of the executable */ unsignedlong exec;
struct rlimit rlim_stack; /* Saved RLIMIT_STACK used during exec. */
/* filename of the binary will be inaccessible after exec */ #define BINPRM_FLAGS_PATH_INACCESSIBLE_BIT 2 #define BINPRM_FLAGS_PATH_INACCESSIBLE (1 << BINPRM_FLAGS_PATH_INACCESSIBLE_BIT)
/* preserve argv0 for the interpreter */ #define BINPRM_FLAGS_PRESERVE_ARGV0_BIT 3 #define BINPRM_FLAGS_PRESERVE_ARGV0 (1 << BINPRM_FLAGS_PRESERVE_ARGV0_BIT)
/* * This structure defines the functions that are used to load the binary formats that * linux accepts.
*/ struct linux_binfmt { struct list_head lh; struct module *module; int (*load_binary)(struct linux_binprm *); #ifdef CONFIG_COREDUMP int (*core_dump)(struct coredump_params *cprm); unsignedlong min_coredump; /* minimal dump size */ #endif
} __randomize_layout;
externvoid __register_binfmt(struct linux_binfmt *fmt, int insert);
/* Registration of default binfmt handlers */ staticinlinevoid register_binfmt(struct linux_binfmt *fmt)
{
__register_binfmt(fmt, 0);
} /* Same as above, but adds a new binfmt at the top of the list */ staticinlinevoid insert_binfmt(struct linux_binfmt *fmt)
{
__register_binfmt(fmt, 1);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.