summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-21move the backwards-stack vm_minsaddr check from hppa trap.c to uvm_grow(),Theo de Raadt
within the correct #ifdef of course. ok kettenis
2020-10-21The condition around uvm_grow() can be simplified, as the error resultTheo de Raadt
adjustment is effectively a dead store ok kettenis
2020-10-21Save and restore the MXCSR register and the FPU control word such thatMark Kettenis
floating-point control modes are properly restored by longjmp(3). ok guenther@
2020-10-21uvm_grow() now does the vm_maxsaddr check (before locking), so callers don'tTheo de Raadt
need to do it ok kettenis
2020-10-21Remove SAs from ike_dstid_sas on 'ikectl reset sa' to prevent use after free.tobhe
Found by csszep <csszep (at) gmail (dot) com> ok patrick@
2020-10-21Save and restore the MXCSR register and the FPU control word such thatMark Kettenis
floating-point control modes are properly restored by longjmp(3). ok guenther@
2020-10-21Stop documenting some functions as macros.Theo Buehler
In x509.h r1.70 (2018/08/24) I turned some macros into actual functions to follow what OpenSSL is doing since 1.1.0. The documentation still claims that they are implemented as macros. Update a doc sync commit hash while there.
2020-10-21simplify and improve the example by using the -a and -d options;Ingo Schwarze
suggested by <adr at sdf dot org>, tweaked by me
2020-10-21On machines with a userland timecounter we bypass the gettimeofday(2)Mark Kettenis
syscall. So whenever we pass a bad address we get a SIGSEGV instead of EFAULT. POSIX explicitly allows this behaviour. So adjust the test to deal with this case. ok deraadt@, millert@, guenther@
2020-10-21Provide dummy definitions for NET_LOCK() and PF_LOCK() when compiling thisMark Kettenis
file as part of tcpdump(8). Unbreaks the tree. ok deraadt@
2020-10-21mips64 has same bug as arm64: copyout(9), copyinstr(9) andTheo de Raadt
copyoutstr(9) should bail out properly if they are called with a length of 0. ok visa
2020-10-21- fixing fatal typos fp vs fp_prealloc.Alexandr Nedvedicky
OK mpi
2020-10-21handle capable(CAP_SYS_NICE) for allowing high priority contextsJonathan Gray
2020-10-21Prevent NULL dereference introduced in previous.Martin Pieuchot
Used a different variable to not shadow `entry' allocated before grabbing the lock.
2020-10-21ICMP raw sockets start to receive packets as soon as they are createdFlorian Obser
by socket(2). They also receive all ICMP packets on the system, for example from parallel running ping(8)s. After creating the raw socket ping(8) sets various socket options with setsockopt(2) and assumes that they apply to all packets it later processes. For example ping6(8) uses setsockopt(IPV6_RECVHOPLIMIT) to print the IPv6 hop count. Packets received between the socket(2) and setsockopt(2) call however do not have the hoplimit information and ping6(8) prints a wrong and missleading warning. To avoid this we have to drain our socket of packets we received before we were fully setup. Problem reported and testing by martijn Input deraadt OK benno
2020-10-21Specify version with fw_update(1)kn
sysupgrade(8) calls fw_update(1) without specifying a path, so running on pre-6.8 snapshot and upgrading to 6.8 release with "-r" will update firmware packages to snapshots. Spotted by sthen OK sthen "looks good" deraadt
2019-11-19Import NetBSD system call regression tests. They were written withAlexander Bluhm
ATF (Automated Testing Framework), so we use a small wrapper to map it to our bsd.regress.mk framework. Only half of the 80 NetBSD tests have been taken, the others need more work to adapt. Of them 34 syscall tests pass. Moritz Buhl ported the tests to OpenBSD.
2020-10-21Constify and use C99 initializer for "struct uvm_pagerops".Martin Pieuchot
While here put some KERNEL_ASSERT_LOCKED() in the functions called from the page fault handler. The removal of locking of `uobj' will need to be revisited and these are good indicator that something is missing and that many comments are lying. ok kettenis
2020-10-21Move the top part of uvm_fault() (lookups, checks, etc) in their own function.Martin Pieuchot
The name, uvm_fault_check() and logic comes from NetBSD as reuducing diff with their tree is useful to learn from their experience and backport fixes. No functional change intended. ok kettenis@
2020-10-21- move NET_LOCK() further down in pf_ioctl.c. Also move memory allocationsAlexandr Nedvedicky
outside of NET_LOCK()/PF_LOCK() scope in easy spots. OK kn@
2020-10-21rde_update_dispatch() was switched to void some time ago. There is noClaudio Jeker
need to use or set error anymore. OK deraadt@
2020-10-21Move tmp16 declaration into the #ifdef __KAME__ block to remove a compilerClaudio Jeker
warning on non __KAME__ systems. OK deraadt@
2020-10-21Include endian.h for htobe64().Claudio Jeker
2020-10-21No need to include sys/cdefs.h hereClaudio Jeker
2020-10-21For portability include sys/types.h instead of sys/cdefs.h.Claudio Jeker
cdefs.h may not exist on some systems and the portable framework uses sys/types.h to define __dead. OK deraadt@
2020-10-21hppa also has a similar to arm64: copyout(9), copyinstr(9) andTheo de Raadt
copyoutstr(9) should bail out properly if they are called with a length of 0. ok kettenis@
2020-10-21change drm_vma function arguments to take struct drm_file *Jonathan Gray
reduces the diff to linux 5.7.y ok kettenis@
2020-10-20copyout(9), copyinstr(9) and copyoutstr(9) should bail outPatrick Wildt
properly if they are called with a length of 0. Found by our regression tests Debugged with deraadt@ ok kettenis@
2020-10-20Remove calls for df(1), netstat(1), and the verbose dump(1)Daniel Jakots
With this change, daily(8) only sends email when something looks dubious. Consequently VERBOSESTATUS is now a no-op and may be unset. The code is trivial and riddled with choices that look like personal preferences. The old behavior can be achieved through /etc/daily.local. With schwarze@, tweak kn@, sthen@ OK schwarze@, kn@, jung@
2020-10-20timeout(9): fix compilation under NKCOVcheloha
2020-10-20Align the basename(3) and dirname(3) prototypes with the POSIX spec:Christian Weisgerber
Both functions take a non-const parameter. Implementations may modify the passed string, even though ours do not. ok stsp@ deraadt@ millert@
2020-10-20alpha, loongson, sh, sparc64: recompute tick, tick_nsec when hz(9) is resetcheloha
Normally we set hz(9) at compile-time in sys/conf/param.c to the value of HZ. HZ is one of the fundamental compilation options(4). However, sometimes we need to reset hz(9) at runtime. Whenever we reset hz(9) we need to recompute tick and tick_nsec. Otherwise a variety of "time stuff" in the kernel will not work correctly. For example, most timeouts will expire "too slow" or "too fast". There are a bunch of other places we use tick and tick_nsec that will exhibit similar problems. Test-compiled by deraadt@.
2020-10-20Use a trap instruction that unconditionally terminates the process.Visa Hankala
OK deraadt@
2020-10-20Add handling for a trap instruction that terminates the process.Visa Hankala
OK deraadt@
2020-10-20Add arm64 support.Mark Kettenis
ok deraadt@
2020-10-20Remove guard, uao_init() is called only once and no other function use one.Martin Pieuchot
ok kettenis@
2020-10-20use drm_mm from linux 5.7.yJonathan Gray
Without this boot time tests from setting amdgpu_testing = 1 fail. For example on Vega 56: drm: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF ... [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0xa00000 [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0xb00000 ... [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0x1fe00000 [drm] Tested GTT->VRAM and VRAM->GTT copy for GTT offset 0x1ff00000 [drm] *ERROR* 0xffff80000135f858 bind failed Error while testing BO move ok kettenis@
2020-10-19Retguard sigsetjmp on powerpc64.mortimer
ok deraadt@
2020-10-19Adapt XMSS to new logging infrastructure. With markus@, ok djm@.Darren Tucker
2020-10-19Decode the UDF ("permanently undefined") instruction in ddb(4)'s arm64Christian Weisgerber
disassembler. The particular immediate16 format appears to be unique to this instruction. ok kettenis@ deraadt@
2020-10-19Accommodate POSIX basename(3) that takes a non-const parameter andChristian Weisgerber
may modify the string buffer. ok florian@ millert@
2020-10-19Accommodate POSIX basename(3) that takes a non-const parameter andChristian Weisgerber
may in fact modify the string buffer. truncation check requested and ok florian@
2020-10-19Only use OPAL_CONSOLE_FLUSH if the firmware implements it. Should helpMark Kettenis
on POWER8 machines with older versions of OPAL.
2020-10-19the userland pagefault handler can drop the kernel lock before goingTheo de Raadt
into trapsignal() discussed with kettenis
2020-10-19deliver SIGSEGV rather than SIGBUS for T_PROTFLT,T_SEGNPFLT,T_STKFLT.Theo de Raadt
This is a similar translation as i386, and matches the idea that SIGBUS signals refer to problems with the underlying object rather than the mapping. ok kettenis
2020-10-19Add explicit casts to double to quiet a clang warning.Todd C. Miller
OK deraddt@
2020-10-19Clear vmspace pointer in struct process before calling uvmspace_free(9).Mark Kettenis
ok patrick@, mpi@
2020-10-19replace ad-hoc illegal instruction with the architecturally defined oneChristian Weisgerber
("permanently undefined") ok deraadt@ kettenis@
2020-10-19Handle NO_PROPOSAL_CHOSEN as IKE_AUTH initiator.tobhe
ok markus@
2020-10-19Do not "fall through" to the last "else" when we parsed the character.Florian Obser
rev 1.9 of lex.c broke the parser by deleting an outer "if" block when only the inner was supposed to go. OK tb