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/oce: Add missing opt_inet{,6}.h include to get at INET{,6}.All this only affects inactive code because LRO support is missing.
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 - Clean up memory leaks and a stack buffer disclosure bug* Clean up memory leaks, a stack buffer disclosure bug, and a missing priv check in if_oce (which probably never attaches these d
kernel - Clean up memory leaks and a stack buffer disclosure bug* Clean up memory leaks, a stack buffer disclosure bug, and a missing priv check in if_oce (which probably never attaches these days). All in the network subsystem.Reported-by: Ilja van Sprundel
kernel - Rejigger random number generator to be per-cpu 1/2* Refactor all the kernel random number generation code to operate on a per-cpu basis. The csprng, ibaa, and l15 structures are now p
kernel - Rejigger random number generator to be per-cpu 1/2* Refactor all the kernel random number generation code to operate on a per-cpu basis. The csprng, ibaa, and l15 structures are now per-cpu.* RDRAND now runs a periodic timer callback on all available cpus rather than just on cpu 0, allowing rdrand data to mix on each cpu's rng independently.* The nrandom helper thread now chains state with an iteration between cpus, injecting a random data buffer generated from the previous cpu into the mix of the current.
<net/if_var.h>: Remove last explicit dependency on <sys/malloc.h>. These kernel sources pass M_NOWAIT flag to m_copym() and friends. Mark that it was for M_NOWAIT visibility.
kernel - Rewrite the callout_*() API* Rewrite the entire API from scratch and improve compatibility with FreeBSD. This is not an attempt to achieve full API compatibility, as FreeBSD's API has
kernel - Rewrite the callout_*() API* Rewrite the entire API from scratch and improve compatibility with FreeBSD. This is not an attempt to achieve full API compatibility, as FreeBSD's API has unnecessary complexity that coders would frequently make mistakes interpreting.* Remove the IPI mechanisms in favor of fine-grained spin-locks instead.* Add some robustness features in an attempt to track down corrupted callwheel lists due to originating subsystems freeing structures out from under an active callout.* The code supports a full-blown type-stable/adhoc-reuse structural separation between the front-end and the back-end, but this feature is currently not operational and may be removed at some future point. Instead we currently just embed the struct _callout inside the struct callout.* Replace callout_stop_sync() with callout_cancel().* callout_drain() is now implemented as a synchronous cancel instead of an asynchronous stop, which is closer to the FreeBSD API and expected operation for ported code (usb stack in particular). We will just have to fix any deadlocks which we come across.* Retain our callout_terminate() function as the 'better' way to stop using a callout, as it will not only cancel the callout but also de-flag the structure so it can no longer be used.
kernel: Change CFLAGS -> KCFLAGS also in commented out Makefile lines.
kernel/netif: Avoid empty if/else bodies.
kernel: Fix some -Wundef warnings in oce(4) and mps(4).__FreeBSD_version is not defined in DragonFly, so make it clearerwhich path we take.
netif: Configure mbuf clusters/jclusters limitsDefault mbuf clusters limit work for most of the network devicedrivers. The drivers modified by this commit:- Use mbuf jclusters.- Size of the rec
netif: Configure mbuf clusters/jclusters limitsDefault mbuf clusters limit work for most of the network devicedrivers. The drivers modified by this commit:- Use mbuf jclusters.- Size of the reception queues could be configured.- Support multiple reception queues.et(4) and mxge(4) are special; they use non-cluster mbuf for smallpackets reception, so we adjust non-cluster mbuf limit manually inthese two drivers.
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.The main reason is that our having to use the MB_WAIT and MB_DONTWAITflags was a recurring issue when porting drivers from FreeBSD becauseit tended to get forgotten and the code would compile anyway with thewrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflagsfor an objcache_get() or objcache_reclaimlist call (which use M_WAITOKand M_NOWAIT), it was just one big converting back and forth with somesanitization in between.This commit allows M_* again for the mbuf functions and keeps thesanitizing as it was before: when M_WAITOK is among the passed flags,objcache functions will be called with M_WAITOK and when it is absent,they will be called with M_NOWAIT. All other flags are scrubbed by theMB_OCFLAG() macro which does the same as the former MBTOM().Approved-by: dillon
kernel: Remove our ancient SCTP support.It was based on an early stage of FreeBSD's support and never gotbeyond that point, due to lack of usage and lack of maintenance.It is also kind of standi
kernel: Remove our ancient SCTP support.It was based on an early stage of FreeBSD's support and never gotbeyond that point, due to lack of usage and lack of maintenance.It is also kind of standing the the way of ongoing work in theIPv6 stack by sephe.If anyone ever wants to start again on upgrading and maintaining it,they can decide then if reverting this commit again makes sense as abase.Requested-by: sepheApproved-by: dillon
kernel: Don't confuse kmalloc() and mbuf flags.
kernel: Use the new auto-created sysctl ctx/tree in various drivers.Everywhere where we formerly rolled a hw.fooX.* per-device ctx/treeourselves.This commit switches it to dev.foo.X.*
kernel: Use NULL for pointers in DRIVER_MODULE().
kernel: make pktinfo and cpuid native to ip_input()In order to remove ether_input_pkt(), switch the prototypeof if_input() and adjust all callers. While there, consolidatethe style of the invoke
kernel: make pktinfo and cpuid native to ip_input()In order to remove ether_input_pkt(), switch the prototypeof if_input() and adjust all callers. While there, consolidatethe style of the invoke.Suggested and reviewed by: sephe
kernel/oce: Remove some redundant code.
Remove some casts of NULL to pointer types which had accumulated.They were brought back from FreeBSD with various updates.
Remove a bunch of unnecessary semicolons.
Fix typos in messages and manual pages.
Another typo fixing round (in messages and manpages) across the tree.
oce: Don't clear M_PKTHDR when create mbuf chain
kernel/oce: Sync oce(4) driver with FreeBSD.An update by Emulex. Most notably, it adds support for Skyhawk adapters.The port to DragonFly wasn't tested on a Skyhawk but looks like it shouldjust
kernel/oce: Sync oce(4) driver with FreeBSD.An update by Emulex. Most notably, it adds support for Skyhawk adapters.The port to DragonFly wasn't tested on a Skyhawk but looks like it shouldjust work[tm].Thanks to Mihai Carabas for testing it on a BladeEngine 3 to see that Ididn't break anything which previously worked.Taken-from: FreeBSD
12