FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_capsicum.h"
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/compressor.h>
#include <sys/exec.h>
#include <sys/fcntl.h>
#include <sys/imgact.h>
#include <sys/imgact_elf.h>
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/procfs.h>
#include <sys/ptrace.h>
#include <sys/racct.h>
#include <sys/reg.h>
#include <sys/resourcevar.h>
#include <sys/rwlock.h>
#include <sys/sbuf.h>
#include <sys/sf_buf.h>
#include <sys/smp.h>
#include <sys/systm.h>
#include <sys/signalvar.h>
#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/syscall.h>
#include <sys/sysctl.h>
#include <sys/sysent.h>
#include <sys/vnode.h>
#include <sys/syslog.h>
#include <sys/eventhandler.h>
#include <sys/user.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
#include <machine/elf.h>
#include <machine/md_var.h>
Go to the source code of this file.
Data Structures | |
struct | phdr_closure |
struct | note_info |
struct | brandnote_cb_arg |
struct | fctl_cb_arg |
Macros | |
#define | ELF_NOTE_ROUNDSIZE 4 |
#define | OLD_EI_BRAND 8 |
#define | ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), _aslr) |
#define | aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) |
#define | ET_DYN_ADDR_RAND 1 |
#define | elf_suword __CONCAT(suword, __ELF_WORD_SIZE) |
#define | ELF_KERN_PROC_MASK 0 |
Typedefs | |
typedef void(* | segment_callback) (vm_map_entry_t, void *) |
typedef prstatus_t | elf_prstatus_t |
typedef prpsinfo_t | elf_prpsinfo_t |
typedef prfpregset_t | elf_prfpregset_t |
typedef prfpregset_t | elf_fpregset_t |
typedef gregset_t | elf_gregset_t |
typedef thrmisc_t | elf_thrmisc_t |
typedef struct kinfo_proc | elf_kinfo_proc_t |
typedef vm_offset_t | elf_ps_strings_t |
Functions | |
__FBSDID ("$FreeBSD$") | |
static int __elfN() | check_header (const Elf_Ehdr *hdr) |
static Elf_Brandinfo *__elfN() | get_brandinfo (struct image_params *imgp, const char *interp, int32_t *osrel, uint32_t *fctl0) |
static int __elfN() | load_file (struct proc *p, const char *file, u_long *addr, u_long *entry) |
static int __elfN() | load_section (struct image_params *imgp, vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot) |
static int | __CONCAT (exec_, __elfN(imgact)) |
SYSCTL_PROC (__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, pie_base, CTLTYPE_ULONG|CTLFLAG_MPSAFE|CTLFLAG_RW, NULL, 0, sysctl_pie_base, "LU", "PIE load base without randomization") | |
SYSCTL_NODE (__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, aslr, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "") | |
static int | __elfN (aslr_enabled) |
SYSCTL_INT (ASLR_NODE_OID, OID_AUTO, enable, CTLFLAG_RWTUN, &__elfN(aslr_enabled), 0, ": enable address map randomization") | |
static int | __elfN (pie_aslr_enabled) |
SYSCTL_INT (ASLR_NODE_OID, OID_AUTO, pie_enable, CTLFLAG_RWTUN, &__elfN(pie_aslr_enabled), 0, ": enable address map randomization for PIE binaries") | |
static int | __elfN (aslr_honor_sbrk)=0 |
SYSCTL_INT (ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, &__elfN(aslr_honor_sbrk), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used") | |
static int | __elfN (aslr_stack) |
SYSCTL_INT (ASLR_NODE_OID, OID_AUTO, stack, CTLFLAG_RWTUN, &__elfN(aslr_stack), 0, ": enable stack address randomization") | |
static int | __elfN (sigfastblock) |
SYSCTL_INT (__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, sigfastblock, CTLFLAG_RWTUN, &__elfN(sigfastblock), 0, "enable sigfastblock for new processes") | |
static bool | __elfN (allow_wx) |
SYSCTL_BOOL (__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO, allow_wx, CTLFLAG_RWTUN, &__elfN(allow_wx), 0, "Allow pages to be mapped simultaneously writable and executable") | |
Elf_Brandnote | __elfN (freebsd_brandnote) |
static bool __elfN() | freebsd_trans_osrel (const Elf_Note *note, int32_t *osrel) |
Elf_Brandnote | __elfN (kfreebsd_brandnote) |
static bool | kfreebsd_trans_osrel (const Elf_Note *note, int32_t *osrel) |
int __elfN() | insert_brand_entry (Elf_Brandinfo *entry) |
int __elfN() | remove_brand_entry (Elf_Brandinfo *entry) |
bool __elfN() | brand_inuse (Elf_Brandinfo *entry) |
static bool __elfN() | phdr_in_zero_page (const Elf_Ehdr *hdr) |
static int __elfN() | map_partial (vm_map_t map, vm_object_t object, vm_ooffset_t offset, vm_offset_t start, vm_offset_t end, vm_prot_t prot) |
static int __elfN() | map_insert (struct image_params *imgp, vm_map_t map, vm_object_t object, vm_ooffset_t offset, vm_offset_t start, vm_offset_t end, vm_prot_t prot, int cow) |
static int __elfN() | load_sections (struct image_params *imgp, const Elf_Ehdr *hdr, const Elf_Phdr *phdr, u_long rbase, u_long *base_addrp) |
static int | __CONCAT (rnd_, __elfN(base)) |
static int __elfN() | enforce_limits (struct image_params *imgp, const Elf_Ehdr *hdr, const Elf_Phdr *phdr, u_long et_dyn_addr) |
static int __elfN() | get_interp (struct image_params *imgp, const Elf_Phdr *phdr, char **interpp, bool *free_interpp) |
static int __elfN() | load_interp (struct image_params *imgp, const Elf_Brandinfo *brand_info, const char *interp, u_long *addr, u_long *entry) |
int __elfN() | freebsd_copyout_auxargs (struct image_params *imgp, uintptr_t base) |
int __elfN() | freebsd_fixup (uintptr_t *stack_base, struct image_params *imgp) |
TAILQ_HEAD (note_info_list, note_info) | |
static void | cb_put_phdr (vm_map_entry_t, void *) |
static void | cb_size_segment (vm_map_entry_t, void *) |
static void | each_dumpable_segment (struct thread *, segment_callback, void *, int) |
static int __elfN() | corehdr (struct coredump_params *, int, void *, size_t, struct note_info_list *, size_t, int) |
static void __elfN() | putnote (struct thread *td, struct note_info *, struct sbuf *) |
static void __elfN() | note_prpsinfo (void *, struct sbuf *, size_t *) |
static void __elfN() | note_threadmd (void *, struct sbuf *, size_t *) |
static void __elfN() | note_thrmisc (void *, struct sbuf *, size_t *) |
static void __elfN() | note_ptlwpinfo (void *, struct sbuf *, size_t *) |
static void __elfN() | note_procstat_auxv (void *, struct sbuf *, size_t *) |
static void __elfN() | note_procstat_proc (void *, struct sbuf *, size_t *) |
static void __elfN() | note_procstat_psstrings (void *, struct sbuf *, size_t *) |
static void | note_procstat_files (void *, struct sbuf *, size_t *) |
static void | note_procstat_groups (void *, struct sbuf *, size_t *) |
static void | note_procstat_osrel (void *, struct sbuf *, size_t *) |
static void | note_procstat_rlimit (void *, struct sbuf *, size_t *) |
static void | note_procstat_umask (void *, struct sbuf *, size_t *) |
static void | note_procstat_vmmap (void *, struct sbuf *, size_t *) |
static int | core_compressed_write (void *base, size_t len, off_t offset, void *arg) |
int __elfN() | coredump (struct thread *td, struct vnode *vp, off_t limit, int flags) |
void __elfN() | size_segments (struct thread *td, struct sseg_closure *seginfo, int flags) |
void __elfN() | prepare_notes (struct thread *td, struct note_info_list *list, size_t *sizep) |
void __elfN() | puthdr (struct thread *td, void *hdr, size_t hdrsize, int numsegs, size_t notesz, int flags) |
static size_t __elfN() | register_regset_note (struct thread *td, struct note_info_list *list, struct regset *regset, struct thread *target_td) |
size_t __elfN() | register_note (struct thread *td, struct note_info_list *list, int type, outfunc_t out, void *arg) |
static size_t | append_note_data (const void *src, void *dst, size_t len) |
size_t __elfN() | populate_note (int type, void *src, void *dst, size_t size, void **descp) |
static bool __elfN() | get_prstatus (struct regset *rs, struct thread *td, void *buf, size_t *sizep) |
static bool __elfN() | set_prstatus (struct regset *rs, struct thread *td, void *buf, size_t size) |
static struct regset | __elfN (regset_prstatus) |
ELF_REGSET (__elfN(regset_prstatus)) | |
static bool __elfN() | get_fpregset (struct regset *rs, struct thread *td, void *buf, size_t *sizep) |
static bool __elfN() | set_fpregset (struct regset *rs, struct thread *td, void *buf, size_t size) |
static struct regset | __elfN (regset_fpregset) |
ELF_REGSET (__elfN(regset_fpregset)) | |
static size_t __elfN() | prepare_register_notes (struct thread *td, struct note_info_list *list, struct thread *target_td) |
static bool __elfN() | parse_notes (struct image_params *imgp, Elf_Note *checknote, const char *note_vendor, const Elf_Phdr *pnote, bool(*cb)(const Elf_Note *, void *, bool *), void *cb_arg) |
static bool | brandnote_cb (const Elf_Note *note, void *arg0, bool *res) |
static bool | note_fctl_cb (const Elf_Note *note, void *arg0, bool *res) |
static bool __elfN() | check_note (struct image_params *imgp, Elf_Brandnote *brandnote, int32_t *osrel, bool *has_fctl0, uint32_t *fctl0) |
static struct execsw | __elfN (execsw) |
EXEC_SET (__CONCAT(elf, __ELF_WORD_SIZE), __elfN(execsw)) | |
static vm_prot_t __elfN() | trans_prot (Elf_Word flags) |
static Elf_Word __elfN() | untrans_prot (vm_prot_t prot) |
Variables | |
static Elf_Brandinfo * | elf_brand_list [MAX_BRANDS] |
static const char | GNU_ABI_VENDOR [] = "GNU" |
static int | GNU_KFREEBSD_ABI_DESC = 3 |
int | compress_user_cores |
int | compress_user_cores_level |
static Elf_Note | fctl_note |
#define aligned | ( | a, | |
t | |||
) | (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) |
Definition at line 224 of file imgact_elf.c.
#define ASLR_NODE_OID __CONCAT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), _aslr) |
Definition at line 173 of file imgact_elf.c.
#define ELF_KERN_PROC_MASK 0 |
Definition at line 2159 of file imgact_elf.c.
#define ELF_NOTE_ROUNDSIZE 4 |
Definition at line 86 of file imgact_elf.c.
#define elf_suword __CONCAT(suword, __ELF_WORD_SIZE) |
Definition at line 1429 of file imgact_elf.c.
#define ET_DYN_ADDR_RAND 1 |
Definition at line 1102 of file imgact_elf.c.
#define OLD_EI_BRAND 8 |
Definition at line 87 of file imgact_elf.c.
typedef prfpregset_t elf_fpregset_t |
Definition at line 2156 of file imgact_elf.c.
typedef gregset_t elf_gregset_t |
Definition at line 2157 of file imgact_elf.c.
typedef struct kinfo_proc elf_kinfo_proc_t |
Definition at line 2160 of file imgact_elf.c.
typedef prfpregset_t elf_prfpregset_t |
Definition at line 2155 of file imgact_elf.c.
typedef prpsinfo_t elf_prpsinfo_t |
Definition at line 2154 of file imgact_elf.c.
typedef prstatus_t elf_prstatus_t |
Definition at line 2153 of file imgact_elf.c.
typedef vm_offset_t elf_ps_strings_t |
Definition at line 2161 of file imgact_elf.c.
typedef thrmisc_t elf_thrmisc_t |
Definition at line 2158 of file imgact_elf.c.
typedef void(* segment_callback) (vm_map_entry_t, void *) |
Definition at line 1514 of file imgact_elf.c.
|
static |
Definition at line 96 of file imgact_elf.c.
Referenced by __elfN().
|
static |
Definition at line 891 of file imgact_elf.c.
References res, and uprintf().
|
static |
|
static |
Referenced by __elfN(), cb_put_phdr(), check_note(), coredump(), corehdr(), freebsd_copyout_auxargs(), get_brandinfo(), load_file(), load_interp(), load_section(), load_sections(), map_insert(), note_threadmd(), prepare_notes(), and prepare_register_notes().
|
staticpure virtual |
|
static |
Elf_Brandnote __elfN | ( | freebsd_brandnote | ) |
Elf_Brandnote __elfN | ( | kfreebsd_brandnote | ) |
|
static |
|
static |
References __elfN(), get, get_fpregset(), and set_fpregset().
|
static |
References __elfN(), get, get_prstatus(), and set_prstatus().
|
static |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 2028 of file imgact_elf.c.
References ELF_NOTE_ROUNDSIZE, and src.
Referenced by populate_note().
bool __elfN() brand_inuse | ( | Elf_Brandinfo * | entry | ) |
Definition at line 317 of file imgact_elf.c.
References allproc_lock.
|
static |
Definition at line 2754 of file imgact_elf.c.
References brandnote_cb_arg::brandnote, brandnote_cb_arg::osrel, and res.
Referenced by check_note().
|
static |
Definition at line 1686 of file imgact_elf.c.
References __elfN(), phdr_closure::offset, phdr_closure::phdr, and untrans_prot().
Referenced by puthdr().
|
static |
Definition at line 1710 of file imgact_elf.c.
Referenced by size_segments().
|
static |
Definition at line 486 of file imgact_elf.c.
References elf_brand_list.
Referenced by load_file().
|
static |
Definition at line 2806 of file imgact_elf.c.
References __elfN(), brandnote_cb_arg::brandnote, brandnote_cb(), fctl_cb_arg::fctl0, fctl_note, fctl_cb_arg::has_fctl0, note_fctl_cb(), brandnote_cb_arg::osrel, and parse_notes().
Referenced by get_brandinfo().
|
static |
Definition at line 1559 of file imgact_elf.c.
References core_write().
Referenced by coredump().
int __elfN() coredump | ( | struct thread * | td, |
struct vnode * | vp, | ||
off_t | limit, | ||
int | flags | ||
) |
Definition at line 1567 of file imgact_elf.c.
References __elfN(), compress_user_cores, compress_user_cores_level, compressor_fini(), compressor_flush(), compressor_init(), core_compressed_write(), core_output(), corehdr(), flags, free(), log(), malloc(), and size_segments().
Referenced by doadump().
|
static |
Definition at line 1800 of file imgact_elf.c.
References __elfN(), flags, puthdr(), putnote(), sbuf_bcat(), sbuf_delete(), sbuf_drain_core_output(), sbuf_end_section(), sbuf_finish(), sbuf_new(), sbuf_set_drain(), and sbuf_start_section().
Referenced by coredump().
|
static |
Definition at line 1734 of file imgact_elf.c.
References flags.
Referenced by puthdr(), and size_segments().
ELF_REGSET | ( | __elfN(regset_fpregset) | ) |
ELF_REGSET | ( | __elfN(regset_prstatus) | ) |
|
static |
Definition at line 921 of file imgact_elf.c.
References lim_cur_proc(), maxtsiz, and uprintf().
EXEC_SET | ( | __CONCAT(elf, __ELF_WORD_SIZE) | , |
__elfN(execsw) | |||
) |
int __elfN() freebsd_copyout_auxargs | ( | struct image_params * | imgp, |
uintptr_t | base | ||
) |
int __elfN() freebsd_fixup | ( | uintptr_t * | stack_base, |
struct image_params * | imgp | ||
) |
Definition at line 1498 of file imgact_elf.c.
References elf_suword.
|
static |
Definition at line 236 of file imgact_elf.c.
References ELF_NOTE_ROUNDSIZE.
Referenced by __elfN().
|
static |
Definition at line 335 of file imgact_elf.c.
References __elfN(), check_note(), elf_brand_list, and OLD_EI_BRAND.
|
static |
Definition at line 2277 of file imgact_elf.c.
References buf.
Referenced by __elfN().
|
static |
|
static |
Definition at line 2226 of file imgact_elf.c.
References buf.
Referenced by __elfN().
int __elfN() insert_brand_entry | ( | Elf_Brandinfo * | entry | ) |
Definition at line 282 of file imgact_elf.c.
References elf_brand_list, and printf().
|
static |
Definition at line 260 of file imgact_elf.c.
References ELF_NOTE_ROUNDSIZE, and GNU_KFREEBSD_ABI_DESC.
Referenced by __elfN().
|
static |
Definition at line 776 of file imgact_elf.c.
References __elfN(), addr, aligned, check_header(), exec_check_permissions(), exec_map_first_page(), exec_unmap_first_page(), free(), load_sections(), malloc(), namei(), NDFREE(), phdr_in_zero_page(), and vput().
Referenced by load_interp().
|
static |
Definition at line 1064 of file imgact_elf.c.
References __elfN(), addr, free(), load_file(), malloc(), path, snprintf(), and uprintf().
|
static |
Definition at line 619 of file imgact_elf.c.
References __elfN(), map_insert(), and uprintf().
Referenced by load_sections().
|
static |
Definition at line 723 of file imgact_elf.c.
References __elfN(), load_section(), and trans_prot().
Referenced by load_file().
|
static |
Definition at line 547 of file imgact_elf.c.
References __elfN(), map_partial(), and start.
Referenced by load_section().
|
static |
Definition at line 515 of file imgact_elf.c.
References start.
Referenced by map_insert().
|
static |
Definition at line 2783 of file imgact_elf.c.
References ELF_NOTE_ROUNDSIZE, fctl_cb_arg::fctl0, fctl_cb_arg::has_fctl0, and res.
Referenced by check_note().
|
static |
Definition at line 2652 of file imgact_elf.c.
References proc_getauxv(), sbuf_bcat(), sbuf_count_drain(), sbuf_delete(), sbuf_finish(), sbuf_new(), and sbuf_set_drain().
Referenced by prepare_notes().
|
static |
Definition at line 2466 of file imgact_elf.c.
References coredump_pack_fileinfo, kern_proc_filedesc_out(), sbuf_bcat(), sbuf_count_drain(), sbuf_delete(), sbuf_end_section(), sbuf_finish(), sbuf_new(), sbuf_putc(), sbuf_set_drain(), and sbuf_start_section().
Referenced by prepare_notes().
|
static |
Definition at line 2550 of file imgact_elf.c.
References sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2610 of file imgact_elf.c.
References sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2439 of file imgact_elf.c.
References ELF_KERN_PROC_MASK, kern_proc_out(), proctree_lock, and sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2628 of file imgact_elf.c.
References sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2587 of file imgact_elf.c.
References lim_rlimit_proc(), and sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2569 of file imgact_elf.c.
References sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2518 of file imgact_elf.c.
References coredump_pack_vmmapinfo, kern_proc_vmmap_out(), sbuf_bcat(), sbuf_count_drain(), sbuf_delete(), sbuf_finish(), sbuf_new(), and sbuf_set_drain().
Referenced by prepare_notes().
|
static |
Definition at line 2165 of file imgact_elf.c.
References free(), malloc(), proc_getargv(), sbuf_bcat(), sbuf_delete(), sbuf_finish(), sbuf_len(), and sbuf_new().
Referenced by prepare_notes().
|
static |
Definition at line 2370 of file imgact_elf.c.
References sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2413 of file imgact_elf.c.
References __elfN(), buf, free(), malloc(), and sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2354 of file imgact_elf.c.
References sbuf_bcat().
Referenced by prepare_notes().
|
static |
Definition at line 2681 of file imgact_elf.c.
References aligned, buf, ELF_NOTE_ROUNDSIZE, free(), malloc(), res, uprintf(), and vn_rdwr().
Referenced by check_note().
|
static |
Definition at line 479 of file imgact_elf.c.
Referenced by load_file().
size_t __elfN() populate_note | ( | int | type, |
void * | src, | ||
void * | dst, | ||
size_t | size, | ||
void ** | descp | ||
) |
Definition at line 2041 of file imgact_elf.c.
References append_note_data(), buf, ELF_NOTE_ROUNDSIZE, src, and type.
void __elfN() prepare_notes | ( | struct thread * | td, |
struct note_info_list * | list, | ||
size_t * | sizep | ||
) |
Definition at line 1827 of file imgact_elf.c.
References __elfN(), note_procstat_auxv(), note_procstat_files(), note_procstat_groups(), note_procstat_osrel(), note_procstat_proc(), note_procstat_psstrings(), note_procstat_rlimit(), note_procstat_umask(), note_procstat_vmmap(), note_prpsinfo(), note_ptlwpinfo(), note_threadmd(), note_thrmisc(), prepare_register_notes(), and register_note().
|
static |
Definition at line 2321 of file imgact_elf.c.
References __elfN(), and register_regset_note().
Referenced by prepare_notes().
void __elfN() puthdr | ( | struct thread * | td, |
void * | hdr, | ||
size_t | hdrsize, | ||
int | numsegs, | ||
size_t | notesz, | ||
int | flags | ||
) |
Definition at line 1885 of file imgact_elf.c.
References cb_put_phdr(), each_dumpable_segment(), ELF_NOTE_ROUNDSIZE, flags, phdr_closure::offset, and phdr_closure::phdr.
Referenced by corehdr().
|
static |
Definition at line 2070 of file imgact_elf.c.
References buf, ELF_NOTE_ROUNDSIZE, free(), malloc(), note_info::outarg, note_info::outfunc, note_info::outsize, note_info::regset, sbuf_bcat(), sbuf_end_section(), sbuf_putc(), sbuf_start_section(), and note_info::type.
Referenced by corehdr().
size_t __elfN() register_note | ( | struct thread * | td, |
struct note_info_list * | list, | ||
int | type, | ||
outfunc_t | out, | ||
void * | arg | ||
) |
Definition at line 1999 of file imgact_elf.c.
References ELF_NOTE_ROUNDSIZE, malloc(), note_info::outarg, note_info::outfunc, note_info::outsize, type, and note_info::type.
Referenced by prepare_notes().
|
static |
Definition at line 1971 of file imgact_elf.c.
References ELF_NOTE_ROUNDSIZE, malloc(), note_info::outarg, note_info::outsize, note_info::regset, and note_info::type.
Referenced by prepare_register_notes().
int __elfN() remove_brand_entry | ( | Elf_Brandinfo * | entry | ) |
Definition at line 301 of file imgact_elf.c.
References elf_brand_list.
|
static |
Definition at line 2297 of file imgact_elf.c.
References buf.
Referenced by __elfN().
|
static |
Definition at line 2253 of file imgact_elf.c.
References buf.
Referenced by __elfN().
void __elfN() size_segments | ( | struct thread * | td, |
struct sseg_closure * | seginfo, | ||
int | flags | ||
) |
Definition at line 1719 of file imgact_elf.c.
References cb_size_segment(), each_dumpable_segment(), and flags.
Referenced by coredump().
SYSCTL_BOOL | ( | __CONCAT(_kern_elf, __ELF_WORD_SIZE) | , |
OID_AUTO | , | ||
allow_wx | , | ||
CTLFLAG_RWTUN | , | ||
& | __elfNallow_wx, | ||
0 | , | ||
"Allow pages to be mapped simultaneously writable and executable" | |||
) |
SYSCTL_INT | ( | __CONCAT(_kern_elf, __ELF_WORD_SIZE) | , |
OID_AUTO | , | ||
sigfastblock | , | ||
CTLFLAG_RWTUN | , | ||
& | __elfNsigfastblock, | ||
0 | , | ||
"enable sigfastblock for new processes" | |||
) |
SYSCTL_INT | ( | ASLR_NODE_OID | , |
OID_AUTO | , | ||
enable | , | ||
CTLFLAG_RWTUN | , | ||
& | __elfNaslr_enabled, | ||
0 | , | ||
": enable address map randomization" | |||
) |
SYSCTL_INT | ( | ASLR_NODE_OID | , |
OID_AUTO | , | ||
honor_sbrk | , | ||
CTLFLAG_RW | , | ||
& | __elfNaslr_honor_sbrk, | ||
0 | , | ||
__XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used" | |||
) |
SYSCTL_INT | ( | ASLR_NODE_OID | , |
OID_AUTO | , | ||
pie_enable | , | ||
CTLFLAG_RWTUN | , | ||
& | __elfNpie_aslr_enabled, | ||
0 | , | ||
": enable address map randomization for PIE binaries" | |||
) |
SYSCTL_INT | ( | ASLR_NODE_OID | , |
OID_AUTO | , | ||
stack | , | ||
CTLFLAG_RWTUN | , | ||
& | __elfNaslr_stack, | ||
0 | , | ||
": enable stack address randomization" | |||
) |
SYSCTL_NODE | ( | __CONCAT(_kern_elf, __ELF_WORD_SIZE) | , |
OID_AUTO | , | ||
aslr | , | ||
CTLFLAG_RW| | CTLFLAG_MPSAFE, | ||
0 | , | ||
"" | |||
) |
SYSCTL_PROC | ( | __CONCAT(_kern_elf, __ELF_WORD_SIZE) | , |
OID_AUTO | , | ||
pie_base | , | ||
CTLTYPE_ULONG|CTLFLAG_MPSAFE| | CTLFLAG_RW, | ||
NULL | , | ||
0 | , | ||
sysctl_pie_base | , | ||
"LU" | , | ||
"PIE load base without randomization" | |||
) |
TAILQ_HEAD | ( | note_info_list | , |
note_info | |||
) |
|
static |
Definition at line 2850 of file imgact_elf.c.
References flags.
Referenced by load_sections().
|
static |
Definition at line 2869 of file imgact_elf.c.
References flags.
Referenced by cb_put_phdr().
|
extern |
Definition at line 3572 of file kern_sig.c.
Referenced by coredump(), and sysctl_compress_user_cores().
|
extern |
Definition at line 3595 of file kern_sig.c.
Referenced by coredump().
|
static |
Definition at line 222 of file imgact_elf.c.
Referenced by check_header(), get_brandinfo(), insert_brand_entry(), and remove_brand_entry().
|
static |
Definition at line 2771 of file imgact_elf.c.
Referenced by check_note().
|
static |
Definition at line 247 of file imgact_elf.c.
Referenced by __elfN().
|
static |
Definition at line 248 of file imgact_elf.c.
Referenced by kfreebsd_trans_osrel().