freebsd-skq/sys/sys
Brooks Davis f373437a01 Add helper functions to copy strings into struct image_args.
Given a zeroed struct image_args with an allocated buf member,
exec_args_add_fname() must be called to install a file name (or NULL).
Then zero or more calls to exec_args_add_env() followed by zero or
more calls to exec_args_add_env(). exec_args_adjust_args() may be
called after args and/or env to allow an interpreter to be prepended to
the argument list.

To allow code reuse when adding arg and env variables, begin_envv
should be accessed with the accessor exec_args_get_begin_envv()
which handles the case when no environment entries have been added.

Use these functions to simplify exec_copyin_args() and
freebsd32_exec_copyin_args().

Reviewed by:	kib
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15468
2018-11-29 21:00:56 +00:00
..
disk
_bitset.h
_bus_dma.h
_callout.h
_cpuset.h
_domainset.h Refactor domainset iterators for use by malloc(9) and UMA. 2018-10-23 16:35:58 +00:00
_ffcounter.h
_iovec.h
_kstack_cache.h
_lock.h
_lockmgr.h
_mutex.h
_null.h
_pctrie.h
_pthreadtypes.h
_rmlock.h
_rwlock.h
_semaphore.h
_sigset.h
_sockaddr_storage.h
_stack.h
_stdarg.h
_stdint.h
_sx.h
_task.h
_termios.h
_timespec.h
_timeval.h
_types.h
_ucontext.h
_uio.h
_umtx.h
_unrhdr.h
aac_ioctl.h
acct.h
acl.h
agpio.h
aio.h
alq.h
apm.h
assym.h
ata.h
atomic_common.h
auxv.h
bio.h
bitset.h
bitstring.h
blist.h Allow allocations across meta boundaries. 2018-11-13 18:40:01 +00:00
boot.h
buf_ring.h
buf.h
bufobj.h
bus_dma_internal.h
bus_dma.h
bus.h acpi: fix acpi_ec_probe to only check EC devices 2018-11-19 18:29:03 +00:00
busdma_bufalloc.h
callout.h
capability.h capability.h: add comment about planned removal timeline 2018-11-06 00:05:17 +00:00
caprights.h
capsicum.h capsicum: provide cap_rights_fde_inline 2018-10-12 23:48:10 +00:00
cdefs.h
cdio.h
cdrio.h
cfictl.h
chio.h
ck.h
clock.h
cnv.h
compressor.h
condvar.h
conf.h
cons.h Replace ttyprintf with sbuf_printf and tty drain routine 2018-10-20 18:31:36 +00:00
consio.h
copyright.h
counter.h
cpu.h
cpuctl.h
cpuset.h
ctype.h
devicestat.h devstat(9): Constify function parameters that can be const 2018-08-23 01:42:45 +00:00
devmap.h
dir.h
dirent.h Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
disk_zone.h
disk.h
disklabel.h
diskmbr.h
dkstat.h
dnv.h
domain.h
domainset.h Add malloc_domainset(9) and _domainset variants to other allocator KPIs. 2018-10-30 18:26:34 +00:00
dtrace_bsd.h
dvdio.h
efi.h Catch exceptions during EFI RT calls on amd64. 2018-09-02 21:37:05 +00:00
efiio.h
elf32.h
elf64.h
elf_common.h Handle the DT_MIPS_RLD_MAP_REL dynamic tag in RTLD 2018-11-07 15:04:41 +00:00
elf_generic.h
elf.h
endian.h
epoch.h The dualism between epoch_tracker and epoch_thread is fragile and 2018-11-13 23:20:55 +00:00
errno.h
eui64.h
event.h Pass malloc flags directly through kevent(2) subroutines. 2018-11-24 17:06:01 +00:00
eventhandler.h
eventvar.h
exec.h
extattr.h
fail.h
fbio.h
fcntl.h Implement O_BENEATH and AT_BENEATH. 2018-10-25 22:16:34 +00:00
fdcio.h
file.h
filedesc.h fd: unify fd range check across the routines 2018-11-29 08:53:39 +00:00
filio.h Move 32-bit compat support for FIODGNAME to the right place. 2018-10-26 17:59:25 +00:00
firmware.h
fnv_hash.h
gmon.h
gpio.h
gpt.h
gtaskqueue.h Drain grouptaskqueue of the gtask before detaching it. 2018-10-29 14:36:03 +00:00
hash.h
hhook.h
iconv.h
imgact_aout.h
imgact_binmisc.h
imgact_elf.h
imgact.h Add helper functions to copy strings into struct image_args. 2018-11-29 21:00:56 +00:00
inflate.h
interrupt.h Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00
intr.h
ioccom.h
ioctl_compat.h
ioctl.h
iov_schema.h
iov.h
ipc.h
ipmi.h
jail.h In hardened systems, where the security.bsd.unprivileged_proc_debug sysctl 2018-11-27 17:51:50 +00:00
joystick.h Remove #warning since it breaks libsysdecode 2018-10-26 04:53:29 +00:00
kbio.h
kdb.h Don't enter DDB for fatal traps before panic by default. 2018-11-01 21:34:17 +00:00
kenv.h
kern_prefetch.h
kernel.h
kerneldump.h
khelp.h
kobj.h
kpilite.h
ksem.h
kthread.h
ktr_class.h
ktr.h
ktrace.h
libkern.h
limits.h
link_aout.h
link_elf.h
linker_set.h
linker.h Add flags variants to linker_files / stack(9) symbol resolution 2018-10-20 18:08:43 +00:00
lock_profile.h
lock.h
lockf.h
lockmgr.h
lockstat.h
loginclass.h
mac.h
malloc.h Add malloc_domainset(9) and _domainset variants to other allocator KPIs. 2018-10-30 18:26:34 +00:00
mbuf.h
mchain.h
md4.h
md5.h
mdioctl.h
memdesc.h
memrange.h
mman.h
module_khelp.h
module.h Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
mount.h Clarify explanation of VFCF_SBDRY. 2018-10-29 23:43:17 +00:00
mouse.h For the moment, put back the MOUSE_PROTO_{BUS,INPORT} #defines until 2018-10-23 20:45:46 +00:00
mpt_ioctl.h
mqueue.h
msg.h
msgbuf.h
mtio.h
mutex.h
namei.h Allow absolute paths for O_BENEATH. 2018-11-11 00:04:36 +00:00
nlist_aout.h
nv.h
osd.h
param.h Enable the BSD crtbegin/crtend by default. 2018-11-23 16:45:07 +00:00
pciio.h
pcpu.h Don't mark module data as static on RISC-V. 2018-09-12 08:05:33 +00:00
pctrie.h
pidctrl.h
pioctl.h
pipe.h
pmc.h hwpmc: Refactor sample ring buffer handling to fix races 2018-10-05 05:55:56 +00:00
pmckern.h hwpmc: Refactor sample ring buffer handling to fix races 2018-10-05 05:55:56 +00:00
pmclog.h
poll.h
posix4.h
power.h
priority.h
priv.h
proc.h proc: create a dedicated lock for zombproc to ligthen the load on allproc_lock 2018-11-29 02:52:08 +00:00
procctl.h
procdesc.h
procfs.h
protosw.h
ptio.h
ptrace.h
queue.h Define QMD_SAVELINK() only for QUEUE_MACRO_DEBUG_TRASH case. Otherwise 2018-10-31 19:37:11 +00:00
racct.h Convert racct_enable to bool and annotate as __read_frequently 2018-11-29 05:17:16 +00:00
random.h random(4): Match enabled sources mask to build options 2018-10-27 15:09:35 +00:00
rangelock.h
rctl.h
reboot.h
refcount.h Make sure returned value is checked and assert a valid refcount. 2018-10-22 16:21:50 +00:00
regression.h
resource.h
resourcevar.h eliminate locking surrounding ui_vmsize and swap reserve by using atomics 2018-10-05 05:50:56 +00:00
rman.h
rmlock.h
rtprio.h
runq.h
rwlock.h
sbuf.h
sched.h
sdt.h
select.h
selinfo.h
sem.h
sema.h
seq.h
serial.h
sf_buf.h
sglist.h
shm.h
sigio.h
signal.h
signalvar.h vfs: __predict common case in VFS_EPILOGUE/PROLOGUE 2018-09-22 11:39:30 +00:00
sleepqueue.h
slicer.h
smp.h
snoop.h
sockbuf.h Retire sbsndptr() KPI 2018-11-19 00:54:31 +00:00
socket.h Add SOL_SOCKET level socket option with name SO_DOMAIN to get 2018-08-21 14:04:30 +00:00
socketvar.h Regen after r340199: Use declared types for caddr_t arguments. 2018-11-06 18:47:29 +00:00
sockio.h
sockopt.h
soundcard.h
spigenio.h
stack.h Add flags variants to linker_files / stack(9) symbol resolution 2018-10-20 18:08:43 +00:00
stat.h
statvfs.h
stdatomic.h
stddef.h
stdint.h
sun_disklabel.h
sx.h
syscall.h Regenerate after UNIMPL -> OBSOL changes in r339001. 2018-09-28 17:25:28 +00:00
syscall.mk
syscallsubr.h Use declared types for caddr_t arguments. 2018-11-06 18:46:38 +00:00
sysctl.h Add sysctl_usec_to_sbintime and sysctl_msec_to_sbintime. 2018-11-02 17:50:57 +00:00
sysent.h
syslimits.h
syslog.h
sysproto.h Regen after r340302: Fix freebsd32 mknod(at). 2018-11-09 21:02:07 +00:00
systm.h Implement unr64 2018-11-20 14:58:41 +00:00
taskqueue.h Add a taskqueue_quiesce(9) KPI. 2018-11-21 17:18:27 +00:00
terminal.h
termios.h
thr.h
tiio.h
time.h Ensure that all values of ns, us and ms work for {n,u,m}stosbt 2018-11-20 07:11:23 +00:00
timeb.h
timeet.h
timeffc.h
timepps.h
timers.h
times.h
timespec.h
timetc.h
timex.h
tree.h
tslog.h
tty.h Avoid fixing the tty_info() buffer size in tty.h. 2018-11-06 23:41:44 +00:00
ttycom.h
ttydefaults.h
ttydevsw.h
ttydisc.h
ttyhook.h
ttyqueue.h
turnstile.h
types.h sys/types.h: avoid using terse macro _M 2018-11-02 20:48:29 +00:00
ucontext.h
ucred.h
uio.h
umtx.h
un.h
unistd.h
unpcb.h
user.h Restore the API of the kf_sa_local and kf_sa_peer members. 2018-09-24 18:20:38 +00:00
utsname.h
uuid.h
vdso.h
vmem.h Don't import 0 into vmem quantum caches. 2018-10-22 16:16:42 +00:00
vmmeter.h Add more NUMA-specific low memory predicates. 2018-09-24 19:24:17 +00:00
vnode.h Only call sigdeferstop() for NFS. 2018-10-23 21:43:41 +00:00
vtoc.h
wait.h
watchdog.h
zlib.h
zutil.h