summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2021-12-28Unlock bottom part of the fault handler.Martin Pieuchot
Tested by many during the past months, thanks! ok sthen@
2021-12-27Not only BCM4378, but all PCIe core revisions >= 64 need to be accessedPatrick Wildt
using the new sets of registers.
2021-12-27Map the chip ids used on Apple M1 Pro/Max and Apple T2 Macs to firmwarePatrick Wildt
names.
2021-12-27Support reading OTP information from a few more chips, necessary to learnPatrick Wildt
firmare names on Apple M1 Pro/Max and Apple T2 Macs.
2021-12-27Yet another errno correction.Anton Lindqvist
2021-12-27Fix off-by-one in blob download, where in the case that the blob is evenlyPatrick Wildt
divisible by 1400, the last chunk isn't marked with an end flag. ok tobhe@
2021-12-27BCM4387 needs the D11 cores to be held in reset by us, the firmwarePatrick Wildt
will take care of releasing them, as otherwise initialization would fail some of the time. That chip also contains 3 of these, so make sure we reset all of them. Necessary on Apple M1 Pro/Max.
2021-12-27Send TxCap and WiFi calibration blobs to the chip.Patrick Wildt
2021-12-27Switch module codename retrieval to use the newly proposed device treePatrick Wildt
bindings.
2021-12-27Handle trailing odd-sized 1024 byte blocks when calculating TCM RAM size.Patrick Wildt
2021-12-27Bump rxpost and rxcomplete ring size to 1024 for newer chips.Patrick Wildt
2021-12-26Rework garbage collector for unix(4) sockets.Vitaliy Makkoveev
This time unix(4) sockets garbage collector always destroys any socket with positive "fp->f_count == unp->unp_msgcount" equation. This is wrong because unix(4) sockets within SCM_RIGHTS message but closed on sender side also have this equation positive. Such sockets are not in the loop, and if garbage collector kill them before they are received, we get kernel panic. FreeBSD already has garbage collector reworked to fix this issue [1]. The logic is pretty simple so import it to our garbage collector. 1. https://reviews.freebsd.org/D23142 ok bluhm@
2021-12-26Add information about TCM rambase and how to check the SR capability forPatrick Wildt
a few more chips.
2021-12-26DIOCHANGERRULE ioctl must set pointer to ruleset in rule it inserts.Alexandr Nedvedicky
Reported-by: syzbot+7718c5f69c595f76b298@syzkaller.appspotmail.com OK bluhm@, OK jmatthew@
2021-12-26Add address locators for the ACPI "bus" and use these to fix the order ofMark Kettenis
the com(4) devices to match the traditional order one the ISA bus. ok patrick@, anton@
2021-12-26make 'set skip on ...' in pf.conf dynamicAlexandr Nedvedicky
This is an old issue in pf(4): whenever new interface appears in IP stack, we must reload pf.conf to apply 'set skip on ...' to newly plumbed network interfaces. Time has come to fix it. The idea is to also create pfi_kif for interfaces, which are referred by 'set skip on ...'. Such pfi_kif instances are created/destroyed by pfi_set_flags()/pfi_clear_flags(). claudio@ dragged my attention to this in Gouveia. Also his feedback helped me to put change into shape. OK claudio@
2021-12-25For a long time ip_ours() and ip6_ours() are calling ip_deliver()Alexander Bluhm
without kernel lock. Unlock the two callers in ip6_input_if() that have been forgotten. OK mvs@ kn@
2021-12-25kqueue: Invalidate revoked vnodes' knotes on the flyVisa Hankala
When a tty device is revoked, the associated knotes should be invalidated. Otherwise the user processes can keep on receiving events from the device. It appears tricky to do the invalidation as part of revocation in a way that does not allow unwanted event registration or clutter the tty code. For now, make the knotes invalid lazily before delivery. OK mpi@
2021-12-25Sync DF_1_* flag definitions with llvm 13, including support inPhilip Guenther
readelf -d for displaying them. (lld 13 sets DF_1_PIE on most our binaries) ok jsg@
2021-12-24Support more mtw(4) devices.hastings
ASUS USB-N10 v2, D-Link DWA-127 rev B1, Edimax EW-7711UAn v2, various Ralink/MediaTek ids. ok stsp@
2021-12-24Make poll/select version of filt_solisten() more similar to soo_poll().Visa Hankala
OK mpi@
2021-12-24regenhastings
2021-12-24Add some more mtw(4) devices.hastings
ASUS USB-N10 v2, D-Link DWA-127 rev B1, Edimax EW-7711UAn v2, various Ralink/MediaTek ids. ok stsp@
2021-12-24Add apliic(4), a driver for the I2C controller found on various Apple SoCs.Patrick Wildt
ok kettenis@
2021-12-23Remove unused variables and assignments in ah and esp output.Alexander Bluhm
found by clang 13; OK tobhe@
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-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-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-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-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-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-21knf nitsAnton Lindqvist
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-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.