summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-06Prefix fields of pfkey & routing PCBs, part 2, no functionnal change.Martin Pieuchot
ok tb@
2018-06-06Prefix fields of pfkey & routing PCBs, no functionnal change.Martin Pieuchot
ok visa@, tb@
2018-06-06Pass the socket to sounlock(), this prepare the terrain for per-socketMartin Pieuchot
locking. ok visa@, bluhm@
2018-06-06Asseert that a pfkey or routing socket is referenced by a `fp' insteadMartin Pieuchot
of calling sofree(), when its PCB is detached. This is different from TCP which does not always detach `inpcb's from sockets. In the pfkey & routing case caling sofree() there is a noop whereas for TCP it's needed to free closed connections. Having fewer sofree() makes it easier to understand the code and move the locks down. ok visa@
2018-06-06document missing database filtersremi
ok stsp@ claudio@ jca@
2018-06-06print metric for Intra-Area-Prefix LSAsremi
ok stsp@ claudio@ jca@
2018-06-06pluart(4) is mi nowJonathan Gray
2018-06-06Add RETGUARD to clang for amd64. This security mechanism uses per-functionmortimer
random cookies to protect access to function return instructions, with the effect that the integrity of the return address is protected, and function return instructions are harder to use in ROP gadgets. On function entry the return address is combined with a per-function random cookie and stored in the stack frame. The integrity of this value is verified before function return, and if this check fails, the program aborts. In this way RETGUARD is an improved stack protector, since the cookies are per-function. The verification routine is constructed such that the binary space immediately before each ret instruction is padded with int03 instructions, which makes these return instructions difficult to use in ROP gadgets. In the kernel, this has the effect of removing approximately 50% of total ROP gadgets, and 15% of unique ROP gadgets compared to the 6.3 release kernel. Function epilogues are essentially gadget free, leaving only the polymorphic gadgets that result from jumping into the instruction stream partway through other instructions. Work to remove these gadgets will continue through other mechanisms. Remaining work includes adding this mechanism to assembly routines, which must be done by hand. Many thanks to all those who helped test and provide feedback, especially deaadt, tb, espie and naddy. ok deraadt@
2018-06-05Move pluart(4) to dev/fdt.Mark Kettenis
ok jsg@
2018-04-06Import LLVM 6.0.1 release including clang, lld and lldb.Patrick Wildt
"where is the kaboom?" deraadt@
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2018-06-05Unify arm64 and armv7 pluart(4) implementations.Mark Kettenis
ok jsg@
2018-06-05Add missing csi_dh_params_dup() calls.Joel Sing
2018-06-05Use proper markup for ioctl arguments instead of documenting them usinganton
free-form text. ok jmc@
2018-06-05remove struct relayhost from struct envelope.Eric Faurot
ok gilles@
2018-06-05Recognise Cortex A76. Only adding to arm64 as it only supports aarch32Jonathan Gray
for EL0/userland. MIDR value from ATF. ok kettenis@
2018-06-05Revert introduction of fdinsert(), a sanitify check triggers whenMartin Pieuchot
closing a LARVAL file. Found the hardway by sthen@.
2018-06-05Switch from lazy FPU switching to semi-eager FPU switching: track whetherPhilip Guenther
curproc's xstate ("extended state") is loaded in the CPU or not. - context switch, sendsig(), vmm, and doing CPU crypto in the kernel all check the flag and, if set, save the old thread's state to the PCB, clear the flag, and then load the _blank_ state - when returning to userspace, if the flag is clear then set it and restore the thread's state This simpler tracking also fixes the restoring of FPU state after nested signal handlers. With this, %cr0's TS flag is never set, the FPU #DNA trap can no longer happen, and IPIs are no longer necessary for flushing or syncing FPU state; on the other hand, restoring xstate while returning to userspace means we have to handle xrstor faulting if we could be loading an altered state. If that happens, reset the state, fake a #GP fault (SIGBUS), and recheck for ASTs. While here, regularize fxsave/fxrstor vs xsave/xrstor handling, by using codepatching to switch to xsave/xrstor when present in the CPU. In addition, code patch in use of xsaveopt in most places when the CPU supports that. Use the 64bit-wide variants of the instructions in all cases so that x87 instruction fault IPs are reported correctly. This change has three motivations: 1) with modern clang, SSE registers are used even in rcrt0.o, making lazy FPU switching a smaller benefit vs trap costs 2) the Intel SDM warns that lazy FPU switching may increase power costs 3) post-Spectre rumors suggest that the %cr0 TS flag might not block speculation, permitting leaking of information about FPU state (AES keys?) across protection boundaries. tested by many in snaps; prodding from deraadt@
2018-06-05Turn all instances of Fn into proper cross references. While here, removeanton
redundant references to termios and favor Po/Pc for parenthesis enclosing. ok jmc@ schwarze@
2018-06-05document "match tag"; ok gillesJason McIntyre
2018-06-05Split "return to userspace via iretq" from intr_fast_exit into intr_user_exit.Philip Guenther
Move AST handling from the bottom of alltraps and Xdoreti to the top of the new routine. syscall-return-via-iretq and the FPU #DNA trap jump into intr_user_exit after the AST check (already performed for the former, skipped for the latter) Delete a couple debugging hooks mlarkin@ and I used during Meltdown work tested by many in snaps; thanks to brynet@ for spurious interrrupt testing earlier reviews and comments kettenis@ mlarkin@; prodding from deraadt@
2018-06-04Remove the cpu_reset_needs_v4_MMU_disable flag; it's always true for hardwareMark Kettenis
that OpenBSD runs on. ok patrick@
2018-06-04Use process-private futexes. This avoids the overhead of calling into uvmMark Kettenis
to look up the mapping for the futex address. ok visa@, mpi@
2018-06-04honor SIZE extension when advertised by peerGilles Chehade
ok millert@
2018-06-04for "match", document that envelopes that do not match anything are rejected,Jason McIntyre
and that rules are evaluated sequentially, first match wins; ok gilles
2018-06-04remove "from local" (the default) from one of the match rules: the lineJason McIntyre
immediately above also uses this notation, it's shorter, and it keeps two examples in the man page which claim to be the same as the default config (but with exceptions) in sync; ok gilles
2018-06-04Sync VFS documentation with realitykn
Missed during the "Namecache revamp" in 2009. Reported by Georg Bege <georg at bege dot email>, thanks. OK visa jmc mpi jca
2018-06-04Allow specifying binary via ROUTEkn
OK bluhm jca
2018-06-04Zap unused mifi_t.kn
OK bluhm mpi jca
2018-06-04Zap unused sockaddr.kn
OK bluhm deraadt jca
2018-06-04drop BUMPTIMEcheloha
unused since v1.76, ca 5.3 ok kettenis@ deraadt@
2018-06-04Fix file descriptor leak.Gerhard Roth
Patch submitted by Nan Xiao, ok tb@ sthen@ millert@ deraadt@ jca@
2018-06-04tweak previous;Jason McIntyre
2018-06-04add support for mda wrappers allowing postmaster to define command wrappersGilles Chehade
that will be executed (with recipient privileges) before calling the users' mail delivery agent ok eric@
2018-06-04in non-DIAGNOSTIC kernels, rw_assert_wrlock becomes a nop which leaves theTheo de Raadt
local variable dangling, so calculate the lock address by hand at invocation ok kettenis
2018-06-044-bit bus width is mandatory for SDIO cards that support High SpeedPatrick Wildt
mode, so switch from 1-bit to 4-bit bus width if the host controller supports it. ok kettenis@
2018-06-04Remove the extra pager code when compiled without the BACKWARDS flag.Martijn van Duren
Most terminals have scrollback options, or can be achieved via tmux, so it's not needed. OK millert@
2018-06-04Definitively choose the existing semantics for the scroll and null command.Martijn van Duren
POSIX states: "An empty command list shall be equivalent to the p command", so changing the behaviour of a null-command in any other case is a violation of POSIX. OK millert@
2018-06-04The function pf_create_state() calls pf_set_protostate() beforeAlexander Bluhm
pf_state_insert(), so the state key has not been set. When inlining, the compiler recognized the NULL pointer dereference in s->key[PF_SK_STACK]->proto and optimized it away. But if pf.c was compiled with -fno-inline, the system crashed during boot. Add a NULL check in pf_set_protostate() to handle the situation when the function is called. OK sashan@ henning@
2018-06-04tweak the text of the relaying example: make it clear that the exampleJason McIntyre
allows delivery as well as relaying (for authenticated users), and that passing to an external mda is possible, but not required; ok gilles
2018-06-04Cleanup IPsec output error handling with consistent goto drop.Alexander Bluhm
from markus@; OK mpi@
2018-06-04"match auth" matches transactions that *have been* authenticated;Jason McIntyre
ok gilles
2018-06-04Switch to SDIO High Speed mode if the host controller supports it.Patrick Wildt
ok kettenis@
2018-06-04imxesdhc(4) also supports High Speed mode for SD.Patrick Wildt
ok kettenis@
2018-06-04Remove unused/commented out includes.Mark Kettenis
2018-06-04Remove unused include.Mark Kettenis
2018-06-04Remove unused include.Mark Kettenis
2018-06-04Nuke unused variable.Kevin Lo
ok deraadt@
2018-06-04Add VB_DUPOK to suppress witness(4) warning of concurrent mount locks.Philip Guenther
Use that in three places: - vfs_stall() - sys_mount() - dounmount()'s MNT_FORCE-does-recursive-unmounts case ok deraadt@ visa@