Commit Graph

192 Commits

Author SHA1 Message Date
ozaki-r be0f86d642 Adjust userland commands for struct inpcb separation
Only kvm users are affected.
2022-10-28 05:27:16 +00:00
ozaki-r 1fc70a0860 Adjust userland commands for struct inpcb integration
Only kvm users are affected.
2022-10-28 05:24:07 +00:00
simonb 77228a74f8 Add basic ZFS support to fstat(1).
XXX: Use a local zfs_znode.h for a znode_t definition because the ZFS
kernel code makes it too hard to include headers from userland.
2022-06-19 11:31:19 +00:00
isaki baa8677bbf Support audio descriptor for fstat(1).
sys/dev/audio/*.h: export only what we need for fstat.
2020-09-13 04:14:48 +00:00
christos f55490be1e Provide a helpful error message if we don't have privs to read kernel
addresses.
2020-08-26 23:08:29 +00:00
christos 485ee48134 nuke random stuff that does not exist anymore. 2020-05-02 18:42:30 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
wiz 2555b24764 Use \(em. 2019-09-06 19:05:04 +00:00
christos ebe962e4c8 Add -O to print offsets; align columns properly. 2019-09-06 17:08:22 +00:00
thorpej 68e270a267 Implement support for "pshared" POSIX semaphores.
Fixes lib/53273 (and Firefox's multi-process tab feature).
2019-02-03 03:20:23 +00:00
mrg fbffadb9f8 - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
  this case, and thus can't be marked __dead easily
2019-02-03 03:19:25 +00:00
msaitoh 204f26c6d9 Print BPF direction correctly. 2018-06-26 10:00:25 +00:00
msaitoh 3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
nat 911089b591 Update fstat for audio(4) and pad(4) devices.
XXX - pullup 8.

Ok christos@.
2018-06-04 01:42:49 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
chs ffdbc0ccea rearrange sys/mount.h so that all of the kernel-only parts are together
and not exposed to userland, except do expose struct mount if __EXPOSE_MOUNT
is defined.  define __EXPOSE_MOUNT in the kmem grovellers that want
the definition.  needed for ZFS.
2017-06-09 00:13:29 +00:00
christos f51d1f25b9 Print the interface for bpf. 2016-12-30 21:08:23 +00:00
mrg 0537635d0c for 64 bit mips platforms where we built userland largely as n32 by
default, build a handful of tools as n64 so they work properly.

unfortunately, they're also static as dynamic n64 has a problem.

of these tools pstat is probably the lowest hanging fruit to convert
to sysctl.  systat would be close were it not for the netstat screen,
which includes netstat itself.

the rest are difficult to perhaps foolish.


the upside is that netstat, pmap and fstat all work properly now.
2016-12-23 10:19:57 +00:00
christos 3c25de4497 put _KMEMUSER in the Makefile 2016-01-23 16:12:03 +00:00
christos 2732a80b37 Add rnd ops. 2015-12-30 18:15:38 +00:00
christos dade5d6c98 print the tag symbolically if we don't support it. 2015-12-22 23:35:21 +00:00
mlelstv 170fbd6544 Resolve names of datagram services correctly. 2015-03-08 06:46:51 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
tls ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
christos d2bf840533 fix protocol printing order. 2014-02-14 20:43:34 +00:00
christos c7b4698e4c make fstat -f search for unix sockets. 2014-01-17 03:28:01 +00:00
mlelstv 9a7a6e815f Fix output for -A -f ... 2013-12-15 18:56:59 +00:00
wiz 82c52eb924 sync usage with man page 2013-12-15 09:21:03 +00:00
wiz 73135dc321 Sort SYNOPSIS and option descriptions. Bump date for previous. 2013-12-15 09:20:48 +00:00
mlelstv b3d56b5ecb New -A option. Add an output column with the address of the
kernel object (vnode or file) that can be matched with prstat(8) output.
2013-12-15 08:16:24 +00:00
christos 04908d82dd use correct function and symbolic constants 2013-10-19 15:56:05 +00:00
christos 35be7e66a7 use new scopeid functions 2013-10-19 00:28:38 +00:00
christos 3c6b5224e0 avoid pointer gymnastics 2013-10-18 20:18:42 +00:00
riastradh a7f90b2fd2 Fix races in /dev/u?random initialization and accounting.
- Push /dev/random `information-theoretic' accounting into cprng(9).
- Use percpu(9) for the per-CPU CPRNGs.
- Use atomics with correct memory barriers for lazy CPRNG creation.
- Remove /dev/random file kmem grovelling from fstat(1).
2013-07-01 15:22:00 +00:00
riastradh 6290b0987e Rework rndsink(9) abstraction and adapt arc4random(9) and cprng(9).
rndsink(9):
- Simplify API.
- Simplify locking scheme.
- Add a man page.
- Avoid races in destruction.
- Avoid races in requesting entropy now and scheduling entropy later.

Periodic distribution of entropy to sinks reduces the need for the
last one, but this way we don't need to rely on periodic distribution
(e.g., in a future tickless NetBSD).

rndsinks_lock should probably eventually merge with the rndpool lock,
but we'll put that off for now.

cprng(9):
- Make struct cprng_strong opaque.
- Move rndpseudo.c parts that futz with cprng guts to subr_cprng.c.
- Fix kevent locking.  (Is kevent locking documented anywhere?)
- Stub out rump cprng further until we can rumpify rndsink instead.
- Strip code to grovel through struct cprng_strong in fstat.
2013-06-23 02:35:23 +00:00
christos 3d7bb1da45 support printing rnd descriptor info 2012-11-25 15:30:28 +00:00
christos 0548a80ae0 return stuff for ksem 2012-11-25 01:05:49 +00:00
christos c7c1f1a254 - add more debugging.
- in misctrans() we need the file index not the file type.
2012-11-25 00:36:23 +00:00
alnsn 4d1ae9a9af Report jit'ed bpf fildes in fstat. 2012-10-27 22:38:07 +00:00
christos 0d87ef641d print major device numbers symbolically from kinfo_drivers 2012-10-19 02:49:52 +00:00
christos 902a40f133 more info for unix sockets. XXX: chroot handling 2012-10-19 02:11:25 +00:00
wiz fde0458761 - In the example for `-f', reference a directory that is actually
available in a default installation (/usr/src isn't);
- put together two lines which belong to the same sentence;
- remove a spurious space character;
- remove unneeded consecutive argument for `.Nm' macro.

From Bug Hunting.
2012-10-03 19:35:08 +00:00
christos 8e13556964 fix non-numeric address and port printing. 2012-09-26 23:01:04 +00:00
christos 0b08384416 byte swap the inet6 ports. 2012-03-24 21:51:23 +00:00
chs 585f34003b fix rdev reporting for UFS2 and ext2fs. 2011-10-09 21:16:00 +00:00
jnemeth e894be756a add an xref to fstat(2) 2011-10-08 22:16:03 +00:00
mrg 81a1075469 apply some (uintptr_t) so that printing printers works on i386 (likely
all 32 bit.)
2011-09-23 07:31:39 +00:00
christos a0af16e360 - factor out common code in the inet and inet6 printing.
- add appletalk (ddp) support.
2011-09-22 17:27:50 +00:00
christos 2ba0028160 - remove bogus casts
- print recycled vnode flags
2011-09-10 18:35:28 +00:00
christos ebb6dc2ee4 add libutil. 2011-09-10 18:34:54 +00:00