freebsd-nq/sys/sys
Mark Johnston 22e406c80b Rework and simplify the ksyms(4) implementation.
- Store the symbol table contents in an anonymous swap-backed object. Have
  mmap(/dev/ksyms) map that object, and stop mapping the symbol table into
  the calling process in ksyms_open(). Previously we would cache a pointer
  to the pmap of the opening process, and mmap(/dev/ksyms) would create a
  mapping using the physical address found by a pmap lookup at the initial
  mapping address. However, this assumes that the cached pmap is valid,
  which may not be the case. [1]
- Remove the ksyms ioctl interface. It appears to have been added to work
  around a limitation in libelf that no longer exists; see r321842.
  Moreover, the interface is difficult to support and isn't present in
  illumos. Since ksyms was added specifically to support lockstat(1), it
  is expected that this removal won't have any real impact.
- Simplify ksyms_read() to avoid unnecessary copying.
- Don't call the device handle destructor if we fail to capture a snapshot
  of the kernel's symbol table. devfs will do that for us.

Reported by:	Ilja van Sprundel <ivansprundel@ioactive.com> [1]
Reviewed by:	kib (previous revision)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11789
2017-08-03 00:38:13 +00:00
..
disk
_bitset.h
_bus_dma.h
_callout.h
_cpuset.h
_ffcounter.h
_iovec.h
_kstack_cache.h
_lock.h
_lockmgr.h
_mutex.h
_null.h
_pctrie.h Add pctrie_init() and vm_radix_init() to initialize generic pctrie and 2017-07-19 20:52:47 +00:00
_pthreadtypes.h
_rmlock.h
_rwlock.h
_semaphore.h
_sigset.h
_sockaddr_storage.h
_stack.h
_stdint.h
_sx.h
_task.h
_termios.h Use __BSD_VISIBLE test instead checking for absense of _POSIX_SOURCE. 2017-05-24 09:25:13 +00:00
_timespec.h
_timeval.h
_types.h Define a new __INO64 macro in <sys/_types.h>, to indicate the system 2017-05-26 16:29:55 +00:00
_ucontext.h
_umtx.h
_unrhdr.h
_vm_domain.h
aac_ioctl.h
acct.h Solve the y2038 problem for powerpc 2017-06-26 02:25:19 +00:00
acl.h
agpio.h
aio.h
alq.h
apm.h
assym.h
ata.h Fix IORDY bits definition. 2017-07-29 13:54:28 +00:00
bio.h
bitset.h Fix BIT_FLS(). 2017-07-11 12:35:44 +00:00
bitstring.h
blist.h The blist_meta_* routines that process a subtree take arguments 'radix' and 2017-08-01 03:51:26 +00:00
boot.h
buf_ring.h
buf.h Add the definition of maxbcachebuf to sys/buf.h. 2017-06-19 22:07:53 +00:00
bufobj.h
bus_dma_internal.h Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
bus_dma.h Clean up MD pollution of bus_dma.h: 2017-07-01 05:35:29 +00:00
bus.h
busdma_bufalloc.h
callout.h
capability.h
caprights.h
capsicum.h
cdefs.h
cdio.h
cdrio.h
cfictl.h
chio.h
clock.h Add clock_schedule(), a feature that allows realtime clock drivers to 2017-07-31 01:18:21 +00:00
cnv.h
condvar.h
conf.h
cons.h
consio.h
copyright.h Bump copyright year. 2017-07-30 06:27:32 +00:00
counter.h
cpu.h
cpuctl.h
cpuset.h
ctype.h
dataacq.h
devicestat.h
devmap.h
digiio.h
dir.h
dirent.h Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
disk_zone.h
disk.h
disklabel.h
diskmbr.h
dkstat.h
dnv.h
domain.h
dtrace_bsd.h
dvdio.h
efi.h efi: restrict visibility of EFIABI_ATTR-declared functions 2017-07-20 06:47:06 +00:00
efiio.h
elf32.h
elf64.h
elf_common.h
elf_generic.h
elf.h
endian.h
errno.h
eui64.h
event.h Add abstime kqueue(2) timers and expand struct kevent members. 2017-06-17 00:57:26 +00:00
eventhandler.h
eventvar.h
exec.h
extattr.h
fail.h
fbio.h
fcntl.h
fdcio.h
file.h
filedesc.h
filio.h
firmware.h
fnv_hash.h
gmon.h
gpio.h
gpt.h
gtaskqueue.h
gzio.h
hash.h
hhook.h
iconv.h
imgact_aout.h
imgact_binmisc.h
imgact_elf.h
imgact.h
inflate.h
interrupt.h
intr.h
ioccom.h
ioctl_compat.h
ioctl.h
iov_schema.h
iov.h
ipc.h
ipmi.h
jail.h - Extend pr_allow flags visually to 32 bits, to make it more obvious at first look how much flags we still 2017-07-09 06:40:16 +00:00
joystick.h
kbio.h
kdb.h
kenv.h
kernel.h
kerneldump.h
khelp.h
kobj.h - Also outside of the KOBJOPLOOKUP macro - which in turn is used by 2017-05-08 21:08:39 +00:00
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
lock_profile.h
lock.h
lockf.h
lockmgr.h
lockstat.h
loginclass.h
mac.h
malloc.h
mbpool.h
mbuf.h
mchain.h
md4.h
md5.h
mdioctl.h Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
memdesc.h
memrange.h
mman.h Implement address space guards. 2017-06-24 17:01:11 +00:00
module_khelp.h
module.h Add the infrastructure to support loading multiple versions of TCP 2017-06-08 20:41:28 +00:00
mount.h Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
mouse.h
mpt_ioctl.h
mqueue.h
msg.h
msgbuf.h
mtio.h
mutex.h
namei.h
nlist_aout.h
numa.h
nv.h
osd.h
param.h Add kernel support for the NFS client forced dismount "umount -N" option. 2017-07-29 19:52:47 +00:00
pciio.h
pcpu.h
pctrie.h Make the number of children for pctrie node available outside subr_pctrie.c. 2017-07-27 16:40:14 +00:00
pioctl.h
pipe.h
pmc.h Fix HWPMC interrupt handling in Counting Mode 2017-06-13 18:51:23 +00:00
pmckern.h
pmclog.h
poll.h
posix4.h
power.h
priority.h
priv.h
proc.h Move struct syscall_args syscall arguments parameters container into 2017-06-12 21:03:23 +00:00
procctl.h
procdesc.h
procfs.h
protosw.h
ptio.h
ptrace.h Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps. 2017-06-29 21:31:13 +00:00
queue.h
racct.h
random.h
rangelock.h
rctl.h
reboot.h
refcount.h Correct fences for sys/refcount.h. 2017-06-30 16:16:21 +00:00
regression.h
resource.h
resourcevar.h
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 sglist.h: Fix sg_refs signedness to match refcount(9) 2017-06-22 15:52:18 +00:00
shm.h
sigio.h
signal.h Store a 32-bit PT_LWPINFO struct for 32-bit process core dumps. 2017-06-29 21:31:13 +00:00
signalvar.h
sleepqueue.h
slicer.h
smp.h
snoop.h
sockbuf.h Provide sbsetopt() that handles socket buffer related socket options. 2017-06-25 01:41:07 +00:00
socket.h Listening sockets improvements. 2017-06-08 21:30:34 +00:00
socketvar.h Listening sockets improvements. 2017-06-08 21:30:34 +00:00
sockio.h Persistently store NIC's hardware MAC address, and add a way to retrive it 2017-05-10 22:13:47 +00:00
sockopt.h Rename accept filter getopt/setopt functions, so that they are prefixed 2017-06-02 17:49:21 +00:00
sockstate.h
soundcard.h
spigenio.h
stack.h
stat.h Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
statvfs.h
stdatomic.h
stddef.h
stdint.h
sun_disklabel.h
sx.h
syscall.h Regen. 2017-06-17 00:58:19 +00:00
syscall.mk Regen. 2017-06-17 00:58:19 +00:00
syscallsubr.h Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
sysctl.h
sysent.h Correct sysent flags for dynamically loaded syscalls. 2017-07-14 09:34:44 +00:00
syslimits.h
syslog.h
sysproto.h Regen. 2017-06-17 00:58:19 +00:00
systm.h Allow sysctl kern.vm_guest to return bhyve when running under bhyve. 2017-06-08 04:02:14 +00:00
taskqueue.h Add taskqueue_enqueue_timeout_sbt(), because sometimes you want more control 2017-07-31 00:54:50 +00:00
terminal.h
termios.h
thr.h
tiio.h
time.h Add inline functions to convert between sbintime_t and decimal time units. 2017-07-29 17:00:23 +00:00
timeb.h
timeet.h
timeffc.h
timepps.h
timers.h
times.h
timespec.h
timetc.h
timex.h
tree.h
tty.h Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ttycom.h
ttydefaults.h
ttydevsw.h
ttydisc.h
ttyhook.h
ttyqueue.h
turnstile.h
types.h For makedev(), cast the minor argument to unsigned type explicitely, 2017-08-02 14:54:54 +00:00
ucontext.h
ucred.h
uio.h
umtx.h
un.h
unistd.h
unpcb.h Remove write only flag UNP_HAVEPCCACHED. 2017-06-02 17:39:05 +00:00
user.h procstat(1): Add TCP socket send/recv buffer size 2017-05-26 22:17:44 +00:00
utsname.h
uuid.h Add a helper function for comparing struct uuids. 2017-06-12 20:14:44 +00:00
vdso.h
vmem.h
vmmeter.h
vnode.h Implement proper Linux /dev/fd and /proc/self/fd behavior by adding 2017-08-01 03:40:19 +00:00
vtoc.h
wait.h
watchdog.h
zlib.h
zutil.h