summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-23Fix endless loop in the interrupt handler. When iterating over eachPatrick Wildt
GPIO base register we must not replace the iterator variable with the index of the pin inside the register. ok kettenis@
2021-12-23syncPhilip Guenther
2021-12-23Roll the syscalls that have an off_t argument to remove the explicit padding.Philip Guenther
Switch libc and ld.so to the generic stubs for these calls. WARNING: reboot to updated kernel before installing libc or ld.so! Time for a story... When gcc (back in 1.x days) first implemented long long, it didn't (always) pass 64bit arguments in 'aligned' registers/stack slots, with the result that argument offsets didn't match structure offsets. This affected the nine system calls that pass off_t arguments: ftruncate lseek mmap mquery pread preadv pwrite pwritev truncate To avoid having to do custom ASM wrappers for those, BSD put an explicit pad argument in so that the off_t argument would always start on a even slot and thus be naturally aligned. Thus those odd wrappers in lib/libc/sys/ that use __syscall() and pass an extra '0' argument. The ABIs for different CPUs eventually settled how things should be passed on each and gcc 2.x followed them. The only arch now where it helps is landisk, which needs to skip the last argument register if it would be the first half of a 64bit argument. So: add new syscalls without the pad argument and on landisk do that skipping directly in the syscall handler in the kernel. Keep compat support for the existing syscalls long enough for the transition. ok deraadt@
2021-12-23fix typo: boolean true should decode to 1, not 0Theo Buehler
2021-12-23Route templated implementations of {d2i,i2d}_ASN1_BOOLEAN() throughTheo Buehler
ASN1_item_ex_{d2i,i2d}() instead of ASN1_item_{d2i,i2d}(). Fixes test failure on sparc64, and hopefully all other architectures. reported by tobhe with/ok jsing
2021-12-23IPsec is not MP safe yet. To allow forwarding in parallel withoutAlexander Bluhm
dirty hacks, it is better to protect IPsec input and output with kernel lock. Not much is lost as crypto needs the kernel lock anyway. From here we can refine the lock later. Note that there is no kernel lock in the SPD lockup path. Goal is to keep that lock free to allow fast forwarding with non IPsec traffic. tested by Hrvoje Popovski; OK tobhe@
2021-12-23Get rid of unused next battery level argument.Anton Lindqvist
2021-12-23Use TAILQ_FOREACH to traverse the disk list in sysctl_diskinit().Alexander Bluhm
OK anton@
2021-12-23Disk lock was held when returning to userland. Add a missing unlockAlexander Bluhm
in vnd ioctl error path. Reported-by: syzbot+6dde3fda33074a256318@syzkaller.appspotmail.com OK jsg@ anton@
2021-12-23Template for option WITNESS is in the architecture GENERIC.MP fileAlexander Bluhm
if it is supported. Remove it from the global GENERIC config. OK visa@ claudio@
2021-12-23fix off by one in bounds testJonathan Gray
ok deraadt@
2021-12-23fix off by one in bounds testJonathan Gray
ok tobhe@
2021-12-23make array bounds in unix2dosfn() prototype match functionJonathan Gray
missed when unix2dosfn() was changed in the kernel with msdosfs_conv.c rev 1.15 in 2012
2021-12-23make array bounds in unix2dosfn() prototype match functionJonathan Gray
missed when unix2dosfn() was changed with msdosfs_conv.c rev 1.15 in 2012
2021-12-23give et_setmulti() more chance of workingJonathan Gray
ok claudio@
2021-12-22Avoid GNU printf extension to use 'L' length modifier with a intJonathan Gray
conversion specifier to mean 'll'. Found by an ok deraadt@
2021-12-22While malloc sleeps, the disk list could change during sysctl. ThenAlexander Bluhm
allocated memory could be too short for the list of disks. Retry allocating enough space until it did not change. The disk list and duid memory are protected by kernel lock. Use asserts to mark this explicitly. Reported-by: syzbot+807423f6868bbfb836bc@syzkaller.appspotmail.com OK anton@ mpi@
2021-12-22Disable minimum power consumption in hostap mode. This improves connectionTobias Heider
reliability when bwfm is used as an access point. ok patrick@
2021-12-22Trivial update to 4.3.9.Florian Obser
2021-12-22Replace IO::Socket::INET with IO::Socket::IP.Alexander Bluhm
2021-12-22Replace deprecated IO::Socket::INET6 with IO::Socket::IP.Alexander Bluhm
2021-12-22Replace deprecated IO::Socket::INET6 with IO::Socket::IP.Alexander Bluhm
2021-12-22Consolidate enc_getif() lookups in IPsec input path to save one lookupTobias Heider
per packet and improve readability. ok bluhm@
2021-12-22drm/amdgpu: correct register access for RLC_JUMP_TABLE_RESTOREJonathan Gray
From Le Ma aec5897b277b13acd8f913d777654d4d092a24f1 in linux 5.10.y/5.10.88 f3a8076eb28cae1553958c629aecec479394bbe2 in mainline linux
2021-12-22drm/amd/pm: fix a potential gpu_metrics_table memory leakJonathan Gray
From Lang Yu 222cebd995cdf11fe0d502749560f65e64990e55 in linux 5.10.y/5.10.88 aa464957f7e660abd554f2546a588f6533720e21 in mainline linux
2021-12-22Replace deprecated IO::Socket::INET6 with IO::Socket::IP.Alexander Bluhm
2021-12-22Replace two questionable size_t types. For the repo id use a unsigned intClaudio Jeker
and for the roa maxlength use unsigned char (like the prefixlen in struct ip_addr). With input and OK job@
2013-01-03Reengineer the socket splicing regression tests:Alexander Bluhm
- Move the tests from splice to new sosplice directory for consistent naming. - Split the API tests and the TCP splicing tests into separate directories. - Create some tests for the upcoming UDP splicing. - Tests can be run in obj directories now. - The API tests can run both on a local and on a remote machine now. - Fix the forking TCP tests which splice and read or write simultaneously. - Bunch of little fixes for races in the tests. - Deduplicate code, move checks into common functions.
2021-12-22The maxlength is optional in roa entries. By setting it to the addressClaudio Jeker
prefixlen before looking for the optional maxlength attribute the code can be simplified and a ternary expression can be removed. OK tb@ job@
2021-12-22sort -H and -h in SYNOPSIS/usage();Jason McIntyre
tweak the -H text; ok djm
2021-12-22%Lx -> %llx kernel printf does not support %LxJonathan Gray
2021-12-21Fix a typo in mlock(2) error path triggering a double-free.Martin Pieuchot
Pass the correct entry to uvm_fault_unwire_locked(). Reported-by: syzbot+bb2f63f076618e9ed0d3@syzkaller.appspotmail.com ok kettenis@, deraadt@
2021-12-21Move checks on attach arguments from attach into match.Mark Kettenis
ok anton@, deraadt@
2021-12-21Cleanup a few things while reading the code.Claudio Jeker
OK job@
2021-12-21Simplify code a bit. There is only one TA per TAL and so only oneClaudio Jeker
ta_lookup(). Implementing the talrepocnt limiter there makes little sense and gains us nothing. OK job@
2021-12-21Support underscore style with capture-pane -e, GitHub issue 2928.Nicholas Marriott
2021-12-21Add test cases for intermediate cert with 'set cert_partial_chain'.Tobias Heider
2021-12-21ARM's Morello CHERI architecture does not support pointers in packedNicholas Marriott
structures, so remove the packed attribute on struct grid_line and reorder the members to eliminate unnecessary padding. From Jessica Clarke in GitHub issue 3012.
2021-12-21knf nitsAnton Lindqvist
2021-12-21document BN_MONT_CTX_set_locked(3)Ingo Schwarze
2021-12-21Do not print "dt: 451 probes" at boot in dmesg. Btrace device dt(4)Alexander Bluhm
is enabled by default, this line does not provide much information. requested by kettenis@ deraadt@; OK mpi@
2021-12-21state up front that patch(1) operates on text files,Ingo Schwarze
fixing an omission pointed out by chrisz@; OK jmc@ deraadt@ chrisz@
2021-12-21avoid returning uninitialised var in hidpp_send_report()Jonathan Gray
ok anton@
2021-12-21Let malloc return an error as opposed of panicking when sysctlAnton Lindqvist
kern.shminfo.shmseg is set to something ridiculously large. ok kettenis@ millert@ Reported-by: syzbot+9f1b201cdbc97b19c7f5@syzkaller.appspotmail.com
2021-12-21Fix another vnd race pointed out by mpi@ and make sure to not unlock theAnton Lindqvist
vnode twice in the error path. Tested in snaps for a couple of days.
2021-12-21Ensure that the disk has been initialized after acquiring the lock andAnton Lindqvist
not before as we might end up sleeping while acquiring the lock, introducing a potential race. Tested in snaps for a couple of days. ok mpi@ Reported-by: syzbot+c87cdc2905b441c20d39@syzkaller.appspotmail.com
2021-12-21Rename local variable intrfn to intr, matches what dev/fdt/com_fdt.cAnton Lindqvist
already does.
2021-12-21Do not attach com at acpi when there's no address or irq present. FixesAnton Lindqvist
a regression caused by the recent change to start attaching com at acpi as it turns out that Libreboot exposes console devices lacking crucial data in their acpi tables. The same console attaches fine over isa, therefore restore this behavior. Problem reported by <cipher-hearts at riseup dot net> on bugs@ ok deraadt@ kettenis@
2021-12-21errno overhaul, getting rid of some ambiguity. In the hopes of trackingAnton Lindqvist
down a rare but annoying problem related to remote coverage exposed by syzkaller.
2021-12-21Multiply the number of states in the example adaptive timeout calculationJonathan Matthew
by 10 so it works with the numbers in the config, which were previously multiplied. ok dlg@