busdma - Remove filter functionality- Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one
busdma - Remove filter functionality- Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one exception: if_jme.- Remove filter functionality internally and parent tag tracking. Without filter functions, we do not need to keep track of tag ancestry. All inheritance of the parent tag's parameters occurs when creating the new child tag.- rename run_filter() to addr_needs_bounce().- FreeBSD keeps the filtfunc and filtarg arguments but requires them to be NULL.- Drop filterfunc usage from if_jme. In case of "JMC260 chip full mask revision 2", which has a hardware bug when it comes to DMA transfers crossing the 4 GB bounday, the parent buffer tag already limits DMA memory to 32bit address space. As such it should be safe to drop the filterfunc. The filterfunc was checking if the lower 32bits of the physical address used for DMA are all 0. In case of a 32bit address space, the only address where all lower 32-bits are all zero is 0 itself and I am here assuming that the physical address 0 is not used for DMA transfers!Mainly obtained from: FreeBSD (commits 7cb028de, 900907f4, 1228b93b, 3933ff56)
show more ...
kernel - Add per-process capability-based restrictions* This new system allows userland to set capability restrictions which turns off numerous kernel features and root accesses. These restricti
kernel - Add per-process capability-based restrictions* This new system allows userland to set capability restrictions which turns off numerous kernel features and root accesses. These restrictions are inherited by sub-processes recursively. Once set, restrictions cannot be removed. Basic restrictions that mimic an unadorned jail can be enabled without creating a jail, but generally speaking real security also requires creating a chrooted filesystem topology, and a jail is still needed to really segregate processes from each other. If you do so, however, you can (for example) disable mount/umount and most global root-only features.* Add new system calls and a manual page for syscap_get(2) and syscap_set(2)* Add sys/caps.h* Add the "setcaps" userland utility and manual page.* Remove priv.9 and the priv_check infrastructure, replacing it with a newly designed caps infrastructure.* The intention is to add path restriction lists and similar features to improve jailess security in the near future, and to optimize the priv_check code.
kernel: Rename BUILDING_WITH_KERNEL to KERNBUILDDIR.Fits better with e.g. KERNCONFDIR.Add a small paragraph in kmod.mk which was taken from FreeBSD.
kernel: Remove numerous #include <sys/thread2.h>.Most of them were added when we converted spl*() calls tocrit_enter()/crit_exit(), almost 14 years ago. We can nowremove a good chunk of them agai
kernel: Remove numerous #include <sys/thread2.h>.Most of them were added when we converted spl*() calls tocrit_enter()/crit_exit(), almost 14 years ago. We can nowremove a good chunk of them again for where crit_*() areno longer used.I had to adjust some files that were relying on thread2.hor headers that it includes coming in via other headersthat it was removed from.
kernel: Remove unused *.h files from SRCS in kernel module Makefiles.They were found by checking the preprocessed code of the filesin SRCS to see if the header was included at some point.After r
kernel: Remove unused *.h files from SRCS in kernel module Makefiles.They were found by checking the preprocessed code of the filesin SRCS to see if the header was included at some point.After removal, the preprocessed source of a build with the oldMakefiles was compared against one with the changes (for variouskernel configurations and when building just from /usr/src) toverify that the commit leads to no functional change.
kernel - Refactor tty_token, fix SMP performance issues* Remove most uses of tty_token in favor of per-tty tp->t_token. This is particularly important for removing bottlenecks related to PTYs,
kernel - Refactor tty_token, fix SMP performance issues* Remove most uses of tty_token in favor of per-tty tp->t_token. This is particularly important for removing bottlenecks related to PTYs, which are used all over the place. tty_token remains in a few places managing overall registration and global list manipulation.* tty structures are now required to be persistent. Implement a sepearate ttyinit() function. Continue to allow ttyregister() and ttyunregister() calls, but these no longer presume destruction of the structure.* Refactor ttymalloc() to take a **tty pointer and interlock allocations. Allocations are intended to be one-time. ttymalloc() only requires the tty_token for initial allocations.* Remove all critical section use that was combined with tty_token and tp->t_token. Leave only the tokens. The critical sections were hold-overs going all the way back to pre-SMP days.* syscons now gets its own token, vga_token. The ISA VGA code and the framebuffer code also now use this token instead of tty_token.* The keyboard subsystem now uses kbd_token instead of tty_token.* A few remaining serial-like devices (snp, nmdm) also get their own tokens, as well as use the now required tp->t_token.* Remove use of tty_token in the session management code. This fixes a niggling performance path since sessions almost universally go hand-in-hand with fork/exec/exit sequences. Instead we use the already-existing per-hash session token.
kernel/dcons: Fix two more -Wundef issues.
kernel/dcons: Fix -Wundef.
kernel: Include <sys/ttydefaults.h> where appropriate.This is in preparation for moving <sys/termios.h> to <termios.h>.
kernel: Use NULL for pointers in DRIVER_MODULE* calls.
kernel - Fix live lock in vfs_conf.c mountroot>* The mountroot> prompt calls cngetc() to process user input. However, this function hard loops and can prevent other kernel threads from running o
kernel - Fix live lock in vfs_conf.c mountroot>* The mountroot> prompt calls cngetc() to process user input. However, this function hard loops and can prevent other kernel threads from running on the current cpu.* Rearrange the code to use cncheckc() and a 1/25 second tsleep().* Fix a bug in the syscons code where NOKEY was not being properly returned as documented. Modify all use cases to handle NOKEY. This allows us to differentiate between a keyboard present but not key pressed and a keyboard not present.* Pull the automatic polling mode code out of cncheckc() (or more precisely, out of sccncheckc()) and add a new cnpoll() API function to set it manually. This fixes issues in vfs_conf when normal keyboard processing interrupts are operational and cncheckc() is used with a tsleep() delay. The normal processing interrupt wound up eating the keystrokes so the cncheckc() basically always failed. cncheckc() in general also always had a small window of opportunity where a keystroke could be lost due loops on it.* Call cnpoll() in various places, such as when entering the debugger, asking for input in vfs_conf, and a few other places.
kernel: Use DEVMETHOD_END in the drivers.
kernel: Pass a real format string to functions which expect one.This is safer than just passing a random string.A few of these changes might be overly cautious but it doesn'thurt to stick with u
kernel: Pass a real format string to functions which expect one.This is safer than just passing a random string.A few of these changes might be overly cautious but it doesn'thurt to stick with using formats where they are expected moreor less generally.
kernel: Add a few forgotten crit_exit()s and fix a wrong crit_enter().
kernel: Remove most definitions of CDEV_MAJOR.These are no longer needed since we have devfs.A few are left in because they are added to the order in SYSINIT()s.This needs further investigation.
MPSAFE TTY - get rid of tokens in console path* The console path (coming through tty_cons.c) can never block, so do not try to acquire tokens there.Reported-by: Jan Lentfer
MPSAFE - TTY & related drivers* Put kern/tty_* under the tty_token (and acquire the proc_token where needed).* MPSAFE all related drivers (users of kbdsw, linesw and vidsw) with the same tty_
MPSAFE - TTY & related drivers* Put kern/tty_* under the tty_token (and acquire the proc_token where needed).* MPSAFE all related drivers (users of kbdsw, linesw and vidsw) with the same tty_token.* NOTE: syscons.c and scvgarndr.c are not really under this new lock yet as some really strange hangs appear. Some are related to the cursor drawing (which stalls the machine if a token is held) and others are in some other syscons.c functions.
kernel - Remove D_KQFILTER flag* The D_KQFILTER flag is no longer used.
kernel - Tear out device polling* Remove existing (now legacy) code that implements device polling, kq filters are now the "One True (and only) Way"* Add dummy write filters (always true) for d
kernel - Tear out device polling* Remove existing (now legacy) code that implements device polling, kq filters are now the "One True (and only) Way"* Add dummy write filters (always true) for devices: targ, vinum, snp, tw and apm
kernel - Add kq support to tty devices* This is all of the remaining tty devices missing kq support.* vcons, dcons, sysmouse, pts, rp
modules: remove KMODDEPS, it is not used anymore
AMD64 - Fix format conversions and other warnings.
DEVFS - remove dev_ops_add(), dev_ops_get(), and get_dev()
vrevoke/single-user - fix more revoke issues.* vrevoke() no longer clears vp->v_rdev. Doing so interferes with specfs's ability to call dev_dclose(). Fixing this will allow the regular close
vrevoke/single-user - fix more revoke issues.* vrevoke() no longer clears vp->v_rdev. Doing so interferes with specfs's ability to call dev_dclose(). Fixing this will allow the regular close of the vnode to close the underlying device. Since the revoke code detaches the vnode from any user-visible file descriptors the vnode will end up being closed the moment the last referenced to the detached fp goes away.* kill 1 no longer leaves the syscons in a state where both /dev/ttyv0 and /dev/console are marked open (due to the above bug). This state would cause the keyboard to stop working sometimes when dropping into single user.* Add dev_drevoke() and friends. This allows a device to do something when an attempt is made to revoke() the related vnode. TTY and PTY devices now attempt to break out of any ttysleep() operation (such as when processes are blocked in read()). This is advisory and if it fails to break a process out of a blocked condition that process will still detach after the blocked condition is resolved normally.
suser_* to priv_* conversion
12