opnsense-src/usr.bin
Peter Wemm 43151ee6cf Merge user/peter/kinfo branch as of r185547 into head.
This changes struct kinfo_filedesc and kinfo_vmentry such that they are
same on both 32 and 64 bit platforms like i386/amd64 and won't require
sysctl wrapping.

Two new OIDs are assigned.  The old ones are available under
COMPAT_FREEBSD7 - but it isn't that simple.  The superceded interface
was never actually released on 7.x.

The other main change is to pack the data passed to userland via the
sysctl.  kf_structsize and kve_structsize are reduced for the copyout.
If you have a process with 100,000+ sockets open, the unpacked records
require a 132MB+ copyout.  With packing, it is "only" ~35MB.  (Still
seriously unpleasant, but not quite as devastating).  A similar problem
exists for the vmentry structure - have lots and lots of shared libraries
and small mmaps and its copyout gets expensive too.

My immediate problem is valgrind.  It traditionally achieves this
functionality by parsing procfs output, in a packed format.  Secondly, when
tracing 32 bit binaries on amd64 under valgrind, it uses a cross compiled
32 bit binary which ran directly into the differing data structures in 32
vs 64 bit mode.  (valgrind uses this to track file descriptor operations
and this therefore affected every single 32 bit binary)

I've added two utility functions to libutil to unpack the structures into
a fixed record length and to make it a little more convenient to use.
2008-12-02 06:50:26 +00:00
..
alias Use the "builtin" shell function to make sure that the requested 2005-10-24 22:32:19 +00:00
apply It's `apply echo *'' that is similar to ls -1'', not `apply echo a*''. 2006-12-13 08:13:14 +00:00
ar Fix build. 2008-09-21 00:27:16 +00:00
asa Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
at Use NULL instead of 0 for the return value of fopen(). 2007-09-21 01:55:11 +00:00
atm Fix build in the !NOATM case by using the begemot library in place of 2004-09-24 22:10:34 +00:00
awk Allow awk (the one true one!) to handle 64 files instead of just 20. 2008-03-27 01:33:26 +00:00
banner o Check that -w width is not above maximum. Use DWIDTH instead of 2006-11-22 21:05:17 +00:00
basename Cross-reference basename(3) and dirname(3). 2006-03-16 17:21:52 +00:00
biff Fix markup. 2006-12-28 04:58:38 +00:00
bluetooth Fix build 2008-07-29 17:02:00 +00:00
brandelf Fix markup. 2007-03-09 14:36:18 +00:00
bsdiff Portability fix for non-POSIX operating systems: Open files in binary mode. 2006-12-05 20:22:14 +00:00
bzip2 Update for bzip2 1.0.4 import. 2007-03-28 07:48:03 +00:00
bzip2recover Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
c89 Reduce diffs with c99(1). 2007-03-10 07:10:01 +00:00
c99 Bump the original revision of c89(1). 2007-03-10 07:11:20 +00:00
calendar Add myself 2008-11-18 14:05:11 +00:00
cap_mkdb Add endianness support to cap_mkdb(1), useful for cross builds. 2005-02-22 23:29:54 +00:00
catman Prepare for MACHINE and hw.machine switching to "pc98" on FreeBSD/pc98. 2005-12-05 14:22:12 +00:00
chat Merge revisions 1.10 and 1.11 from DragonFly: 2008-03-07 00:01:19 +00:00
checknr Fix some "in in" typos in comments. 2008-03-26 07:32:08 +00:00
chkey Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00
chpass Fix bug introduced in rev 1.23: 2006-09-25 15:06:24 +00:00
cksum Change a use of u_int32_t to uint32_t. 2008-05-15 20:04:36 +00:00
cmp add __unused to succeed at WARNS=6 2008-07-10 13:26:46 +00:00
col The variables i and tot don't need to be static. 2006-07-18 07:16:25 +00:00
colcrt Expand *n't contractions. 2005-02-13 22:25:33 +00:00
colldef follow style(9) more closely and list sys/types.h first after sys/defs.h. 2008-01-01 10:04:10 +00:00
colrm Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
column Fix the fix in rev. 1.15 so that we jump to the next column 2006-12-15 17:47:25 +00:00
comm Similar to changes previously made to src/usr.bin/uniq/uniq.c, 2008-05-28 14:13:35 +00:00
compile_et Style: move .PATH to where it belongs. 2005-10-14 15:50:22 +00:00
compress -mdoc sweep. 2005-11-18 10:36:29 +00:00
cpio Format the output of -itv for real. In particular: 2008-11-29 20:22:02 +00:00
cpuset MFp4: 2008-11-29 14:32:14 +00:00
csplit Document input line length limit. 2005-01-25 22:32:48 +00:00
csup Update make glue for csup-snap-20060313. 2006-03-14 03:53:50 +00:00
ctags cleanup code: remove unnecessary and useless void cast 2007-02-04 20:07:07 +00:00
cut - Adopt the short description from POSIX as it better matches the 2007-02-28 10:13:32 +00:00
dig Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
dirname Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
du Restore (intmax_t) casts I lost during the last change & unbreak the build. 2008-11-06 23:55:28 +00:00
ee Correct insecure temporary file usage in texindex. [06:01] 2006-01-11 08:02:16 +00:00
elf2aout Because optarg and optind are defined in unistd.h, 2006-04-21 09:39:51 +00:00
elfdump s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/ 2006-01-28 17:58:22 +00:00
enigma Markup nits. 2006-12-24 19:55:38 +00:00
env Update the date on the man-page to reflect the date that the '-u name' 2008-05-06 16:06:02 +00:00
expand Document that unexpand(1)'s -a and -t options are exclusive. 2006-10-13 16:22:25 +00:00
false
fetch Use the SCHEME_ knobs rather than knowing what they expand to. 2008-08-21 14:12:34 +00:00
file Christos decided to keep the manpages in mdoc(7) format, 2008-01-30 12:56:59 +00:00
file2c Apply style(9) to usage(), fix markup of the manpage. 2007-10-30 17:49:00 +00:00
find Fix SYNOPSIS and usage(). 2008-03-03 08:32:58 +00:00
finger Restore the ".Sh BUGS" line that was accidentally removed 2007-04-12 08:22:49 +00:00
fmt Prevent strange crashes in fmt with absurd goal lengths introduced by the 2007-10-17 11:41:40 +00:00
fold Mention what underlining is meant here. 2006-12-15 11:23:59 +00:00
from Improve markup. 2006-12-18 15:36:31 +00:00
fstat Merge latest DTrace changes from Perforce. 2008-11-05 19:39:37 +00:00
fsync Correct some style nits that I have mistakenly submitted as 2005-01-26 15:17:25 +00:00
ftp Obey MK_INET6_SUPPORT. 2006-07-27 14:20:14 +00:00
gcore Use %zd for size_t. With this gcore(1) is WARNS=6 clean. 2008-07-18 23:37:05 +00:00
gencat Our bsd.*.mk only supports 6 WARNS levels and we should not use higher values 2005-06-30 11:56:31 +00:00
getconf o confstr(3) returns 0 on error. Check the return value accordingly. 2006-12-06 12:00:26 +00:00
getent cleanup code: remove superfluous comma at end of enumeration 2007-02-04 20:52:57 +00:00
getopt getopt.c is public domain. Add a comment to that effect. 2008-05-15 19:27:52 +00:00
gprof Add gprof MIPS MD header and enable building gprof. 2008-09-02 15:35:47 +00:00
gzip Mark functions as __dead2 in order to help the LLVM static checker 2008-08-04 07:36:53 +00:00
head Fix build on architectures where off_t is signed by casting to uintmax_t 2007-01-11 20:23:01 +00:00
hesinfo Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
hexdump Document the -d option. 2006-12-24 14:23:35 +00:00
host Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
id Fix id -A when the subject has an extended subject token associated with 2007-10-14 00:52:30 +00:00
indent initialize variable (WARNS=6) 2006-09-13 05:06:12 +00:00
ipcrm Add the ability to clean up all shared memory segments which are 2007-12-25 00:52:24 +00:00
ipcs Add the ability to clean up all shared memory segments which are 2007-12-25 00:52:24 +00:00
join Improve markup and do some minor wordsmithing. 2006-12-21 10:59:48 +00:00
jot Use explicit braces to avoid ambiguous else. 2006-12-09 15:23:20 +00:00
kdump Remove netatm from HEAD as it is not MPSAFE and relies on the now removed 2008-05-25 22:11:40 +00:00
keylogin Deal with double whitespace. 2004-07-03 00:24:45 +00:00
keylogout Removed unnecessary dependencies on librpcsvc. 2004-02-04 11:59:08 +00:00
killall Use strlcpy() where appropriate. 2008-11-19 00:14:15 +00:00
ktrace Spell -t option's argument by name. 2008-04-02 09:41:29 +00:00
ktrdump Skip format flags, when parsing ktr_desc. 2006-01-12 22:32:07 +00:00
lam Document that jot(1), rs(1), and lam(1) first appeared in 4.2BSD. 2006-10-20 04:31:01 +00:00
last Expand *n't contractions. 2005-02-13 22:25:33 +00:00
lastcomm Increase precision of time values in the process accounting 2007-05-22 06:51:38 +00:00
ldd A few style and whitespace fixes. 2008-08-02 12:04:59 +00:00
leave Fixed the abuses of .Ql visible on stderr in troff mode. 2002-12-23 16:04:51 +00:00
less Resolve conflicts; Update defines.h to reflect latest change. 2007-11-16 22:24:31 +00:00
lessecho Hook lessecho(1) to build. 2006-08-20 15:52:17 +00:00
lesskey
lex Mark functions as __dead2 in order to help the LLVM static checker 2008-08-04 01:25:48 +00:00
limits Add support for RLIMIT_NPTS to limits(1). 2008-09-02 19:13:24 +00:00
locale Xref setlocale(3), bump document date. 2005-11-01 19:36:17 +00:00
locate Use RUSAGE_SELF for the current process instead of hardcoded value 2008-09-02 02:59:38 +00:00
lock Expand *n't contractions. 2005-02-13 22:25:33 +00:00
lockf Lockf was exiting with status 1 if the command did not exit normally. 2008-08-21 07:36:17 +00:00
logger Minor style(9) nit. 2008-02-05 17:34:44 +00:00
login Add a cross-reference to newgrp(1). 2007-11-30 11:02:36 +00:00
logins Fix markup. 2004-03-06 23:36:41 +00:00
logname Say "utility", not "function". 2006-12-26 10:37:37 +00:00
look Remove break after return. 2006-07-18 10:19:46 +00:00
lorder Document the NM environment variable. 2006-10-25 09:40:07 +00:00
lsvfs Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
m4 Use NULL instead of 0 for the return value of fopen(). 2007-09-21 01:55:11 +00:00
mail Use static storage-class specifier where appropriate. 2007-11-08 11:13:03 +00:00
make Since in some cases (when found obsolete) 'make' can be builded earlier 2008-09-29 16:13:28 +00:00
makewhatis Teach makewhatis.c to treat .SS with the same severity as .SH. 2007-10-18 12:53:11 +00:00
mesg Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
minigzip Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
ministat Free old arrays if we increase them. 2008-10-16 20:56:09 +00:00
mkdep Sort sections. 2005-01-18 13:43:56 +00:00
mkfifo Fix markup. 2006-12-15 14:14:17 +00:00
mklocale Understand newly introduced "ASCII" encoding 2008-01-22 00:04:50 +00:00
mkstr More markup fixes. 2007-03-04 08:24:13 +00:00
mktemp Markup fixes. 2006-09-29 15:20:48 +00:00
mkuzip Support character device as input file. 2007-03-06 17:04:15 +00:00
msgs Never use getenv("HOME") without checking for NULL and non-zero 2007-10-30 03:44:10 +00:00
mt Note what options are only for DDS drives. 2008-01-21 22:08:05 +00:00
nc Fix bugs in the previous commit. 2005-02-07 08:44:34 +00:00
ncal Document incorrect handling of multibyte characters. 2005-10-23 01:37:25 +00:00
ncplist getopt(3) returns -1, not EOF when out of args. 2007-02-05 07:35:23 +00:00
ncplogin getopt(3) returns -1, not EOF. 2008-02-19 07:09:19 +00:00
netstat Fix a printing problem when using the -L flag to netstat caused 2008-11-28 18:35:14 +00:00
newgrp Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
newkey Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00
nfsstat Add a -z flag to nfsstat which zeros the NFS statistics after displaying 2007-10-18 16:38:07 +00:00
nice Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
nl o Really commit typo fixes to HEAD. 2007-03-25 18:37:59 +00:00
nohup Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
nslookup Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
nsupdate Update bmake glue for the BIND 9.4.1 import. 2007-06-02 23:19:58 +00:00
objformat Bah. Kris says the default-to-a.out knowledge has migrated into the 2007-01-25 23:12:19 +00:00
opieinfo Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
opiekey
opiepasswd Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar 2004-11-03 18:01:21 +00:00
pagesize
passwd Markup nits. 2007-11-07 07:59:38 +00:00
paste WARNS=6 chocked on unitialized variable. 2006-09-12 05:08:36 +00:00
pathchk Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
pr Fix misspelled 'argument' and try to make the sentence into English. 2005-10-26 17:37:54 +00:00
printenv Simplify. 2006-12-26 12:43:12 +00:00
printf POSIX says that octal escapes have the format \ddd in the format string, 2008-08-02 06:02:02 +00:00
procstat Merge user/peter/kinfo branch as of r185547 into head. 2008-12-02 06:50:26 +00:00
quota Make quota(1) to compile with WARNS=6: 2008-08-04 00:43:49 +00:00
renice Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
rev Make usage() 'static'. 2008-06-08 12:43:02 +00:00
rlogin len and len2 work better as size_t 2005-11-13 21:03:56 +00:00
rpcgen When generating thread-safe server code, handle procedures with void return 2008-08-12 13:38:06 +00:00
rpcinfo rpcinfo(1) doesn't depend on INET6 explicitly. 2006-07-27 13:47:02 +00:00
rs Setting a variable to the same value twice doesn't actually make it 2008-08-04 06:39:52 +00:00
rsh - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
rup Backport markup fixes from a translated version of a manpage. 2007-02-28 10:22:19 +00:00
ruptime Initialize variable "now" before using it (it is used by the LEFTEARTH 2008-03-17 18:31:43 +00:00
rusers Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
rwall Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
rwho It's actually 11 minutes when the machine is assumed to be down and removed 2005-08-07 11:48:44 +00:00
script Deal with double whitespace. 2004-07-03 00:24:45 +00:00
sed Fix the code to conform to the "or more" part of the following POSIX 2008-11-11 17:15:57 +00:00
setchannel Add support for selecting from multiple tuners. 2007-02-25 01:28:37 +00:00
shar Remove superfluous eofmarker. 2008-06-17 18:56:04 +00:00
showmount Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
smbutil Make smbfs capable to use 16bit char set in filenames. 2005-05-04 15:05:46 +00:00
sockstat Add -L to usage(). 2008-05-19 11:35:11 +00:00
split Add a -n option to split(1) to split files into N chunks rather than 2008-03-16 15:15:32 +00:00
stat The referenced section name is 'Formats', not 'FORMATS'. 2008-04-29 07:35:31 +00:00
su - add the -m option to the example commands because they would fail w/o it 2008-07-01 20:56:23 +00:00
systat ANSIfy and remove register. 2008-01-16 19:27:43 +00:00
tabs Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
tail Nuking the temporary pointer once it is properly tracked in local storage. 2007-11-22 01:51:46 +00:00
talk ANSIfy function prototypes. While I am there, constify some parameters and 2008-04-28 21:08:42 +00:00
tar When deciding which characters (of a filename, for instance) 2008-11-29 20:06:53 +00:00
tcopy Document some details better, making it easier to translate. 2006-12-20 15:34:01 +00:00
tee - Steal short description from POSIX; it's more technical and was 2007-11-13 11:34:20 +00:00
telnet Fix conflicts after heimdal-1.1 import and add build infrastructure. Import 2008-05-07 13:53:12 +00:00
tftp ANSIfy, plus constify interfaces where possible. 2008-10-13 23:10:19 +00:00
time Cast to intmax_t to print tv_sec in struct timeval. 2007-05-07 12:23:23 +00:00
tip Relinquish exclusive TTY access when tip(1) or cu(1) exit. 2008-05-03 02:29:02 +00:00
top Make the CPU column in top always be 2 characters and print in decimal 2008-10-01 22:01:07 +00:00
touch Update to match revision 1.23 of touch.c. 2007-04-10 07:24:47 +00:00
tput At least one argument is required. 2006-10-12 21:10:55 +00:00
tr o Remove duplicate includes. 2007-01-20 08:24:02 +00:00
true
truncate Don't close file descriptor number <whatever random garbage was on the 2008-08-04 06:48:54 +00:00
truss Try to make this code slightly less painful to read. 2008-07-31 17:15:21 +00:00
tset Reduce compiler warning: variable might be used uninitialized, by giving 2005-05-29 15:49:53 +00:00
tsort - Remove the ambiguity in the input format description. 2006-12-27 14:56:18 +00:00
tty Fix markup nits, add the EXIT STATUS section. 2006-12-13 20:15:49 +00:00
ul Fix markup. 2007-02-27 12:06:02 +00:00
uname Sort sections. 2005-01-18 13:43:56 +00:00
unexpand Document that unexpand(1)'s -a and -t options are exclusive. 2006-10-13 16:22:25 +00:00
unifdef Add AUTHORS section[*] and fix HISTORY section. 2008-05-02 16:23:47 +00:00
uniq Fix truncation of lines at LINE_MAX characters by dynamically 2008-02-08 23:04:13 +00:00
units Add limited support for units that are related by affine rather 2008-08-16 16:27:41 +00:00
unvis
unzip Update man page for -t. 2008-06-30 17:16:05 +00:00
usbhidaction Add support using an alternate table file to usbhidaction(1). 2007-06-30 03:58:01 +00:00
usbhidctl usbhidctl appears to not report features and write size correctly 2007-12-21 03:40:36 +00:00
users
uudecode Start the dreaded NOFOO -> NO_FOO conversion. 2004-12-21 08:47:35 +00:00
uuencode - Remove MLINKS to nonexistant manpages 2005-07-14 20:29:08 +00:00
vacation Remove kludges intended to support src trees with partial obj trees. 2005-06-10 06:12:53 +00:00
vgrind Manual page tweaks. 2006-08-29 18:11:20 +00:00
vi Replaced afterinstall: with equivalent FILES and SYMLINKS. 2004-10-18 17:16:01 +00:00
vis Nits. 2006-12-23 19:15:39 +00:00
vmstat Fix comment typo that managed to sneak in when I copy pasted some 2008-11-04 18:20:54 +00:00
w w(1) uses strftime %b with to print the abbreviated month name 2008-08-20 12:32:19 +00:00
wall Fix some bugs in wall(1): 2008-01-15 07:40:30 +00:00
wc Prevent a line from being broken on a line boundary. 2006-12-21 22:59:07 +00:00
what Polish markup and wording. 2006-12-14 00:02:44 +00:00
whereis Make the search for sources in PATH_PORTS more accurate. I only 2008-06-20 08:39:42 +00:00
which Refine the previous revision. 2006-12-13 12:09:41 +00:00
who In wall and who, check that the utmp entry isn't stalled, as it is done in w. 2006-02-21 13:01:00 +00:00
whois Use proper type cast for ctype macro 2007-04-14 14:32:48 +00:00
window ANSIfy the wwend function. 2008-11-18 21:06:49 +00:00
write write(1) needs to strip off the leading /dev/ from the tty name for the 2007-11-12 20:02:21 +00:00
xargs Revive '-opt' flags which I accidentally removed. 2008-01-27 16:20:36 +00:00
xinstall Give a better description when a install of multiple files fails 2007-12-14 08:46:57 +00:00
xlint MFp4(mips2-jnpr): 2008-04-04 21:35:13 +00:00
xstr Improve temporary file handling 2008-05-13 09:42:03 +00:00
yacc Setting a variable to the same value twice doesn't actually make it 2008-08-04 06:39:52 +00:00
yes #include <err.h> to make yes warns clean again. 2002-11-09 21:00:39 +00:00
ypcat Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ypmatch Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
ypwhich Fix markup nit. 2006-12-28 10:58:06 +00:00
Makefile Add back ar(1) which was accidentally decoupled in r183242. 2008-09-24 20:41:35 +00:00
Makefile.inc